-
Tests are written in python 3 using pytest. You can run all tests after
make install
withctest -V
. -
Tests should be placed in the
test
directory. There are subdirectories for each mode of operation: clang_plugin, cpu_checking, llvm, parser. -
We group tests in two classes: static and dynamic. Static tests check only instrumentation that modifies the code; they dmic tests check the full functionality of instrumenting and running the code.
-
All tests should:
- Have their own directory
- A .py test file (usually using the same name of the directory)
- Include a teardown_module function that cleans up everything, usually by calling
make clean
or simply removing object files or other files that are generated by the test
-
Usually tests also have a setup_module function that changes the current directory to the directory of the tests (see examples).