mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Support expected failures in .test-result files.
This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00195.html>, makes it possible for .test-result files for individual tests to contain XPASS and XFAIL rather than PASS and FAIL in cases where failure is expected. This replaces the marking of two individual tests with "-" to cause them to be expected at makefile level to fail; evaluate-test.sh will ensure it exits with status 0 for an expected failure. Tested x86_64. * scripts/evaluate-test.sh: Take new argument indicating whether failure is expected. * Makeconfig (evaluate-test): Pass argument to evaluate-test.sh indicating whether failure is expected. * conform/Makefile (test-xfail-run-conformtest): New variable. ($(objpfx)run-conformtest.out): Don't expect to fail at makefile level. * posix/Makefile (test-xfail-annexc): New variable. ($(objpfx)annexc.out): Don't expect to fail at makefile level.
This commit is contained in:
@ -17,10 +17,12 @@
|
||||
# License along with the GNU C Library; if not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# usage: evaluate-test.sh test_name rc
|
||||
# usage: evaluate-test.sh test_name rc xfail
|
||||
|
||||
test_name=$1
|
||||
rc=$2
|
||||
orig_rc=$rc
|
||||
xfail=$3
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
result="PASS"
|
||||
@ -28,6 +30,11 @@ else
|
||||
result="FAIL"
|
||||
fi
|
||||
|
||||
if $xfail; then
|
||||
result="X$result"
|
||||
rc=0
|
||||
fi
|
||||
|
||||
echo "$result: $test_name"
|
||||
echo "original exit status $rc"
|
||||
echo "original exit status $orig_rc"
|
||||
exit $rc
|
||||
|
Reference in New Issue
Block a user