mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
maint/CICD ~ (GnuTests) display sub-step test comparison failures more prominently
This commit is contained in:
parent
299fe4e22a
commit
0af2c9bafb
1 changed files with 12 additions and 8 deletions
20
.github/workflows/GnuTests.yml
vendored
20
.github/workflows/GnuTests.yml
vendored
|
@ -160,34 +160,38 @@ jobs:
|
||||||
- name: Compare test failures VS reference
|
- name: Compare test failures VS reference
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
have_new_failures=""
|
||||||
REF_LOG_FILE='${{ steps.vars.outputs.path_reference }}/test-logs/test-suite.log'
|
REF_LOG_FILE='${{ steps.vars.outputs.path_reference }}/test-logs/test-suite.log'
|
||||||
REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json'
|
REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json'
|
||||||
if test -f "${REF_LOG_FILE}"; then
|
if test -f "${REF_LOG_FILE}"; then
|
||||||
echo "Reference SHA1/ID (of '${REF_SUMMARY_FILE}'): $(sha1sum -- "${REF_SUMMARY_FILE}")"
|
echo "Reference SHA1/ID: $(sha1sum -- "${REF_SUMMARY_FILE}")"
|
||||||
REF_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" "${REF_LOG_FILE}" | sort)
|
REF_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" "${REF_LOG_FILE}" | sort)
|
||||||
NEW_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" '${{ steps.vars.outputs.path_GNU_tests }}/test-suite.log' | sort)
|
NEW_FAILING=$(sed -n "s/^FAIL: \([[:print:]]\+\).*/\1/p" '${{ steps.vars.outputs.path_GNU_tests }}/test-suite.log' | sort)
|
||||||
for LINE in $REF_FAILING
|
for LINE in ${REF_FAILING}
|
||||||
do
|
do
|
||||||
if ! grep -Fxq $LINE<<<"$NEW_FAILING"; then
|
if ! grep -Fxq ${LINE}<<<"${NEW_FAILING}"; then
|
||||||
echo "::warning ::Congrats! The gnu test $LINE is now passing!"
|
echo "::warning ::Congrats! The gnu test ${LINE} is now passing!"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for LINE in $NEW_FAILING
|
for LINE in ${NEW_FAILING}
|
||||||
do
|
do
|
||||||
if ! grep -Fxq $LINE<<<"$REF_FAILING"
|
if ! grep -Fxq ${LINE}<<<"${REF_FAILING}"
|
||||||
then
|
then
|
||||||
echo "::error ::GNU test failed: $LINE. $LINE is passing on '${{ steps.vars.outputs.repo_default_branch }}'. Maybe you have to rebase?"
|
echo "::error ::GNU test failed: ${LINE}. ${LINE} is passing on '${{ steps.vars.outputs.repo_default_branch }}'. Maybe you have to rebase?"
|
||||||
|
have_new_failures="true"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "::warning ::Skipping test failure comparison; no prior reference test logs are available."
|
echo "::warning ::Skipping test failure comparison; no prior reference test logs are available."
|
||||||
fi
|
fi
|
||||||
|
if test -n "${have_new_failures}" ; then exit -1 ; fi
|
||||||
- name: Compare test summary VS reference
|
- name: Compare test summary VS reference
|
||||||
|
if: success() || failure() # run regardless of prior step success/failure
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json'
|
REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json'
|
||||||
if test -f "${REF_SUMMARY_FILE}"; then
|
if test -f "${REF_SUMMARY_FILE}"; then
|
||||||
echo "Reference SHA1/ID (of '${REF_SUMMARY_FILE}'): $(sha1sum -- "${REF_SUMMARY_FILE}")"
|
echo "Reference SHA1/ID: $(sha1sum -- "${REF_SUMMARY_FILE}")"
|
||||||
mv "${REF_SUMMARY_FILE}" main-gnu-result.json
|
mv "${REF_SUMMARY_FILE}" main-gnu-result.json
|
||||||
python uutils/util/compare_gnu_result.py
|
python uutils/util/compare_gnu_result.py
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue