-
Notifications
You must be signed in to change notification settings - Fork 56
Testing wartool
Recently work has been done on adding some testing for wartool to ensure consistent output between versions(unless breaking changes are needed). This page reflects the state of testing as of November 23, 2021. Things may have changed since this was written.
First make a directory for testing.
mkdir wargus-tests
cd wargus-tests
Then run wartool
wartool ${PATH_TO_ORIGINAL_DATA_OR_CD} ./old-results/
Next clone the, currently, only branch with the tests(this should be in the master branch soon hopefully).
git clone [email protected]:abenedic/wargus.git
git checkout modernization
Now generate a test case.
cd wargus/tests
python generate_test_case.py ${PATH_TO_ORIGINAL_DATA_OR_CD} ../../old-results/ ${SOME_DESCRIPTOR_LIKE_BNEENG_OR_SOMETHING}
Now build wargus(optionally if you are on linux and things work you can just use the cmake file in the tests directory)
cd ../../
mkdir build-wartool
cd build-wartool
cmake ../wargus
make
Cool that should have worked. You should now have a wartool
in the build-wartool directory, go back to the tests directory
cd ../wargus/tests
Now try to run the tests.
python run_tests.py ${PATH_TO_ORIGINAL_DATA_OR_CD} ../../new-results/ ../../build-wartool/wartool
You should see a bunch of output and something like:
Found 1608 files.
Disagreement on file: Human Battle 1.ogg
Disagreement on file: Human Battle 2.ogg
Disagreement on file: Human Battle 3.ogg
Disagreement on file: Human Battle 4.ogg
Disagreement on file: Human Battle 5.ogg
Disagreement on file: Human Battle 6.ogg
Disagreement on file: Human Briefing.ogg
Disagreement on file: Human Defeat.ogg
Disagreement on file: Human Victory.ogg
Disagreement on file: I'm a Medieval Man.ogg
Disagreement on file: Orc Battle 1.ogg
Disagreement on file: Orc Battle 2.ogg
Disagreement on file: Orc Battle 3.ogg
Disagreement on file: Orc Battle 4.ogg
Disagreement on file: Orc Battle 5.ogg
Disagreement on file: Orc Battle 6.ogg
Disagreement on file: Orc Briefing.ogg
Disagreement on file: Orc Defeat.ogg
Disagreement on file: Orc Victory.ogg
set()
set()
This is the expected output from the English BNE CD. If it differs for any non-.ogg
file there is likely a problem with wartool, and you should file a bug.