# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests harness does not hit errors due to
-# an exceeded command line length when there are many tests.
+# Check that the parallel testsuite harness does not hit errors due
+# to an exceeded command line length when there are many tests.
# For automake bug#7868. This test is currently expected to fail.
-. ./defs || Exit 1
+. ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
mkdir $new_deepdir || break
tmpfile=$new_deepdir/$tname-some-more-chars-for-good-measure
if touch $tmpfile; then
- rm -f $tmpfile || Exit 99
+ rm -f $tmpfile || exit 99
else
- rmdir $new_deepdir || Exit 99
+ rmdir $new_deepdir || exit 99
fi
deepdir=$new_deepdir
unset tmpfile new_deepdir
print " \\\n";
}
}
- ' > list-of-tests.am || Exit 99
- sed 20q list-of-tests.am || Exit 99 # For debugging.
+ ' > list-of-tests.am || exit 99
+ sed 20q list-of-tests.am || exit 99 # For debugging.
$AUTOMAKE Makefile \
|| framework_failure_ "unexpected automake failure"
./config.status Makefile \
for count in 1 2 4 8 12 16 20 24 28 32 48 64 96 128 E_HUGE; do
test $count = E_HUGE && break
- count=`expr $count '*' 100` || Exit 99
+ count=$(($count * 100))
setup_data
if $MAKE this-will-fail; then
continue
# hit the system command-line limits; we can stop. But first, for
# good measure, increase the number of tests of some 20%, to be
# "even more sure" of really tickling command line length limits.
- count=`expr '(' $count '*' 12 ')' / 10` || Exit 99
+ count=$(($count * 12))
+ count=$(($count / 10))
setup_data
break
fi
&& test -f $deepdir/$tname-1.log \
|| framework_failure_ "\"make check\" with one single tests"
-rm -f $deepdir/* || Exit 99
+rm -f $deepdir/* || exit 99
-$MAKE check > stdout || { cat stdout; Exit 1; }
+$MAKE check > stdout || { cat stdout; exit 1; }
cat stdout
grep "^# TOTAL: $count$" stdout
sed 20q lst # For debugging.
sed 20q grp # Likewise.
-test `cat <grp | wc -l` -eq $count
-test `cat <lst | wc -l` -eq $count
+test $(cat <grp | wc -l) -eq $count
+test $(cat <lst | wc -l) -eq $count
# We need to simulate a failure of two tests.
st=0
env TESTS="$deepdir/$tname-1.test $deepdir/$tname-2.test" \
TEST_LOG_COMPILER=false $MAKE -e check > stdout && st=1
cat stdout
-test `grep -c '^FAIL:' stdout` -eq 2 || st=1
+test $(grep -c '^FAIL:' stdout) -eq 2 || st=1
test $st -eq 0 || fatal_ "couldn't simulate failure of two tests"
unset st
-$MAKE recheck > stdout || { cat stdout; Exit 1; }
+$MAKE recheck > stdout || { cat stdout; exit 1; }
cat stdout
grep "^PASS: .*$tname-1\.test" stdout
grep "^PASS: .*$tname-2\.test" stdout
-test `LC_ALL=C grep -c "^[A-Z][A-Z]*:" stdout` -eq 2
+test $(LC_ALL=C grep -c "^[A-Z][A-Z]*:" stdout) -eq 2
grep "^# TOTAL: 2$" stdout
grep "^# PASS: 2$" stdout
# "make clean" might ignore some failures, so we prefer to also grep its
# output to ensure that no "Argument list too long" error was encountered.
-$MAKE clean >output 2>&1 || { cat output; Exit 1; }
+$MAKE clean >output 2>&1 || { cat output; exit 1; }
cat output
-grep -i 'list.* too long' output && Exit 1
-ls $deepdir | grep '\.log$' && Exit 1
+grep -i 'list.* too long' output && exit 1
+ls $deepdir | grep '\.log$' && exit 1
: