1 2------------------------------------- 3Using the test suite for winpthreads 4------------------------------------- 5 6This test suite is originally designed for testing compliance: it just says when the tests pass without any further information. 7Because this is inconvenient for work in progress, the behaviour has been modified to show more information for debugging while keeping the changes minimal 8(for syncing purposes) 9 10Procedure: 11---------- 12 131. Enter the winpthreads dir: 14 $ cd winpthreads 152. Build the winpthreads lib 16 $ make 173. Make a copy for the test-suite: 18 $ cp libpthread.a libpthreadGC2.a 194. Enter the test-suite dir: 20 $ cd tests 215. (optional) Clean: 22 $ make clean 236. Build the suite. This will also run the tests. A few might crash so you have to click a dialog away. 24 The tool "runall.exe" will also be built. 25 $ make GC-static 26 To log both the compile results and the asserts: 27 $ make GC-static 2> compile-errors.log 287. Now you have a bunch of .exe and maybe some .pass files. Remove the .pass files. They don't contain much useful yet. 29 $ rm *.pass 308. Re-run the tests in debugging mode. Again some crash dialogs maybe. 31 runall will skip files with already an .pass or .fail output. 32 $ runall . 339. Now 3 types of files will be generated for each source (.c) file (runall excludes itself): 34 The stderr output with the asserts will be logged to corresponding .fail 35 and .pass files. 36 - .pass : the test has passed (exited with 0). 37 - .fail : the test has failed (exited with != 0). 38 - .x : no .exe found. Probably the compile has failed. 39 Note that when a test crashes, a .fail output will be generated, even without failed asserts. 40 41Module testing: 42--------------- 43 44Sometimes you want to test, debug and modify a single test, say once2.c: 451. Copy test.h to the debug test dir: 46 $ cp test.h ../test 472. Copy the file to the debug test dir: 48 $ cp once2.c ../test 493. Enter the debug test dir: 50 $ cd ../test 514. Build and run it: 52 $ make once2.exe 53 $ ./once2.exe 54 55Benchtests: 56----------- 57 58These work, but you have to compile them by hand like this: 59$ make benchlib.o 60$ make benchtest1.exe 61$ make benchtest2.exe 62$ make benchtest3.exe 63$ make benchtest4.exe 64$ make benchtest5.exe