test-driver (jq-1.5) | : | test-driver (jq-1.6) | ||
---|---|---|---|---|
#! /bin/sh | #! /bin/sh | |||
# test-driver - basic testsuite driver script. | # test-driver - basic testsuite driver script. | |||
scriptversion=2013-07-13.22; # UTC | scriptversion=2013-07-13.22; # UTC | |||
# Copyright (C) 2011-2013 Free Software Foundation, Inc. | # Copyright (C) 2011-2014 Free Software Foundation, Inc. | |||
# | # | |||
# This program is free software; you can redistribute it and/or modify | # This program is free software; you can redistribute it and/or modify | |||
# it under the terms of the GNU General Public License as published by | # it under the terms of the GNU General Public License as published by | |||
# the Free Software Foundation; either version 2, or (at your option) | # the Free Software Foundation; either version 2, or (at your option) | |||
# any later version. | # any later version. | |||
# | # | |||
# This program is distributed in the hope that it will be useful, | # This program is distributed in the hope that it will be useful, | |||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
# GNU General Public License for more details. | # GNU General Public License for more details. | |||
skipping to change at line 109 | skipping to change at line 109 | |||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' | do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' | |||
trap "st=129; $do_exit" 1 | trap "st=129; $do_exit" 1 | |||
trap "st=130; $do_exit" 2 | trap "st=130; $do_exit" 2 | |||
trap "st=141; $do_exit" 13 | trap "st=141; $do_exit" 13 | |||
trap "st=143; $do_exit" 15 | trap "st=143; $do_exit" 15 | |||
# Test script is run here. | # Test script is run here. | |||
"$@" >$log_file 2>&1 | "$@" >$log_file 2>&1 | |||
estatus=$? | estatus=$? | |||
if test $enable_hard_errors = no && test $estatus -eq 99; then | if test $enable_hard_errors = no && test $estatus -eq 99; then | |||
estatus=1 | tweaked_estatus=1 | |||
else | ||||
tweaked_estatus=$estatus | ||||
fi | fi | |||
case $estatus:$expect_failure in | case $tweaked_estatus:$expect_failure in | |||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; | 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; | |||
0:*) col=$grn res=PASS recheck=no gcopy=no;; | 0:*) col=$grn res=PASS recheck=no gcopy=no;; | |||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;; | 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; | |||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; | 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; | |||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; | *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; | |||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;; | *:*) col=$red res=FAIL recheck=yes gcopy=yes;; | |||
esac | esac | |||
# Report the test outcome and exit status in the logs, so that one can | ||||
# know whether the test passed or failed simply by looking at the '.log' | ||||
# file, without the need of also peaking into the corresponding '.trs' | ||||
# file (automake bug#11814). | ||||
echo "$res $test_name (exit status: $estatus)" >>$log_file | ||||
# Report outcome to console. | # Report outcome to console. | |||
echo "${col}${res}${std}: $test_name" | echo "${col}${res}${std}: $test_name" | |||
# Register the test result, and other relevant metadata. | # Register the test result, and other relevant metadata. | |||
echo ":test-result: $res" > $trs_file | echo ":test-result: $res" > $trs_file | |||
echo ":global-test-result: $res" >> $trs_file | echo ":global-test-result: $res" >> $trs_file | |||
echo ":recheck: $recheck" >> $trs_file | echo ":recheck: $recheck" >> $trs_file | |||
echo ":copy-in-global-log: $gcopy" >> $trs_file | echo ":copy-in-global-log: $gcopy" >> $trs_file | |||
# Local Variables: | # Local Variables: | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 12 lines changed or added |