Before you send PRs
August 11, 2017 ยท View on GitHub
Find a bug, a way to improve the documentation or have a feature request? Open an issue.
Or even better, send us a PR :)
Before you send PRs
- Follow the instructions to get a locally working version of oyente
- Make your awesome change
- Make sure the code adheres to the coding style. We use pylint with the following configuration
- Make sure that the tests pass
- Write a good commit message
Running the tests
There are two options to run the tests, which are concrete execution and symbolic execution.
Before running the test you have to choose an option. There is a global variable named UNIT_TEST in global_test_params.py to set the type of the tests.
# Testing concrete execution
UNIT_TEST = 2
# Testing symbolic execution
UNIT_TEST = 3
# Start testing
$ python oyente/run_tests.py
After running the testing program, the result would display a status for each testcase:
PASS: the testcase passesFAIL: an opcode implements incorrectlyTIME_OUT: it takes too long to run the testcase (setGLOBAL_TIMEOUT_TESTinglobal_params.py)UNKNOWN_INSTRUCTION: there is an unknown opcode in the testcaseEXCEPTION: the program encounters an exception while running the testcaseEMPTY_RESULTthe result is invalidINCORRECT_GASthe gas is calculated incorrectly