mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
re-introduce old nss im too tired for this
This commit is contained in:
parent
3c46be320d
commit
3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions
53
security/nss/tests/ssl_gtests/ssl_gtests.sh
Executable file → Normal file
53
security/nss/tests/ssl_gtests/ssl_gtests.sh
Executable file → Normal file
|
|
@ -59,7 +59,6 @@ ssl_gtest_certs() {
|
|||
make_cert dsa dsa sign
|
||||
make_cert delegator_ecdsa256 delegator_p256 sign
|
||||
make_cert delegator_rsae2048 delegator_rsae2048 sign
|
||||
make_cert delegator_rsa_pss2048 delegator_rsa_pss2048 sign
|
||||
}
|
||||
|
||||
############################## ssl_gtest_init ##########################
|
||||
|
|
@ -133,7 +132,13 @@ ssl_gtest_start()
|
|||
html_msg $? 0 "ssl_gtests ran successfully"
|
||||
|
||||
# Parse XML report(s).
|
||||
gtest_parse_report "${SSLGTESTREPORT}".*
|
||||
if type xmllint &>/dev/null; then
|
||||
echo "DEBUG: Using xmllint to parse GTest XML report(s)"
|
||||
parse_report
|
||||
else
|
||||
echo "DEBUG: Falling back to legacy XML report parsing using only sed"
|
||||
parse_report_legacy
|
||||
fi
|
||||
}
|
||||
|
||||
# Helper function used when 'parallel' isn't available.
|
||||
|
|
@ -142,6 +147,50 @@ parallel_fallback()
|
|||
eval "${@//\{\}/0}"
|
||||
}
|
||||
|
||||
parse_report()
|
||||
{
|
||||
# Check XML reports for normal test runs and failures.
|
||||
local successes=$(parse_report_xpath "//testcase[@status='run'][count(*)=0]")
|
||||
local failures=$(parse_report_xpath "//failure/..")
|
||||
|
||||
# Print all tests that succeeded.
|
||||
while read result name; do
|
||||
html_passed_ignore_core "$name"
|
||||
done <<< "$successes"
|
||||
|
||||
# Print failing tests.
|
||||
if [ -n "$failures" ]; then
|
||||
printf "\nFAILURES:\n=========\n"
|
||||
|
||||
while read result name; do
|
||||
html_failed_ignore_core "$name"
|
||||
done <<< "$failures"
|
||||
|
||||
printf "\n"
|
||||
fi
|
||||
}
|
||||
|
||||
parse_report_xpath()
|
||||
{
|
||||
# Query the XML report with the given XPath pattern.
|
||||
xmllint --xpath "$1" "${SSLGTESTREPORT}".* 2>/dev/null | \
|
||||
# Insert newlines to help sed.
|
||||
sed $'s/<testcase/\\\n<testcase/g' | \
|
||||
# Use sed to parse the report.
|
||||
sed -f "${COMMON}/parsegtestreport.sed"
|
||||
}
|
||||
|
||||
# This legacy report parser can't actually detect failures. It always relied
|
||||
# on the binary's exit code. Print the tests we ran to keep the old behavior.
|
||||
parse_report_legacy()
|
||||
{
|
||||
while read result name && [ -n "$name" ]; do
|
||||
if [ "$result" = "run" ]; then
|
||||
html_passed_ignore_core "$name"
|
||||
fi
|
||||
done <<< "$(sed -f "${COMMON}/parsegtestreport.sed" "${SSLGTESTREPORT}".*)"
|
||||
}
|
||||
|
||||
ssl_gtest_cleanup()
|
||||
{
|
||||
cd ${QADIR}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue