Skip to content

Commit

Permalink
Use gtest-parallel from submodule folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gr0vity committed Dec 7, 2024
1 parent 2673c53 commit 6911c68
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ci/tests/run-gtest-parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ fi

executable=./${target}$(get_exec_extension)

# Check if gtest-parallel is available
if command -v gtest-parallel >/dev/null 2>&1; then
# Get the project root directory (2 levels up from ci/tests)
PROJECT_ROOT="$(cd "$(dirname "$BASH_SOURCE")/../.." && pwd)"
GTEST_PARALLEL="${PROJECT_ROOT}/submodules/gtest-parallel/gtest-parallel"

if [ -f "${GTEST_PARALLEL}" ]; then
echo "Running tests with gtest-parallel for target: ${target}"
gtest-parallel "${executable}" --worker=1
"${GTEST_PARALLEL}" "${executable}" --worker=1
else
echo "gtest-parallel not found, running tests directly for target: ${target}"
echo "gtest-parallel not found at ${GTEST_PARALLEL}, running tests directly for target: ${target}"
"${executable}"
fi

0 comments on commit 6911c68

Please sign in to comment.