![]() |
P4C
The P4 Compiler
|
Directories | |
| phv | |
Files | |
| bf_gtest_helpers.h | |
| tofino_gtest_utils.h | |
We use Google's gtest framework for unit tests.
NB: There are known issues with include paths for P4 include files. Until these are fixed, you must take care to invoke
gtestp4cfrombf-p4c-compilers/build/p4c.
The gtest binary is built as part of the default make target:
For general build instructions, see here.
Running make produces a gtestp4c binary. To run it, your current working directory must be build/p4c. (This is a known bug.)
You can also use ctest:
Finally, the gtest framework provides command line options for selectively invoking subsets of tests. Use
for available options.