The purpose of those tests is to automatically run SymQEMU on some known binaries and check that it gives the expected outputs (i.e. check that it generates the expected test cases).
To run the tests, cd into this directory and run:
python3 -m unittest test.py
The directory binaries
contain a directory for each test binary. A test
binary directory contains the following:
- An executable file
binary
- A file
input
whose path will be given as an argument tobinary
and whose content will be symbolic - A text file
args
that contains the argumentsbinary
will be called with. One of the arguments must be@@
and it will be replaced with the path of theinput
file. - A directory
expected_outputs
: the test cases that SymQEMU should generate when called like this:<symqemu> <path/to/binary> <args>
, with the content ofinput
being symbolic.
- Create a new directory in
binaries
and put the filesbinary
andinput
inside it - Run
python3 init-new <name of your new binary directory>
. This will run SymQEMU on your new binary, create a new directorybinaries/<name of your new directory>/expected_outputs
and store the test cases generated by SymQEMU in it. - Edit
test.py
to add your binary