From cead7121185b67b3313625f96034ea98cea92e1c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 22 Feb 2022 14:30:56 -0500 Subject: [PATCH] ci: Fix GNU testsuite comparison The uploaded log artifact maintains the directory structure, so just compare it directly to the GNU find directory. --- .github/workflows/compat.yml | 4 +--- util/diff-gnu.sh | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 7bf4a86..09bb76d 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -70,9 +70,7 @@ jobs: - name: Compare failing tests against master shell: bash run: | - mkdir -p ./logs - cp findutils.gnu/{tests,{find,xargs}/testsuite}/*.log ./logs - ./findutils/util/diff-gnu.sh dl logs + ./findutils/util/diff-gnu.sh ./dl ./findutils.gnu - name: Compare against main results shell: bash run: | diff --git a/util/diff-gnu.sh b/util/diff-gnu.sh index 107cce0..f29f358 100755 --- a/util/diff-gnu.sh +++ b/util/diff-gnu.sh @@ -6,10 +6,10 @@ export LC_COLLATE=C # Extract the failing test lines from log files failing_tests() { - sed -En 's/FAIL: ([^,:]*)[,:].*/\1/p' "$@" | sort + sed -En 's/FAIL: ([^,:]*)[,:].*/\1/p' "$1"/{tests,{find,xargs}/testsuite}/*.log | sort } -comm -3 <(failing_tests $1/*.log) <(failing_tests $2/*.log) | tr '\t' ',' | while IFS=, read old new foo; do +comm -3 <(failing_tests "$1") <(failing_tests "$2") | tr '\t' ',' | while IFS=, read old new foo; do if [ -n "$old" ]; then echo "::warning ::Congrats! The GNU test $old is now passing!" fi