2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Sanity check for the automake testsuite.
18 # Check that our testsuite framework can be instructed not to consider
19 # an early exit due to some command exiting unexpectedly with status 77.
26 unset am_explicit_skips stderr_fileno_
27 AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
29 # FIXME: this can be simplified when we improve our runtime checks on the
30 # testsuite shell to ensure it supports "VAR=val shell_func" correctly.
33 env $2 $AM_TEST_RUNNER_SHELL -c "
40 run_dummy_test '(exit 77); exit 77'
41 test $? -eq 77 || exit 1
43 run_dummy_test 'sh -c "exit 77"' am_explicit_skips=no
44 test $? -eq 77 || exit 1
46 run_dummy_test '(exit 77); exit 77' am_explicit_skips=yes
47 test $? -eq 78 || exit 1
49 run_dummy_test 'sh -c "exit 77"' am_explicit_skips=y
50 test $? -eq 78 || exit 1
52 run_dummy_test 'exit 77' am_explicit_skips=yes
53 test $? -eq 77 || exit 1
55 run_dummy_test 'skip_ "foo"' am_explicit_skips=y
56 test $? -eq 77 || exit 1