Changes in RegressionTests
Editor Comment
elaborated regression_test.py use
Revision Differences of Revision 4
When you think your branch is ready for merging, there are two tests you can run to make sure that your code sticks to our coding style, and to test for a bunch of possible regression bugs. ¶¶
## Running Codecheck Manually ¶
¶
¶
We have codecheck rules that will help you stick to our coding style guidelines. These are run automatically whenever you compile a debug build, but they can be hard to see now, because cmake creates a lot of output around them. However, you can run the checks manually: ¶
¶
`cmake/codecheck/CodeCheck.py src/* | grep -v "src/third_party"` ¶
¶
¶
## Running Regression Tests ¶
¶
Some tests can be run automatically wile compiling debug builds, but not all of them. We have some automated scenarios that will check for regression bugs. You can run all of them with ¶
¶
`./regression_test.py -b ./widelands` ¶
¶
or you can run just specific tests, for example: ¶
¶
`./widelands --scenario=test/maps/lua_testsuite.wmf` ¶
¶
or you use regex to filter test files like: ¶
¶
`./regression_test.py -b ./widelands -r=portdock` ¶
¶
that will run all test(s) (*lua files) with portdock in a name. You can ofcourse use the entire filename to run just one test. Have a look at the tests directory what tests are available. ¶
¶
For **help** run ¶
¶
`./regression_test.py -h` ¶
¶
or --help. ¶
¶
###Required python version### ¶
¶
Also note that regression_test.py **requires python 2.x** (2.7 preferably), so if you get error like this: ¶
¶
File "./regression_test.py", line 206 ¶
print "Using '%s' binary." % args.binary ¶
^ ¶
SyntaxError: Missing parentheses in call to 'print' ¶
¶
force python 2.7 this way: ¶
¶
`python2.7 ./regression_test.py -b ./wid
¶
providing you are using **linux** or similar system. Chances are high that python2.7 is already installed on your box, if not use your package man
¶