Comment 8 for bug 1407418

Revision history for this message
SirVer (sirver) wrote :

1. This is a bit clunky, but you run such a test using regression_test.py from the base directory (you will probably need to use the -b parameter). The individual test maps live in test/maps/. One (complex) example is test/maps/expedition.wmf which is a map you can just load up in the editor.

this map will get launched through the python script using widelands --scenario=<map>, this runs thetest/maps/expedition.wmf/scripting/init.lua script. The regression_test.py script also makes sure that after the game is running, one other script of the ones test/maps/expedition.wmf/scripting/test*.lua runs. A test runs succeeds it the string "All Tests passed" is in stdout.txt.

2. Player dependency sounds over complicating things. Overengineered imho, go for the simplest thing that works. If it turns out it is not good enough for the practicality, we iterate. Code complexity is an important factor to consider too. tl;dr: your initial idea is IMHO much better.

3. A bug is always a good starting point.