Skip to content

Commit 0ecd1b7

Browse files
committed
Distinguish parallel test suites by name
This introduces an override to the test suite name, which is determined as the name of the calling test file without its extension by default. For the parallel tests, the default does not work reliably, as they are essentially just thin wrappers around the test-ghe-backup and test-ghe-restore test suites.
1 parent ddfe5b5 commit 0ecd1b7

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

test/test-ghe-backup-parallel.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# ghe-backup command tests run in parallel
33
set -e
44

5+
# Overwrite default test suite name to distinguish it from test-ghe-backup
6+
export GHE_TEST_SUITE_NAME="test-ghe-backup-parallel"
7+
58
export GHE_PARALLEL_ENABLED=yes
69

710
TESTS_DIR="$PWD/$(dirname "$0")"

test/test-ghe-restore-parallel.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
88
exit 0
99
fi
1010

11+
# Overwrite default test suite name to distinguish it from test-ghe-restore
12+
export GHE_TEST_SUITE_NAME="test-ghe-restore-parallel"
13+
1114
export GHE_PARALLEL_ENABLED=yes
1215

1316
# use temp dir to fix rsync file issues in parallel execution:

test/testlib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ TMPDIR="$ROOTDIR/test/tmp"
3131
TRASHDIR="$TMPDIR/$(basename "$0")-$$"
3232

3333
test_suite_file_name="$(basename "${BASH_SOURCE[1]}")"
34-
test_suite_name="${test_suite_file_name%.*}"
34+
test_suite_name="${GHE_TEST_SUITE_NAME:-${test_suite_file_name%.*}}"
3535

3636
# Set GIT_{AUTHOR,COMMITTER}_{NAME,EMAIL}
3737
# This removes the assumption that a git config that specifies these is present.

0 commit comments

Comments
 (0)