tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / test-driver-custom-xfail-tests.sh
old mode 100755 (executable)
new mode 100644 (file)
index c19e69f..a7828c0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #
 # 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
@@ -16,7 +16,7 @@
 
 # Custom test drivers: "abstract" XFAIL_TESTS support.
 
-. ./defs || exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([nihil], [])
@@ -141,8 +141,7 @@ $AUTOMAKE
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O check
 test $(grep -c '^PASS:'  stdout) -eq 3
 test $(grep -c '^XFAIL:' stdout) -eq 13
 
@@ -150,8 +149,7 @@ for dir in sub1 sub2; do
   cd $dir
   cp pass.test x1.test
   cp x2.test pass.test
-  $MAKE check >stdout && { cat stdout; exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   test "$(cat pass.trs)" = ":test-result: FAIL"
   test "$(cat x1.trs)"   = ":test-result: XPASS"
   test "$(cat x2.trs)"   = ":test-result: XFAIL"