summaryrefslogtreecommitdiff
path: root/tests/gtests
diff options
context:
space:
mode:
authorRobert Relyea <rrelyea@redhat.com>2021-07-15 15:59:36 -0700
committerRobert Relyea <rrelyea@redhat.com>2021-07-15 15:59:36 -0700
commitdbb32786e08ca7cf654a7631dd525c9768d0d9b6 (patch)
tree7a91bda50813311f0ff5f3246691576c26bca6cd /tests/gtests
parent42861f66c7a68ea46fab490ab9e4065d7170e109 (diff)
downloadnss-hg-dbb32786e08ca7cf654a7631dd525c9768d0d9b6.tar.gz
Bug 1720230 Gtest update changed the gtest reports, losing gtest details in all.sh reports.
This patch includes the updated .sed script, and an experiment using bash instead to see how hard it would be to make a more robust parser. The robust parser generates identical output as sed, but takes about 30x longer, so instead of subsecond operations, it takes almost half a minute. With that result, I think we can stay with sed and continue to update when we get new versions of gtests. (sigh). time cat report.xml.0 | sed -f parsegtestreport.sed > r1 real 0m0.710s user 0m0.705s sys 0m0.008s time cat report.xml.0 | sh parsegtestreport.sh > r2 real 0m25.066s user 0m17.759s sys 0m9.506s [rrelyea@localhost common]$ diff r1 r2 updated: with review comments from Martin and move the report parsing to the common code so it can be shared with both ssl_gtests and gtests shell scripts. Differential Revision: https://phabricator.services.mozilla.com/D120028
Diffstat (limited to 'tests/gtests')
-rwxr-xr-xtests/gtests/gtests.sh12
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/gtests/gtests.sh b/tests/gtests/gtests.sh
index 4005a16a6..8c6047736 100755
--- a/tests/gtests/gtests.sh
+++ b/tests/gtests/gtests.sh
@@ -86,18 +86,8 @@ gtest_start()
fi
echo "test output dir: ${GTESTREPORT}"
- echo "executing sed to parse the xml report"
- sed -f "${COMMON}/parsegtestreport.sed" "$GTESTREPORT" > "$PARSED_REPORT"
echo "processing the parsed report"
- cat "$PARSED_REPORT" | while read result name; do
- if [ "$result" = "notrun" ]; then
- echo "$name" SKIPPED
- elif [ "$result" = "run" ]; then
- html_passed_ignore_core "$name"
- else
- html_failed_ignore_core "$name"
- fi
- done
+ gtest_parse_report ${GTESTREPORT}
popd
done
}