aboutsummaryrefslogtreecommitdiff
path: root/tests/remotes.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-10-02 22:56:19 -0300
committerEuAndreh <eu@euandre.org>2021-10-02 22:58:54 -0300
commit66a2ddce1a56a4a6a402b126b7759626aa4ffd67 (patch)
tree5283d815454a5ba4ef99dbe7fc5b822037c914cc /tests/remotes.sh
parenttests/cli-opts.sh: Recover test_langs() (diff)
downloadgit-permalink-66a2ddce1a56a4a6a402b126b7759626aa4ffd67.tar.gz
git-permalink-66a2ddce1a56a4a6a402b126b7759626aa4ffd67.tar.xz
tests/: Copy files to temp directory to avoid messing with existing generated files
As the tests do a "make clean", which would erase the existing generated files.
Diffstat (limited to '')
-rwxr-xr-xtests/remotes.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/remotes.sh b/tests/remotes.sh
index 3fff205..d8fd02e 100755
--- a/tests/remotes.sh
+++ b/tests/remotes.sh
@@ -3,8 +3,13 @@ set -u
. tests/lib.sh
+TESTDIR="$(mkdtemp)"
+cp -R . "$TESTDIR"
+cd "$TESTDIR" || exit
+
TEST_PREFIX="$PWD/tests/prefix/$(uuid)"
-make PREFIX="$TEST_PREFIX" install 1>/dev/null
+make clean >/dev/null
+make PREFIX="$TEST_PREFIX" install >/dev/null
PATH="$PWD/tests:$TEST_PREFIX/bin:$PATH"
if ! git config --global user.email > /dev/null; then