| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 | #! /bin/sh# Copyright (C) 2008-2017 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# the Free Software Foundation; either version 2, or (at your option)# any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## 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 subdir TESTS.# For gen-testsuite-part: ==> try-with-serial-tests <==required='cc native'. test-init.shcat >> configure.ac << 'END'AC_PROG_CCAC_OUTPUTENDcat > Makefile.am << 'END'AUTOMAKE_OPTIONS = subdir-objectsTESTS = foo sub/foo $(check_PROGRAMS)XFAIL_TESTS = foo sub/bazcheck_PROGRAMS = bar sub/bar baz sub/bazENDmkdir subcat > foo <<'END'#! /bin/shtest -f "$srcdir/Makefile.am"ENDcat > sub/foo <<'END'#! /bin/shtest -f "$srcdir/Makefile.am"ENDchmod a+x foo sub/foocat > bar.c <<'END'int main (void) { return 0; }ENDcat > sub/bar.c <<'END'int main (void) { return 0; }ENDcat > baz.c <<'END'#include <stdlib.h>int main (void) { return EXIT_FAILURE; }ENDcat > sub/baz.c <<'END'#include <stdlib.h>int main (void) { return EXIT_FAILURE; }END$ACLOCAL$AUTOCONF$AUTOMAKE -a./configurerun_make -E -O -e FAIL checkgrep 'XPASS.* foo$' stdoutgrep '^[^X]*PASS.* sub/foo$' stdoutgrep '^[^X]*PASS.* bar' stdoutgrep '^[^X]*PASS.* sub/bar' stdoutgrep '^[^X]*FAIL.* baz' stdoutgrep 'XFAIL.* sub/baz' stdout# The parallel test driver should cause circular dependencies.# Look for known warnings from a couple of 'make' implementations.grep -i 'circular.*dependency' stderr && exit 1grep -i 'graph cycles' stderr && exit 1$MAKE distcleanmkdir buildcd build../configurerun_make -O -e FAIL check# Note: we are not grepping for the space in the lines from the 'foo'# tests, due to the Solaris make VPATH rewriting (if we fix that, we# can still write a separate test for it).grep 'XPASS.*foo$' stdoutgrep '^[^X]*PASS.*sub/foo$' stdoutgrep '^[^X]*PASS.* bar' stdoutgrep '^[^X]*PASS.* sub/bar' stdoutgrep '^[^X]*FAIL.* baz' stdoutgrep 'XFAIL.* sub/baz' stdout:
 |