diff --git a/ci/tests/run-gtest-parallel.sh b/ci/tests/run-gtest-parallel.sh new file mode 100755 index 0000000000..83f96d8a9e --- /dev/null +++ b/ci/tests/run-gtest-parallel.sh @@ -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 \ No newline at end of file diff --git a/ci/tests/run-tests.sh b/ci/tests/run-tests.sh index 7f48962359..4d95f861d4 100755 --- a/ci/tests/run-tests.sh +++ b/ci/tests/run-tests.sh @@ -46,10 +46,10 @@ case "$(uname -s)" in ;; esac -# Run the test +# Run the test using gtest-parallel helper shift executable=./${target}$(get_exec_extension) -"${executable}" "$@" +"$(dirname "$BASH_SOURCE")/run-gtest-parallel.sh" "${target}" "$@" status=$? if [ $status -ne 0 ]; then