From 6ba992b1f9aa56930553e4c900ec2f14b7f52e72 Mon Sep 17 00:00:00 2001 From: Igor Todorovski Date: Mon, 19 Sep 2022 17:00:54 -0400 Subject: [PATCH 1/2] Update zopen_check_results --- buildenv | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/buildenv b/buildenv index efbb10f..7a61790 100644 --- a/buildenv +++ b/buildenv @@ -26,26 +26,15 @@ else ln -s git-patches patches fi +export ZOPEN_EXPECTED_FAILURES=4 + zopen_check_results() { -# m4 check should have 4 (or 3) failures (3 if a git build) -# Determine number of failures by looking at testcases on line _after_ 'Failed checks were:' line -# -dir="$1" -pfx="$2" -chk="$1/$2_check.log" +chk="$2_check.log" +totalTests=$(cat "${chk}" | grep "^Checking .*" | wc -l) start_line=$(cat "${chk}" | egrep -n '^Failed checks were:' | awk -F':' '{ print $1 }') -if [ $? -eq 0 ]; then - failures=$(cat "${chk}" | tail +${start_line} | head -2 | tail -1 | wc -w) - if [ ${failures} -eq 0 ]; then - return $ZOPEN_TEST_STATUS_ALL_PASSED - elif [ ${failures} -gt 4 ]; then - return $ZOPEN_TEST_STATUS_SOME_PASSED - else - return $ZOPEN_TEST_STATUS_MOST_PASSED - fi -fi -return $ZOPEN_TEST_STATUS_ERROR +failures=$(cat "${chk}" | tail +${start_line} | head -2 | tail -1 | wc -w) +echo "$failures|$totalTests" } From 071e22d1777bab0999204d23fbfc6f34c52ccc1f Mon Sep 17 00:00:00 2001 From: Igor Todorovski Date: Tue, 20 Sep 2022 21:01:19 -0400 Subject: [PATCH 2/2] Update infrastructure --- buildenv | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/buildenv b/buildenv index 7a61790..827f797 100644 --- a/buildenv +++ b/buildenv @@ -26,8 +26,6 @@ else ln -s git-patches patches fi -export ZOPEN_EXPECTED_FAILURES=4 - zopen_check_results() { chk="$2_check.log" @@ -35,6 +33,11 @@ chk="$2_check.log" totalTests=$(cat "${chk}" | grep "^Checking .*" | wc -l) start_line=$(cat "${chk}" | egrep -n '^Failed checks were:' | awk -F':' '{ print $1 }') failures=$(cat "${chk}" | tail +${start_line} | head -2 | tail -1 | wc -w) -echo "$failures|$totalTests" + +cat <