From 882b5ad1f162da14d591c56b1006d7ef26ca5375 Mon Sep 17 00:00:00 2001 From: James Robson Date: Sun, 8 Aug 2021 15:48:38 +0100 Subject: [PATCH] Display changes in the failing GNU tests Co-authored-by: Michael Debertol --- .github/workflows/GnuTests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index fe225d2fa..dad53f20c 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -98,6 +98,32 @@ jobs: repo: uutils/coreutils branch: master path: dl + - name: Download the log + uses: dawidd6/action-download-artifact@v2 + with: + workflow: GnuTests.yml + name: test-report + repo: uutils/coreutils + branch: master + path: dl + - name: Compare failing tests against master + shell: bash + run: | + OLD_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" dl/test-suite.log | sort) + NEW_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" gnu/tests/test-suite.log | sort) + for LINE in $OLD_FAILING + do + if ! grep -Fxq $LINE<<<"$NEW_FAILING"; then + echo "::warning ::Congrats! The gnu test $LINE is now passing!" + fi + done + for LINE in $NEW_FAILING + do + if ! grep -Fxq $LINE<<<"$OLD_FAILING" + then + echo "::error ::GNU test failed: $LINE. $LINE is passing on 'master'. Maybe you have to rebase?" + fi + done - name: Compare against master results shell: bash run: |