I just tried to validate the "benchmark" scenario titi created for testing purposes:
tomreyn@atibox:~/SCM/megaglest-trunk$ mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/ --validate-scenario=benchmark
====== Started Validation ======
Filtering scenario: benchmark
---------------- Loading scenario inside world ----------------
====== Finished Validation ======
tomreyn@atibox:~/SCM/megaglest-trunk$
This seems to have worked fine. However, I get the exact same output when specifying a scenario which does not actually exist:
tomreyn@atibox:~/SCM/megaglest-trunk$ mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/ --validate-scenario=no_such_scenario
====== Started Validation ======
Filtering scenario: no_such_scenario
---------------- Loading scenario inside world ----------------
====== Finished Validation ======
tomreyn@atibox:~/SCM/megaglest-trunk$
So I'm wondering whether validation actually took place (it is very fast, too). I also think there should be an error message or warning when the scenario filter did not match at least one existing scenario (and this improvement should be applied to the other validation types, too).
I also tried running the validation command without specifying a scenario filter, so just:
mk/linux/megaglest --ini-path=mk/linux/ --data-path=mk/linux/ --validate-scenario
This did actually seem to work, but the validation contained much more steps than expected: it iterated over all the techtrees, factions and units I have installed, whether or not they are part of any scenarios. Ideally, this test would skip validation of anything which is not a scenrio by itself. I.e., in my opinion, no unit nor structure nor audio file nor anything should be validated there in my opinion, just the scenario XML file and the Lua code embedded in (and possibly referenced by) it.