Automate testing + valgrinding of custom test cases.
Download test.py into a directory SEPARATE from your pset directory. This is to prevent the default submit script from including this code into the submissions.
- Initialize the test script, notifying it of your local implementation and the reference implementation
./test.py init <your_implementation> <reference_implementation>
For instance, run ./test.py init ~/cs323/proj1/my_proj1 /c/cs323/proj1/proj1
- Add test cases:
Test cases can be added with
./test.py add [-r] <test_dir>...
You can add individual files, or add directories with the -r flag.
- Run tests: To run tests:
./test.py [-m] [-s|-v] run <files>... // to run a list of test files
./test.py [-m] [-s|-v] run all // to run all the test files that have been added
Options:
-mruns valgrind as well, comparing the output of your valgind to the output of the reference valgrind. It will notify of errors, unreachable memory, or segfaults.Xmeans no erros,Oindicates an error in the result-sruns silently, so does not show any output or diffs. It only reports whether a test passed or failed-vruns verbosely, showing the full outputs of your implementation and the reference implementation. By default, the program will show diffs.