]> git.draconx.ca Git - dxcommon.git/blob - testsuite.at
tests: Don't use AT_TESTED for optional build tools.
[dxcommon.git] / testsuite.at
1 AT_COPYRIGHT([dnl
2 Copyright © 2015,2019-2023 Nick Bowler
3 License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 This is free software: you are free to do what the fuck you want to.
5 There is NO WARRANTY, to the extent permitted by law.])
6
7 AT_INIT
8 AT_COLOR_TESTS
9
10 m4_divert_push([PREPARE_TESTS])dnl
11 {
12   AS_ECHO(["% prove --version"])
13   prove --version </dev/null
14   echo
15 } >&AS_MESSAGE_LOG_FD 2>&1
16
17 # Reduce influence from the toplevel "make" invocation on test cases.
18 AS_UNSET([MAKEFLAGS])
19 AS_UNSET([MAKELEVEL])
20 AS_UNSET([MFLAGS])
21 m4_divert_pop([PREPARE_TESTS])
22
23 m4_define([TEST_CONFIGURE_AC], [AT_KEYWORDS([autoconf m4])dnl
24 AT_DATA([configure.ac],
25 [[AC_INIT([test], [0])
26 ]$1[
27 AC_OUTPUT
28 ]])
29 cp "$srcdir/install-sh" \
30    "$srcdir/depcomp" \
31    "$srcdir/missing" \
32    "$srcdir/compile" \
33    "$srcdir/config.sub" \
34    .
35 # Simplified config.guess script avoids some spurious testcase failures
36 # when using heirloom-sh on GNU/Linux.
37 config_guess=`"$srcdir/config.guess"`
38 cat >config.guess <<EOF
39 #!/bin/sh
40 cat <<'GUESS_EOF'
41 $config_guess
42 GUESS_EOF
43 EOF
44 chmod +x config.guess
45 ])
46 m4_define([TEST_AUTORECONF], [AT_KEYWORDS([autoconf])dnl
47 AT_CHECK([autoreconf -I "$srcdir/m4"], [0], [], [stderr])])
48
49 m4_define([TEST_CONFIGURE], [AT_KEYWORDS([configure])dnl
50 AT_CHECK([export CC
51 CONFIG_SHELL=$TEST_SHELL $TEST_SHELL m4_default([$2],
52 [./configure]) --quiet CONFIG_SHELL=$TEST_SHELL $1])])
53
54 m4_include([tests/macros.at])
55 m4_include([tests/snippets.at])
56 m4_include([tests/functions.at])
57 m4_include([tests/programs.at])
58 m4_include([tests/libs.at])
59 m4_include([tests/scripts.at])