1.Preconditions: make sure, Update timings:
rm test/functional/timing.json # make sure that timing file is not present
test/functional/test_runner.py --updatetiming
Resultthat you do not build from src tree:
all test should be run in alphabetical ordermkdir build && cd build
../configure
timing.json should contain all test with their timings, sorted alphabeticallymake check
2.--> Test1: Run withsingle test and check if its timings.json present: is present in build directory
This time timings.json will be used and only test shorter than 40 seconds will be run
test/functional/test_runner.py
First few test that should be executed are wallet.py,abc-p2p-fullblocktest.py, wallet-hd.py,fundrawtransaction.pyrm build/timing.json
build/test/functional/test_runner.py uptime.py
cat build/timing.json
3. Let's run again, specifying --extended. All test should be executed--> Test2: Run another test, regardless ofit should be inserted in timing file before their timings previous one
build/test/functional/test_runner.py --extendedabc-cmdline.py
cat build/timing.json
4--> Test3: Run another test. execute 1 test, do not update timings - test should be added to tiA single entry should be added in the middle of the timmings.json
rm test/functional/timing.json--> Note: this commit preserves the behavior, where it is not possible to include
test/functional/test_runner.py uptime.py
check if timings.json contains exactly one test
5. Remove test that does not exists from timing file--> or exclude an instance of the test with additional parameters - if explicitly dpecified
---> it will only run the test instance without parameters
Addd the following line in timing.jsonbuild/test/functional/test_runner.py txn_doublespend.py
{ "time": 0, "name": "does_not_exist.py" },cat build/timing.json
test/functional/test_runner.py uptime.py --updatetiming--> Test4: Check that timing file nothing is not present in src directory
check if the line was removed fromfind -name timing-.json
6.--> Test5: Switch to building form src tree, add tests that aretiming.json should not present to timing filebe generated there
rm build/timing.json
./configure
make check
test/functional/test_runner.py --exclude txn_doublespend,wallet-hd --updatetimingpy uptime.py
check if all test except txn_doublespend,wallet-hd were added tofind -name timing.josnson