From 5c253e666d5965ec18f3372b4a91030cc8eb9a0d Mon Sep 17 00:00:00 2001
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Date: Wed, 10 Feb 2021 11:10:43 +0300
Subject: [PATCH] jepsen: correct jepsen build preparation target

Found issue:

  root@hpalx:/source# make run-jepsen
  [  0%] Performing update step for 'jepsen-tests'

  *** Please tell me who you are.

  Run

    git config --global user.email "you@example.com"
    git config --global user.name "Your Name"

  to set your account's default identity.
  Omit --global to set the identity only in this repository.

  fatal: unable to auto-detect email address (got 'root@hpalx.(none)')
  Cannot save the current index state
  CMake Error at /source/jepsen-tests-prefix/tmp/jepsen-tests-gitupdate.cmake:83 (message):
    Failed to stash changes

  CMakeFiles/jepsen-tests.dir/build.make:95: recipe for target 'jepsen-tests-prefix/src/jepsen-tests-stamp/jepsen-tests-update' failed

added 'Nobody' User setup to git configuration if needed.
---
 .travis.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.travis.mk b/.travis.mk
index 5b10b00432..0e9068e504 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -402,5 +402,9 @@ test_freebsd: deps_freebsd test_freebsd_no_deps
 # ###################
 
 test_jepsen: deps_debian_jepsen
+	# Jepsen build uses git commands internally, like command
+	# 'git stash --all' which fails w/o git configuration setup
+	git config --get user.name || git config --global user.name "Nodody User"
+	git config --get user.email || git config --global user.email "nobody@nowhere.com"
 	cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DWITH_JEPSEN=ON
 	make run-jepsen
-- 
GitLab