mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 16:37:31 +09:00
Replace NSS with Pale Moon's
This commit is contained in:
parent
ff1e5e48bf
commit
8c2e376f94
2870 changed files with 1762232 additions and 1374220 deletions
75
security/nss/tests/common/init.sh
Normal file → Executable file
75
security/nss/tests/common/init.sh
Normal file → Executable file
|
|
@ -83,6 +83,7 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
|||
GTESTDIR=${HOSTDIR}/gtests
|
||||
|
||||
PWFILE=${HOSTDIR}/tests.pw
|
||||
LONGPWFILE=${HOSTDIR}/tests.longpw
|
||||
EMPTY_FILE=${HOSTDIR}/tests_empty
|
||||
NOISE_FILE=${HOSTDIR}/tests_noise
|
||||
CORELIST_FILE=${HOSTDIR}/clist
|
||||
|
|
@ -91,6 +92,9 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
|||
FIPSBADPWFILE=${HOSTDIR}/tests.fipsbadpw
|
||||
FIPSP12PWFILE=${HOSTDIR}/tests.fipsp12pw
|
||||
|
||||
echo nss > ${PWFILE}
|
||||
echo "nss123456789012345678901234567890123456789012345678901234567890_" > ${LONGPWFILE}
|
||||
echo > ${EMPTY_FILE}
|
||||
echo "fIps140" > ${FIPSPWFILE}
|
||||
echo "fips104" > ${FIPSBADPWFILE}
|
||||
echo "pKcs12fips140" > ${FIPSP12PWFILE}
|
||||
|
|
@ -253,6 +257,72 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
|||
HTML_UNKNOWN='</TD><TD>Unknown</TD><TR>'
|
||||
TABLE_ARGS=
|
||||
|
||||
gtest_parse_report_helper()
|
||||
{
|
||||
# Check XML reports for normal test runs and failures.
|
||||
local successes=$(gtest_parse_report_xpath "//testcase[@status='run'][count(*)=0]" "$@" )
|
||||
local failures=$(gtest_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
|
||||
}
|
||||
|
||||
# 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.
|
||||
gtest_parse_report_legacy()
|
||||
{
|
||||
while read result name && [ -n "$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 <<< "$(sed -f "${COMMON}/parsegtestreport.sed" "$@" )"
|
||||
# here's how we would use bash if it wasn't so slow
|
||||
# done <<< "$(sh "${COMMON}/parsegtestreport.sh" "$@" )"
|
||||
}
|
||||
|
||||
gtest_parse_report_xpath()
|
||||
{
|
||||
# Query the XML report with the given XPath pattern.
|
||||
xpath="$1"
|
||||
shift
|
||||
xmllint --xpath "${xpath}" "$@" 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"
|
||||
# here's how we would use bash if it wasn't so slow
|
||||
#sh "${COMMON}/parsegtestreport.sh"
|
||||
}
|
||||
|
||||
gtest_parse_report()
|
||||
{
|
||||
if type xmllint &>/dev/null; then
|
||||
echo "DEBUG: Using xmllint to parse GTest XML report(s)"
|
||||
gtest_parse_report_helper "$@"
|
||||
else
|
||||
echo "DEBUG: Falling back to legacy XML report parsing using only sed"
|
||||
gtest_parse_report_legacy "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
#directory name init
|
||||
SCRIPTNAME=init.sh
|
||||
|
|
@ -593,6 +663,7 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
|||
fi
|
||||
|
||||
R_PWFILE=../tests.pw
|
||||
R_LONGPWFILE=../tests.longpw
|
||||
R_EMPTY_FILE=../tests_empty
|
||||
R_NOISE_FILE=../tests_noise
|
||||
|
||||
|
|
@ -651,9 +722,9 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
|
|||
|
||||
RELOAD_CRL=1
|
||||
|
||||
# if test mode isn't set, test scripts default to expecting dbm
|
||||
# if test mode isn't set, test scripts default to expecting sql
|
||||
if [ "${TEST_MODE}" = "" ]; then
|
||||
NSS_DEFAULT_DB_TYPE="dbm"
|
||||
NSS_DEFAULT_DB_TYPE=${NSS_DEFAULT_DB_TYPE:-"sql"}
|
||||
export NSS_DEFAULT_DB_TYPE
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue