From fe8910350c0b766b0a9897da085c18bdb0f7f055 Mon Sep 17 00:00:00 2001 From: xxyzz Date: Sun, 20 Feb 2022 18:29:18 +0800 Subject: [PATCH 1/2] Run GNU root tests at the end This should fix the profiling permission denied error on non-root tests --- util/run-gnu-test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/run-gnu-test.sh b/util/run-gnu-test.sh index 360807013..f478e4058 100755 --- a/util/run-gnu-test.sh +++ b/util/run-gnu-test.sh @@ -31,8 +31,6 @@ export RUST_BACKTRACE=1 if test -n "$1"; then # if set, run only the test passed export RUN_TEST="TESTS=$1" -elif test -n "$CI"; then - sudo make -j "$(nproc)" check-root SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" TEST_SUITE_LOG="tests/test-suite-root.log" || : fi # * timeout used to kill occasionally errant/"stuck" processes (note: 'release' testing takes ~1 hour; 'debug' testing takes ~2.5 hours) @@ -40,3 +38,7 @@ fi # * `srcdir=..` specifies the GNU source directory for tests (fixing failing/confused 'tests/factor/tNN.sh' tests and causing no harm to other tests) #shellcheck disable=SC2086 timeout -sKILL 4h make -j "$(nproc)" check ${RUN_TEST} SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" || : # Kill after 4 hours in case something gets stuck in make + +if test -z "$1" && test -n "$CI"; then + sudo make -j "$(nproc)" check-root SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" TEST_SUITE_LOG="tests/test-suite-root.log" || : +fi From 744592e221ef5b89c08f11750874493c87d5785d Mon Sep 17 00:00:00 2001 From: xxyzz Date: Sun, 20 Feb 2022 19:15:48 +0800 Subject: [PATCH 2/2] Change the owner of gcda files to the current user --- .github/workflows/GnuTests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 91cfd0f3d..9582b2af7 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -261,6 +261,7 @@ jobs: COVERAGE_REPORT_DIR="target/debug" COVERAGE_REPORT_FILE="${COVERAGE_REPORT_DIR}/lcov.info" mkdir -p "${COVERAGE_REPORT_DIR}" + sudo chown -R "$(whoami)" "${COVERAGE_REPORT_DIR}" # display coverage files grcov . --output-type files --ignore build.rs --ignore "vendor/*" --ignore "/*" --ignore "[a-zA-Z]:/*" --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?!|#\[derive\()" | sort --unique # generate coverage report