|Version 2 (modified by benl, 8 years ago)|
The war2 test driver automates regression testing.
$ bin/war2 test
This tool descends into the given directory tree.
- For subdirectories containing a main Main.ds file, it builds and runs that program. The resulting executable is named Main.bin and placed in the same directory as the source. If there is also a Main.stdout file, then checks the program's output against this expected output. If there is any difference it prompts the user whether to stop testing, or update the expected output.
- For subdirectories that do not contain a Main.ds, it simply compiles all the other sources there.
- If a subdirectory contains a Module.error.check file, where Module is some arbitrary module name, then compilation is expected to fail with the error message given by that check file.
Regression tests are entirely text based, non-interactive, and should complete within a few seconds.
Bigger programs are located in the demos directory. These programs may open X windows, access the network, or take longer to complete. They're primarily for demonstrating coolness, but are also useful for testing compiler changes against. The war2 test driver can also be used to run them
$ bin/war2 demo
You can also compile and run demos individually with something like:
$ bin/ddc -O -make demo/Graphics/Styrene/Main.ds -o styrene $ ./styrene