newlib-cygwin/winsup/testsuite
Jon Turney 1a9f95d894
Cygwin: Run testsuite against the just-built DLL
Since 4e7817498e, we're just running the tests against the installed
DLL.  We're arranging to put the build directory on the path, but since
it doesn't contain cygwin1.dll (since it's built with a different name
and renamed on installation), that doesn't have any effect.

Arrange to place the just-built DLL into a directory which the testsuite
can place on it's path (while running the test, but not while compiling
it).

Also fix any remaining references to cygwin0.dll in testsuite,
documentation and comments.

Fixes: 4e7817498e ("Cygwin: Makefile: Drop all the "test dll" considerations")
2023-01-10 10:27:13 +00:00
..
config Cygwin: Run testsuite against the just-built DLL 2023-01-10 10:27:13 +00:00
cygrun Cygwin: automake: change @INCLUDES@ to @AM_CPPFLAGS@ to avoid warnings 2021-04-29 11:28:14 +02:00
libltp Cygwin: testsuite: Fix TEST_RETURN for 64-bit 2022-08-29 17:53:44 +01:00
winsup.api Cygwin: Run testsuite against the just-built DLL 2023-01-10 10:27:13 +00:00
Makefile.am Cygwin: Run testsuite against the just-built DLL 2023-01-10 10:27:13 +00:00
README Cygwin: Run testsuite against the just-built DLL 2023-01-10 10:27:13 +00:00
cygrun.c Cygwin: Ensure temporary directory used by tests exists 2020-11-08 14:42:02 +00:00

README

1999-12-23  DJ Delorie  <dj@cygnus.com>

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 in winsup.api/*.c or winsup.api/*/*.c (only one subdirectory
level is allowed) either compile, run, and exit(0) or they fail.
Either abort or exit with a non-zero code to indicate 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 known-bugs.tcl will be *expected*
to fail, and will "fail" if they compile, run, and return zero.

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

To test a subset of the test-suite, use
$ make check CYGWIN_TESTSUITE_TESTS=regexp