newlib-cygwin/winsup/testsuite
Jon Turney a1ee8a0f05
Cygwin: testsuite: Drop using DejaGnu to run tests
A more sophisticated (and modern) test harness would probably be useful,
but switching to Automake's built-in test harness gets us parallel test
execution, colourization of failures, simplifies matters, seems adequate
for the current testuite, and means we don't need to write any icky Tcl.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2023-07-22 17:16:37 +01:00
..
libltp Cygwin: testsuite: Fix compilation warnings 2023-01-13 17:03:54 +00:00
mingw Cygwin: testsuite: Build testcases using automake 2023-01-13 17:03:52 +00:00
winsup.api Cygwin: testsuite: Drop using DejaGnu to run tests 2023-07-22 17:16:37 +01:00
Makefile.am Cygwin: testsuite: Drop using DejaGnu to run tests 2023-07-22 17:16:37 +01:00
README Cygwin: testsuite: Drop using DejaGnu to run tests 2023-07-22 17:16:37 +01:00
cygrun.c Cygwin: testsuite: Drop setting TDIRECTORY 2023-07-21 13:23:17 +01:00
cygrun.sh Cygwin: testsuite: Drop using DejaGnu to run tests 2023-07-22 17:16:37 +01:00

README

Here are some notes about adding and using this testsuite.

The testsuite adds a directory containing the just built cygwin1.dll to the PATH
(during the run step) so that it can be found by the Windows loader during
testing.

Because we'll probably run into complaints about using two DLLs, we
run cygrun.exe for each test.  All this does is run the test with
CreateProcess() so that we don't attempt to do the special code for
when a cygwin program calls another cygwin program, as this might be a
"multiple cygwins" problem.

Any test that needs to test command line args or redirection needs to
run such a child program itself, as the testsuite will not do any
arguments or redirection for it.  Same for fork, signals, etc.

The testsuite/winsup.api subdirectory is for testing the API to
cygwin1.dll ONLY.  Create other subdirs under testsuite/ for other
classes of testing.

Tests under winsup.api/ either run successfully and exit(0), exit(77) to
indicate a skipped test, or any other exit status to indicate a failure.

Don't print anything to the screen if you can avoid it (except for failure
reasons, of course).  One .c file per test, no compile options are allowed
(we're testing the api, not the compiler).

Tests whose filename is mentioned in XFAIL_TESTS are expected to fail,
effectively reversing the result of those.

"make check" will only work if you run it *on* an NT machine.
Cross-checking is not supported.

To run selected tests, use e.g:
$ make check TESTS="winsup.api/ltp/umask03 winsup.api/ltp/stat06"