allow running only specific tests

It's now possible to run only a subset of the tests with:

	./runtime test1 test2 ...
This commit is contained in:
Omar Polo 2021-10-04 09:30:18 +00:00
parent c1272f63e4
commit 4a2a525d7c
2 changed files with 19 additions and 5 deletions

View File

@ -35,6 +35,15 @@ port $port
fi
}
tests_done() {
if [ "$failed" != "" ]; then
echo
echo "failed tests:$failed"
exit 1
fi
exit 0
}
# usage: gen_config <global config> <server config>
# generates a configuration file reg.conf
gen_config() {

View File

@ -16,6 +16,15 @@ rm -f gmid.pid
trap 'onexit' INT TERM EXIT
if [ $# -ne 0 ]; then
while [ $# -ne 0 ]; do
run_test $1
shift
done
tests_done
fi
run_test test_configless_mode
run_test test_static_files
run_test test_directory_redirect
@ -41,8 +50,4 @@ run_test test_fastcgi
run_test test_macro_expansion
run_test test_174_bugfix
if [ "$failed" != "" ]; then
echo
echo "failed tests:$failed"
exit 1
fi
tests_done