-
Notifications
You must be signed in to change notification settings - Fork 790
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run tests with gtest-parallel and --worker=1
gr0vity
committed
Dec 7, 2024
1 parent
ad5da18
commit 2673c53
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
source "$(dirname "$BASH_SOURCE")/common.sh" | ||
|
||
target=$1 | ||
if [ -z "${target-}" ]; then | ||
echo "Target not specified" | ||
exit 1 | ||
fi | ||
|
||
executable=./${target}$(get_exec_extension) | ||
|
||
# Check if gtest-parallel is available | ||
if command -v gtest-parallel >/dev/null 2>&1; then | ||
echo "Running tests with gtest-parallel for target: ${target}" | ||
gtest-parallel "${executable}" --worker=1 | ||
else | ||
echo "gtest-parallel not found, running tests directly for target: ${target}" | ||
"${executable}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters