summaryrefslogtreecommitdiff
path: root/support/test-driver.c
AgeCommit message (Collapse)Author
2018-06-26support: Add TEST_NO_SETVBUFFlorian Weimer
This is sometimes needed for testing stdio streams, where the setvbuf call in the test driver could interfere with the test.
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-06-15support: Add optstring supportAdhemerval Zanella
This patch adds an option to test to add small command line option through CMDLINE_OPTSTRING define. For instance: #define CMDLINE_OPTSTRING "vd" static void cmdline_process_function (int c) { switch (c): 'v': /* process '-v' option. */ break; 'd': /* process '-d' option. */ break; } #define CMDLINE_PROCESS cmdline_process_function It will add both '-v' and '-d' along with already default long options. * support/support_test_main.c (support_test_main): Use optstring member for option string in getopt_long. * support/test-driver.c: Add comment about CMDLINE_OPTSTRING. (CMDLINE_OPTSTRING): New define. * support/test-driver.h (test_config): Add optstring member.
2017-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
2016-12-31support: Implement --verbose option for test programsFlorian Weimer
Some tests can produce rather verbose tracing information, and the --verbose option provides a standardized way to enable such logging output.
2016-12-09support: Introduce new subdirectory for test infrastructureFlorian Weimer
The new test driver in <support/test-driver.c> has feature parity with the old one. The main difference is that its hooking mechanism is based on functions and function pointers instead of macros. This commit also implements a new environment variable, TEST_COREDUMPS, which disables the code which disables coredumps (that is, it enables them if the invocation environment has not disabled them). <test-skeleton.c> defines wrapper functions so that it is possible to use existing macros with the new-style hook functionality. This commit changes only a few test cases to the new test driver, to make sure that it works as expected.