summaryrefslogtreecommitdiff
path: root/tests/color.test
Commit message (Collapse)AuthorAgeFilesLines
* tests defs: more namespace-safenessStefano Lattarini2011-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | ($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.
* Merge branch 'test-protocols' into tap-testsuite-workStefano Lattarini2011-08-031-24/+84
|\
| * parallel-tests: simplify testsuite summaryStefano Lattarini2011-07-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer a more deterministic, "tabular" format for the testsuite summary, always listing the numbers of passed, failed, xfailed, xpassed, skipped and errored tests, even when these numbers are zero. This simplify the logic of testsuite summary creation, makes it more easily machine-parseable, and will probably allow for easier addition of new kinds of test results in the future. * lib/am/check.am (am__tty_colors_dummy): New make variable, to reduce code duplication. Extracted from previous versions of $(am__tty_colors), and extended by defining two new variables `$mgn' and `$brg'. [%?COLOR%, %!?COLOR%] (am__tty_colors): Use that new variable. (am__text_box): Delete, is not needed anymore. ($(TEST_SUITE_LOG)): Rewrite associated rules to implement the new testsuite summary format. * NEWS: Update. * tests/check10.test: Don't run with the parallel-tests harness too, that makes no sense anymore. * tests/color.test: Update and adjust. * tests/color2.test: Likewise. * tests/parallel-tests.test: Likewise. * tests/parallel-tests3.test: Likewise. * tests/parallel-tests6.test: Likewise. * tests/parallel-tests9.test: Likewise. * tests/parallel-tests-unreadable-log.test: Likewise. * tests/parallel-tests-empty-testlogs.test: Likewise. * tests/parallel-tests-log-override-recheck.test: Likewise. * tests/parallel-tests-no-spurious-summary.test: Likewise. * tests/test-driver-custom-multitest.test: Likewise. * tests/test-driver-end-test-results.test: Likewise. * tests/parallel-tests-no-color-in-log.test: New test. * tests/testsuite-summary-color.test: Likewise. * tests/testsuite-summary-count.test: Likewise. * tests/testsuite-summary-count-many.test: Likewise. * tests/testsuite-summary-reference-log.test: Likewise. * tests/testsuite-summary-checks.sh: New auxiliary script, used by the new tests above. * tests/extract-testsuite-summary: Likewise. * tests/trivial-test-driver: Optimize for speed when there are lots of of tests. * tests/Makefile.am (EXTRA_DIST): Distribute them. (testsuite-summary-color.log, testsuite-summary-count.log): Depend on them. (testsuite-summary-count-many.log): Depend on the auxiliary scripts 'trivial-test-driver' and 'extract-testsuite-summary'. (TESTS): Update.
| * parallel-tests: new recognized test result 'ERROR'Stefano Lattarini2011-07-211-24/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/am/check.am ($(TEST_SUITE_LOG)): Recognize a new test result `ERROR'. Use it when encountering unreadable test logs (previously a simple `FAIL' was used in this situations). * lib/test-driver: Set the global test result to `ERROR' when the test exit status is 99. When doing colorized output, color `ERROR' results in magenta. * doc/automake.texi (Log files generation and test results recording): Update by also listing `ERROR' among the list of valid `:test-results:' arguments. * NEWS: Update. * tests/trivial-test-driver: Update. * tests/parallel-tests.test: Likewise. * tests/parallel-tests-harderror.test: Likewise. * tests/parallel-tests-no-spurious-summary.test: Likewise. * tests/test-driver-global-log.test: Likewise. * tests/test-driver-recheck.test: Likewise. * tests/test-driver-custom-multitest-recheck.test: Likewise. * tests/test-driver-custom-multitest-recheck2.test: Likewise. * tests/test-driver-custom-multitest.test: Likewise. * tests/test-driver-custom-no-html.test: Likewise. * tests/test-driver-end-test-results.test: Likewise. * tests/color.test: Likewise. Also, make stricter, and also test from VPATH. * tests/color2.test: Likewise, and improve syncing with color.test. * tests/parallel-tests-exit-statuses.test: New test. * tests/parallel-tests-console-output.test: Likewise. * tests/Makefile.am (TESTS): Update.
| * parallel-tests: add auxiliary script 'test-driver', refactorStefano Lattarini2011-06-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactoring should cause no API of functionality change, and is meant only to simplify the future implementation of TAP and SubUnit testsuite drivers. More precisely, our roadmap is to move most of the "testsuite driving" features out of the Automake-generated Makefiles, and into external scripts with well-defined interfaces. This will allow the user to define its own personalized testsuite drivers, and will also offer us a framework upon which to implement our new TAP and SubUnit drivers, all in a very unobtrusive way and retaining an high degree of code reuse and backward-compatibility. * lib/test-driver: New auxiliary script. * lib/Makefile.am (dist_SCRIPT_DATA): Add it. * automake.in (handle_tests): Require the new auxiliary script `test-driver', and define a new internal makefile variable `$(am__test_driver)', used to call it. Perform new substitution on `DRIVER' when processing the `check2.am' file. * lib/check.am (am__tty_colors): Define new shell variable `$am__color_tests'. (am__rst_section): Removed, its role taken over by the new `test-driver' script. (am__test_driver_flags): New variable, contains the command line options passed to `test-driver'. (am__check_pre): Do not deal with temporary files and exit traps anymore, as the `test-driver' script takes care of that now. Define shell variable `$am__enable_hard_errors', used by `$(am__test_driver_flags)'. Reorder so that we don't need to save and restore the value of the `TERM' environment variable anymore. Other related adjustments. (am__check_post): Remove, as its role has been completely taken over by the `test-driver' script. * am/check2.am (?GENERIC?%EXT%$(EXEEXT).log, ?GENERIC?%EXT%.log, ?!GENERIC?%OBJ%): Call the test script through the Automake substituted `%DRIVER%', and honor the command-line options in `$(am__test_driver_flags)'. Do not call the obsoleted `$(am__check_post)' anymore. * doc/automake.texi (Auxiliary Programs): Mention the new `test-driver' script. (Optional): Mention `test-driver' in AC_CONFIG_AUX_DIR. Since we are at it, break the list of auxiliary scripts by placing one per line, to simplify potential future additions of new scripts. * tests/check.test: Adjust. * tests/check2.test : Likewise. * tests/check3.test : Likewise. * tests/check4.test : Likewise. * tests/check10.test: Likewise. * tests/color.test: Likewise. * tests/color2.test: Likewise. * tests/comment9.test: Likewise. * tests/dejagnu.test: Likewise. * tests/exeext4.test: Likewise. * tests/maken3.test: Likewise. * tests/maken4.test: Likewise. * tests/parallel-tests-interrupt.test: Likewise. * tests/posixsubst-tests.test: Likewise. * tests/repeated-options.test: Likewise. * tests/check-no-test-driver.test: New test. * tests/parallel-test-driver-install.test: Likewise. * tests/Makefile.am (TESTS): Update. * NEWS: Update.
* | testsuite: use `skip_' for skipping of testsStefano Lattarini2011-05-011-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/defs: Use the `skip_' subroutine for test skipping. Also give sometimes more detailed messages about the reasons for the skipping. * tests/canon7.test: Likewise. * tests/color.test: Likewise. * tests/color2.test: Likewise. * tests/compile2.test: Likewise. * tests/dejagnu7.test: Likewise. * tests/depcomp6.test: Likewise. * tests/depcomp9.test: Likewise. * tests/depcomp10.test: Likewise. * tests/distlinks.test: Likewise. * tests/distlinksbrk.test: Likewise. * tests/fn99.test: Likewise. * tests/fn99subdir.test: Likewise. * tests/forcemiss2.test: Likewise. * tests/fort5.test: Likewise. * tests/gettext3.test: Likewise. * tests/install2.test: Likewise. * tests/instfail-info.test: Likewise. * tests/instfail-java.test: Likewise. * tests/instfail-libtool.test: Likewise. * tests/instfail.test: Likewise. * tests/instmany-mans.test: Likewise. * tests/instmany-python.test: Likewise. * tests/instmany.test: Likewise. * tests/instsh3.test: Likewise. * tests/ltinit.test: Likewise. * tests/makej2.test: Likewise. * tests/mdate6.test: Likewise. * tests/mkinst3.test: Likewise. * tests/parallel-tests3.test: Likewise. * tests/parallel-tests-reset-term.test: Likewise. * tests/parallel-tests-unreadable-log.test: Likewise, * tests/python-virtualenv.test: Likewise. * tests/remake-gnulib-remove-header.test: Likewise. * tests/subobj9.test: Likewise. * tests/symlink2.test: Likewise. * tests/tar.test: Likewise. * tests/tar2.test: Likewise. * tests/txinfo26.test: Likewise. * tests/vala2.test: Likewise. * tests/vala3.test: Likewise. * tests/vala5.test: Likewise. * tests/vtexi4.test: Likewise. * tests/instdir-texi.test: Likewise. * tests/txinfo21.test: Likewise. SquashMe
* tests: enable 'errexit' shell flag by default.Stefano Lattarini2011-01-111-3/+1
| | | | | | | | | * tests/defs: Enable `errexit' shell flag (near the end). Removed redundant comment about the enabling of shell traces. * tests/README (Writing test cases): Update, and use nicer formatting in a couple of places. * All tests: Adjusted by removing now-redundant calls to 'set -e'.
* tests: work around dash quoting issue in case statements.Ralf Wildenhues2010-11-141-1/+1
| | | | | | | * tests/color.test, tests/color2.test: Quote variable in case pattern, to avoid skipping tests with dash 0.5.5.1. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Refactor tests on Automake TESTS color output.Stefano Lattarini2010-04-201-18/+4
| | | | | | * tests/color.test: Tests using the expect program moved out to... * tests/color2.test: ... this new file. * tests/Makefile.am (TESTS): Extended accordingly.
* Remove redundant unset of variable TESTS from some test scripts.Stefano Lattarini2010-03-051-3/+1
| | | | | | | | | | | | | | | | * tests/color.test: Do not unset the `TESTS' variable, as it's already unset in the `defs' file. * tests/check5.test: Likewise. * tests/check8.test: Likewise. * tests/check9.test: Likewise. * tests/check10.test: Likewise. * tests/check11.test: Likewise. * tests/parallel-tests.test: Likewise. * tests/parallel-tests3.test: Likewise. * tests/parallel-tests4.test: Likewise. * tests/parallel-tests5.test: Likewise. * tests/parallel-tests6.test: Likewise. * tests/parallel-tests7.test: Likewise.
* Revert Automake license to GPLv2+.Ralf Wildenhues2009-05-171-1/+1
| | | | | | | | | | | | Automake will move to GPLv3+ once the Exception statement has been rewritten to use the new GPLv3 exception language. This change does not impact the COPYING file that may be installed by `automake --add-missing'. * COPYING: Revert to GPLv2. All uses changed. * NEWS: Update. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Print captured output before failing.Ralf Wildenhues2008-10-051-2/+2
| | | | | | | | | | | | | | * tests/acloca14.test, tests/acloca17.test, tests/acloca18.test, tests/aclocal.test, tests/acsilent.test, tests/alpha.test, tests/check4.test, tests/color.test, tests/fn99.test, tests/fn99subdir.test, tests/help.test, tests/init.test, tests/lisp8.test, tests/missing3.test, tests/pr220.test, tests/python11.test, tests/python4.test, tests/python5.test, tests/unused.test, tests/version8.test: When Exit is called after a command that has stdout or stderr redirected to a file for later inspection, output the file before failing the test. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Use `Exit' instead of `exit' in test suite.Ralf Wildenhues2008-09-061-10/+10
| | | | | | | | | | | | | | | Cater to Bourne shells like Solaris sh that do not pass the `exit' argument as status to the cleanup trap. * Makefile.am (maintainer-check): Check that here-documents use only `END' or `EOF' as delimiter in the test suite. Check that, outside of here-documents, the tests do not use `exit' with an argument, but use `Exit' instead. * tests/defs.in (Exit): New function. Use it throughout, starting with the introduction of the exit trap. * tests/*.test: Use `Exit $arg' instead of `exit $arg' throughout, except inside created files. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix color.test when using BSD grep.Eric Blake2008-01-231-10/+20
| | | | | | | * tests/color.test: Ensure that grep can handle non-printing characters. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix Heisenbug trying to unset a sometimes-not-set variable.Ralf Wildenhues2008-01-131-2/+2
| | | | | | * tests/check5.test: Do not error out upon `unset TESTS' due to `set -e', in case TESTS was not set. * tests/color.test: Likewise.
* Reword the copyright notices to match what's suggested in GPLv3.Ralf Wildenhues2007-12-081-7/+3
|
* Fix color test failure on dumb (and other) terminals.Bob Proulx2007-11-131-0/+3
| | | | * tests/color.test: Set TERM to `ansi'.
* Fix maintainer-check failure.Ralf Wildenhues2007-11-121-4/+6
| | | | | * tests/color.test: unset TESTS, use `make -e' rather than `make MACRO=val'.
* Implement colorized test output.Ralf Wildenhues2007-11-081-0/+104
* automake.in (handle_tests): Set COLOR depending on `color-tests'. * configure.ac (AM_INIT_AUTOMAKE): Use `color-tests'. * doc/automake.texi (Tests, Options): Document test results, document new option, document AM_COLOR_TESTS. * lib/Automake/Options.pm (_process_option_list): Handle it. * lib/am/check.am (am__tty_colors): New variable. Enable colored output if TERM is not dumb and depending on AM_COLOR_TESTS and whether stdout is connected to a terminal. (check-TESTS): Use am__tty_colors. * NEWS: Mention color-tests. * tests/color.test: New test. * tests/Makefile.am: Adjust.