tests/test-logs-repeated.test


Log

Author Commit Date CI Message
Stefano Lattarini db973eaa 2012-02-21T19:47:36 tests: prefer 'configure.ac' over 'configure.in' With this change, our testsuite now uses 'configure.ac' as the name for the typical autoconf input, instead of the obsolescent 'configure.in' (which has been deprecated for several years, at least since autoconf 2.50). Most of the test cases changed by this commit have been automatically modified with this sed command (using GNU sed): sed -i 's/\<configure\(\\\?\)\.in\>/configure\1.ac/g' * syntax-checks.mk (sc_tests_no_configure_in): New syntax check. (syntax_check_rules): Add it. * tests/defs: Create stub for autoconf input in 'configure.ac', not in 'configure.in'. Adjust comments. ($AUTOCONF, $AUTOHEADER, $AUTORECONF): Remove workaround for the infamous debian autoconf wrapper: we don't need such workaround anymore now that we name our autoconf input as 'configure.ac'. For more information, see commit v1.11-564-g63da492 "test defs: hack to support autoconf-wrapper programs" of 16-12-2011. * tests/README: Use 'configure.ac', not 'configure.in'. * Many many tests: Likewise. * tests/backcompat3.test: Adjust to avoid spurious failures. * tests/backcompat5.test: Likewise. * tests/missing6.test: Likewise. * tests/backcompat6.test: Likewise, and extend a bit since we are at it.
Stefano Lattarini 641a5a4b 2012-02-16T10:46:23 maint: run "make update-copyright"
Stefano Lattarini 96401cb9 2012-02-06T15:48:30 tests: better way to compare lists in Makefile rules With this commit, we introduce a new helper shell script for use in the testsuite, which is meant to allow the test cases to easily check whether two whitespace-separated lists are equal; this ability is particularly useful to check for equality of the contents of make variables that are expected to contain multiple whitespace-separated words, and are defined through line continuations (or are rewritten by automake in this way), or that contain expansion of potentially empty variables. Before this change, a test checking that an usage like this one: VAR = valA if COND1 VAR += val1 # com1 endif COND1 VAR += valC worked as expected, couldn't use rules like: ## Doesn't work because $(VAR) expands to multiple words verify: test $(VAR) = "valA val1 valC" nor like: ## Doesn't work because the final expansion of $(VAR) contains ## repeated contiguous whitespace characters (it actually ## equals "valA val1 valC", not "valA val1 valC"), and this ## is an internal detail which might change and which we don't ## want to explicitly rely on. verify: test "$(VAR)" = "valA val1 valC" Instead, we had to rely on cumbersome workaround such as: ## This works, but is ugly. verify: test "`echo $(VAR)`" = "valA val1 valC" or: ## This works, but is even uglier. verify: echo BEG: $(VAR) :END | grep "BEG: valA val1 valC :END" Now, with the help of the new 'is' script, we can perform such a check in a clearer and more straightforward way, as in: ## Works, and reads clearly. verify: is $(VAR) == valA val1 valC * tests/is: New helper shell script, telling whether two whitespace separated lists are equal. * Makefile.am (EXTRA_DIST): Add it. * tests/colneq2.test: Use the new helper script, and accordingly get rid of older, more cumbersome idioms. * tests/cond11.test: Likewise. * tests/cond16.test: Likewise. * tests/cond18.test: Likewise. * tests/cond22.test: Likewise. * tests/cond31.test: Likewise. * tests/cond38.test: Likewise. * tests/test-logs-repeated.test: Likewise. * tests/objext-pr10128.test: Likewise. * tests/programs-primary-rewritten.test: Likewise. * tests/substre2.test: Likewise. Also ... (configure.in, Makefile.am): Add a couple of hack to avoid having to require (and run) a C compiler; accordingly ... ($required): ... remove this. * tests/exeext4.test: Likewise. * tests/substref.test: Likewise. Also ... (hello.c): Use ": >" rather than "cat <<EOF" to generate it, since it's meant to be empty anyway. * tests/cond4.test: Use the new helper script, and accordingly get rid of older, more cumbersome idioms. Avoid some unnecessary uses of "make -e" since we are at it. * tests/cond19.test: Likewise. * tests/cond32.test: Likewise. * tests/cond6.test: Use the new helper script, and accordingly move some checks in the Makefile.am. Avoid unnecessary execution of automake remake rules by manually "touching" aclocal.m4
Stefano Lattarini 2c48a507 2011-09-10T23:28:59 Merge branch 'prove' into testsuite-work * prove: prove: avoid weird signal-related bug tests: allow use of `prove' to run automake testsuite
Stefano Lattarini e00d6c98 2011-09-10T21:59:09 tests defs: more namespace-safeness ($using_tap): Renamed ... ($am_using_tap): ... to this. ($parallel_tests): Renamed ... ($am_parallel_tests): ... to this. ($test_prefer_config_shell): Renamed ... ($am_test_prefer_config_shell): ... to this. ($original_AUTOMAKE): Renamed ... ($am_original_AUTOMAKE): ... to this. ($original_ACLOCAL): Renamed ... ($am_original_ACLOCAL): ... to this. * tests/defs, tests/defs-static.in, tests/gen-testsuite-part, tests/README, and all callers: Adjusted. * tests/Makefile.am (AM_TESTS_ENVIRONMENT): Adjust, and rewrite to make future adjustments easier. * tests/defs (funcs_file_): Renamed ... (am_funcs_file): ... to this. * Makefile.am (sc_tests_obsolete_variables): New maintainer check. (syntax_check_rules): Add it.
Stefano Lattarini f5f5c23d 2011-09-09T16:31:27 tests: allow use of `prove' to run automake testsuite * tests/prove-runner: New helper script; mostly it wraps our `*.test' test scripts to make them runnable by the `prove' utility. * tests/Makefile.am (EXTRA_DIST): Distribute it. (PROVE, AM_PROVEFLAGS, AM_PROVECMD): New variables. (prove, installprove): New targets, used run the automake testsuite through the `prove' utility. * tests/gen-testsuite-part: For any considered dependency, generate a variables that groups all the tests depending on it. This is especially useful for use in the new `prove' and `installprove' targets, which cannot rely on make for inter-test dependencies, and have to handle them "by hand".
Stefano Lattarini 59ad0596 2011-08-28T11:48:44 testsuite: different test scripts cannot share the same basename If two test scripts have the same basename, they will end up sharing the same log file, leading to all sort of undefined and undesired behaviours. Add a Makefile check verifying that this is not the case. * tests/test-logs-repeated.test: New test, verifying previously unspecified semantics (in the definition of $(TEST_LOGS) from $(TESTS)) that we use in our new check. * tests/Makefile.am (TESTS): Update. (check-no-repeated-test-name): New .PHONY check. (check-local): Depend on it.