#! /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
# correct test script(s)
# - "make distcheck" works
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
mkdir build
cd build
srcdir=..
- run_make=$MAKE
+ am_make=$MAKE
elif test $try -eq 1; then
# In-tree parallel build.
srcdir=.
*\ -j*)
# Degree of parallelism already specified by the user: do
# not override it.
- run_make=$MAKE
+ :
;;
*)
# Some make implementations (e.g., HP-UX) don't grok '-j',
# space between '-j' and the number of jobs (e.g., Solaris
# dmake). We need a runtime test to see what works.
echo 'all:' > Makefile
- for run_make in "$MAKE -j3" "$MAKE -j 3" "$MAKE"; do
- $run_make && break
+ for am_make in "$MAKE -j3" "$MAKE -j 3" "$MAKE"; do
+ $am_make && break
done
rm -f Makefile
+ MAKE=$am_make
+ unset am_make
;;
esac
else
# Success.
- # Use append mode here to avoid dropping output. See automake bug#11413.
- # Also, use 'echo' here to "nullify" the previous contents of 'stdout',
- # since Solaris 10 /bin/sh would try to optimize a ':' away after the
- # first iteration, even if it is redirected.
- echo " " >stdout
- $run_make check >>stdout || { cat stdout; exit 1; }
- cat stdout
+ run_make -O check
count_test_results total=6 pass=4 fail=0 xpass=0 xfail=1 skip=1 error=0
grep '^PASS: 1\.test 1 - mu$' stdout
grep '^SKIP: 1\.test 2 zardoz # SKIP$' stdout
# Failure.
- # Use 'echo' here, since Solaris 10 /bin/sh would try to optimize
- # a ':' away after the first iteration, even if it is redirected.
- echo dummy > not-skip
- echo dummy > bail-out
- # Use append mode here to avoid dropping output. See automake bug#11413.
- # Also, use 'echo' here to "nullify" the previous contents of 'stdout',
- # since Solaris 10 /bin/sh would try to optimize a ':' away after the
- # first iteration, even if it is redirected.
- echo " " >stdout
- $run_make check >>stdout && { cat stdout; exit 1; }
- cat stdout
+ : > not-skip
+ : > bail-out
+ run_make -e FAIL -O check
count_test_results total=7 pass=4 fail=1 xpass=0 xfail=1 skip=0 error=1
grep '^PASS: 1\.test 1 - mu$' stdout
grep '^FAIL: 1\.test 2 zardoz$' stdout