[Privoxy-commits] [privoxy] 01/03: run-privoxy-tests.sh: Add -c option to continue in case of failures
User Git
git at git.privoxy.org
Sun Jan 12 16:52:27 CET 2025
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 0198f49d9a7dd8b95278cc44276338c313f26198
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sun Jan 12 15:14:20 2025 +0100
run-privoxy-tests.sh: Add -c option to continue in case of failures
---
tests/cts/run-privoxy-tests.sh | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/tests/cts/run-privoxy-tests.sh b/tests/cts/run-privoxy-tests.sh
index 1b3e469f..c45419bd 100755
--- a/tests/cts/run-privoxy-tests.sh
+++ b/tests/cts/run-privoxy-tests.sh
@@ -119,10 +119,17 @@ main() {
local test_scenario=""
local test_scenarios=""
local start_privoxy=true
+ local ignore_errors=false
+ local scenarios_with_errors=""
while [ -n "$1" ];
do
case "$1" in
+ "-c")
+ echo "Continuing in case of test failures."
+ ignore_errors=true
+ shift
+ ;;
"-r")
echo "Not starting privoxy."
start_privoxy=false
@@ -146,12 +153,21 @@ main() {
for test_scenario in ${test_scenarios}; do
if [ "${test_scenario}" = "${UPSTREAM_TEST_SCENARIO}" ]; then
- run_upstream_tests ${start_privoxy} || exit 1
+ run_upstream_tests ${start_privoxy}
else
- run_privoxy_tests ${start_privoxy} "${test_scenario}" || exit 1
+ run_privoxy_tests ${start_privoxy} "${test_scenario}"
+ fi
+ if [ $? != 0 ]; then
+ scenarios_with_errors="${scenarios_with_errors} ${test_scenario}"
+ ${ignore_errors} || exit 1
fi
done
+ if [ -n "${scenarios_with_errors}" ]; then
+ echo "The following test scenarios had at least one error:${scenarios_with_errors}"
+ exit 1
+ fi
+
exit 0
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list