mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 03:55:31 +00:00
Add option to preserve all logs in ssl-opt.sh
Useful to also allow saving of correct logs in order to compare differences with failed logs
This commit is contained in:
parent
9911faa1b4
commit
73b851d23b
|
@ -36,6 +36,8 @@ EXCLUDE='^$'
|
|||
SHOW_TEST_NUMBER=0
|
||||
RUN_TEST_NUMBER=''
|
||||
|
||||
PRESERVE_LOGS=0
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: $0 [options]"
|
||||
printf " -h|--help\tPrint this help.\n"
|
||||
|
@ -44,6 +46,7 @@ print_usage() {
|
|||
printf " -e|--exclude\tMatching tests are excluded (default: '$EXCLUDE')\n"
|
||||
printf " -n|--number\tExecute only numbered test (comma-separated, e.g. '245,256')\n"
|
||||
printf " -s|--show-numbers\tShow test numbers in front of test names\n"
|
||||
printf " -p|--preserve-logs\tPreserve logs of successful tests as well\n"
|
||||
}
|
||||
|
||||
get_options() {
|
||||
|
@ -64,6 +67,9 @@ get_options() {
|
|||
-s|--show-numbers)
|
||||
SHOW_TEST_NUMBER=1
|
||||
;;
|
||||
-p|--preserve-logs)
|
||||
PRESERVE_LOGS=1
|
||||
;;
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
|
@ -485,6 +491,11 @@ run_test() {
|
|||
|
||||
# if we're here, everything is ok
|
||||
echo "PASS"
|
||||
if [ "$PRESERVE_LOGS" -gt 0 ]; then
|
||||
mv $SRV_OUT o-srv-${TESTS}.log
|
||||
mv $CLI_OUT o-cli-${TESTS}.log
|
||||
fi
|
||||
|
||||
rm -f $SRV_OUT $CLI_OUT $PXY_OUT
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue