diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 7e42a115b4..135c6b6032 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -35,6 +35,9 @@ jobs: if: steps.build.outcome == 'success' && (success() || failure()) run: ../ci/tests/run-core-tests.sh working-directory: build + env: + NANO_LOG_STATS: 1 + NANO_LOG: debug - name: RPC Tests if: steps.build.outcome == 'success' && (success() || failure()) @@ -81,6 +84,9 @@ jobs: if: steps.build.outcome == 'success' && (success() || failure()) run: ../ci/tests/run-core-tests.sh working-directory: build + env: + NANO_LOG_STATS: 1 + NANO_LOG: debug - name: RPC Tests if: steps.build.outcome == 'success' && (success() || failure()) @@ -132,6 +138,9 @@ jobs: run: ../ci/tests/run-core-tests.sh working-directory: build shell: bash + env: + NANO_LOG_STATS: 1 + NANO_LOG: debug - name: RPC Tests if: steps.build.outcome == 'success' && (success() || failure()) diff --git a/ci/tests/run-gtest-parallel.sh b/ci/tests/run-gtest-parallel.sh new file mode 100755 index 0000000000..022f9c70f6 --- /dev/null +++ b/ci/tests/run-gtest-parallel.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -euo pipefail + +source "$(dirname "$BASH_SOURCE")/common.sh" + +executable=$1 +if [ -z "${executable-}" ]; then + echo "Executable not specified" + exit 1 +fi + +shift + +# 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 executable: ${executable}" + "${GTEST_PARALLEL}" "${executable}" --worker=1 "$@" + test_status=$? +else + echo "gtest-parallel not found at ${GTEST_PARALLEL}, running tests directly for executable: ${executable}" + "${executable}" "$@" + test_status=$? +fi + +# Return the original test exit status +exit $test_status \ No newline at end of file diff --git a/ci/tests/run-tests.sh b/ci/tests/run-tests.sh index 7f48962359..c322bba26c 100755 --- a/ci/tests/run-tests.sh +++ b/ci/tests/run-tests.sh @@ -46,10 +46,11 @@ case "$(uname -s)" in ;; esac -# Run the test shift executable=./${target}$(get_exec_extension) -"${executable}" "$@" + +# Run the test using gtest-parallel helper +"$(dirname "$BASH_SOURCE")/run-gtest-parallel.sh" "${executable}" "$@" status=$? if [ $status -ne 0 ]; then