mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
d8f416bbb8
Run unit tests in both Cirrus and GitHub CI. For sharded CI instances (currently just Windows on GitHub), run only on the first shard. This is OK while we have only a single unit test executable, but we may wish to distribute tests more evenly when we add new unit tests in the future. We may also want to add more status output in our unit test framework, so that we can do similar post-processing as in ci/lib.sh:handle_failed_tests(). Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 lines
550 B
Bash
Executable file
23 lines
550 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Test Git in parallel
|
|
#
|
|
|
|
. ${0%/*}/lib.sh
|
|
|
|
case "$CI_OS_NAME" in
|
|
windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
|
|
*) ln -s "$cache_dir/.prove" t/.prove;;
|
|
esac
|
|
|
|
group "Run tests" make --quiet -C t T="$(cd t &&
|
|
./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh |
|
|
tr '\n' ' ')" ||
|
|
handle_failed_tests
|
|
|
|
# We only have one unit test at the moment, so run it in the first slice
|
|
if [ "$1" == "0" ] ; then
|
|
group "Run unit tests" make --quiet -C t unit-tests-prove
|
|
fi
|
|
|
|
check_unignored_build_artifacts
|