File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,23 +3,27 @@ set -euo pipefail
33
44source " $( dirname " $BASH_SOURCE " ) /common.sh"
55
6- target =$1
7- if [ -z " ${target -} " ]; then
8- echo " Target not specified"
6+ executable =$1
7+ if [ -z " ${executable -} " ]; then
8+ echo " Executable not specified"
99 exit 1
1010fi
1111
1212shift
13- executable=./${target} $( get_exec_extension)
1413
1514# Get the project root directory (2 levels up from ci/tests)
1615PROJECT_ROOT=" $( cd " $( dirname " $BASH_SOURCE " ) /../.." && pwd) "
1716GTEST_PARALLEL=" ${PROJECT_ROOT} /submodules/gtest-parallel/gtest-parallel"
1817
1918if [ -f " ${GTEST_PARALLEL} " ]; then
20- echo " Running tests with gtest-parallel for target : ${target } "
19+ echo " Running tests with gtest-parallel for executable : ${executable } "
2120 " ${GTEST_PARALLEL} " " ${executable} " --worker=1 " $@ "
21+ test_status=$?
2222else
23- echo " gtest-parallel not found at ${GTEST_PARALLEL} , running tests directly for target : ${target } "
23+ echo " gtest-parallel not found at ${GTEST_PARALLEL} , running tests directly for executable : ${executable } "
2424 " ${executable} " " $@ "
25- fi
25+ test_status=$?
26+ fi
27+
28+ # Return the original test exit status
29+ exit $test_status
Original file line number Diff line number Diff line change @@ -46,10 +46,11 @@ case "$(uname -s)" in
4646 ;;
4747esac
4848
49- # Run the test using gtest-parallel helper
5049shift
5150executable=./${target} $( get_exec_extension)
52- " $( dirname " $BASH_SOURCE " ) /run-gtest-parallel.sh" " ${target} " " $@ "
51+
52+ # Run the test using gtest-parallel helper
53+ " $( dirname " $BASH_SOURCE " ) /run-gtest-parallel.sh" " ${executable} " " $@ "
5354status=$?
5455
5556if [ $status -ne 0 ]; then
You can’t perform that action at this time.
0 commit comments