summaryrefslogtreecommitdiff
path: root/tests/c.at
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-08-20 11:04:20 -0400
committerZack Weinberg <zackw@panix.com>2020-08-20 14:07:59 -0400
commit1a5ed4566952f5b2ad854939357ff4b6ec2de180 (patch)
treead4a3485a5b20166389b825e9e22e58f757b1654 /tests/c.at
parent6c2d3e8edcc06860d3aa476adc2083e958d0837a (diff)
downloadautoconf-1a5ed4566952f5b2ad854939357ff4b6ec2de180.tar.gz
tests: New helper macro AT_CHECK_MAKE.
This macro factors out some repeated code surrounding tests that run make, such as honoring $MAKE, *not* honoring $MAKEFLAGS, and normalizing the exit status. Partially addresses bug #110267 (problems with Sun’s make barfing on GNU make options from $MAKEFLAGS). Also addresses some unrelated problems I noticed while changing all the tests that run make to use this macro: The shtool test is now properly skipped if shtool is not available on the host system. Some of the Fortran tests would create an executable and then run it, others would create an executable and then the AT_CHECK operation that would run it was commented out. There’s no evidence in the changelog or the git history for why this was done. I uncommented all of the commented-out cases; this can be undone easily if it causes problems. (It can’t be an issue with cross-compilation because some of the tests do run the executable.) * tests/local.at (AT_CHECK_MAKE): New macro wrapping an AT_CHECK invocation of make. All tests that run make updated to use this macro. * tests/fortran.at: Uncomment all AT_CHECKs that run the just-compiled program. * tests/foreign.at (shtool): Skip the test if shtool is not available from the host system. Simplify shell logic.
Diffstat (limited to 'tests/c.at')
-rw-r--r--tests/c.at24
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/c.at b/tests/c.at
index b1dabd14..d13b321e 100644
--- a/tests/c.at
+++ b/tests/c.at
@@ -326,11 +326,11 @@ class foo { int x; };
class foo foobar;
]])
-AT_CHECK([autoconf])
-AT_CHECK([autoheader])
-AT_CHECK([./configure $configure_options], [], [ignore], [ignore])
-AT_CHECK([${MAKE-make} cpp-works || exit 77], [], [ignore], [ignore])
-AT_CHECK([${MAKE-make}], [], [ignore], [ignore])
+AT_CHECK_AUTOCONF
+AT_CHECK_AUTOHEADER([], [restrict])
+AT_CHECK_CONFIGURE
+AT_CHECK_MAKE([cpp-works || exit 77])
+AT_CHECK_MAKE
AT_CLEANUP
@@ -381,10 +381,9 @@ int main (void)
}
]])
-: "${MAKE=make}"
-AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore])
-AT_CHECK([./configure $configure_options], [], [ignore], [ignore])
-AT_CHECK([$MAKE], [], [ignore], [ignore])
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE
+AT_CHECK_MAKE
AT_CLEANUP
@@ -424,9 +423,8 @@ AT_DATA([foo.cpp],
}
]])
-: "${MAKE=make}"
-AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore])
-AT_CHECK([./configure $configure_options], [], [ignore], [ignore])
-AT_CHECK([$MAKE], [], [ignore], [ignore])
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE
+AT_CHECK_MAKE
AT_CLEANUP