Author Topic: [fixed] r3401: Scenario validation filter broken?  (Read 703 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
[fixed] r3401: Scenario validation filter broken?
« on: 19 June 2012, 19:18:49 »
I just tried to validate the "benchmark" scenario titi created for testing purposes:

Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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.
 
« Last Edit: 22 June 2012, 02:30:51 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3401: Scenario validation broken?
« Reply #1 on: 22 June 2012, 01:48:51 »
Fixed in svn 3403

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r3401: Scenario validation broken?
« Reply #2 on: 22 June 2012, 02:18:41 »
Thanks, the filters work well now.

I also have some questions: What does this validate besides the referenced techtrees? Does it also validate (how? syntax or more?) the scenario XML document structure, or even the Lua code, if any?
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3401: Scenario validation broken?
« Reply #3 on: 22 June 2012, 02:21:28 »
It does no specific scenario checks other than seeing if the scenario will load, otherwise its checking techtree stuff. We will add validations as time goes on, this was added at Titi's request to cleanup junk files in his scenario.

 

anything