mirror of
https://github.com/chocolate-doom/statcheck.git
synced 2024-11-24 05:11:27 +00:00
Add iwads/ subdirectory for placing IWAD files.
This commit is contained in:
parent
5a0c33a256
commit
c32e69b438
3 changed files with 11 additions and 1 deletions
4
iwads/.gitignore
vendored
Normal file
4
iwads/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
doom.wad
|
||||
doom2.wad
|
||||
plutonia.wad
|
||||
tnt.wad
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
from glob import glob
|
||||
import os
|
||||
from os.path import exists, join
|
||||
import sys
|
||||
|
||||
from common import *
|
||||
|
@ -13,6 +14,10 @@ for filename in glob("expected/**/*.txt", recursive=True):
|
|||
lmp_file = filename.replace("expected/", "demos/").replace(".txt", ".lmp")
|
||||
cfg = read_config(lmp_file)
|
||||
|
||||
iwad = cfg.get("iwad")
|
||||
assert exists(join("iwads", iwad)), (
|
||||
"IWAD file %r not found in iwads/ directory." % iwad)
|
||||
|
||||
pwad = cfg.get("pwad")
|
||||
if pwad is not None:
|
||||
out_file = filename.replace("expected/", "output/")
|
||||
|
|
|
@ -13,7 +13,8 @@ lmp_file, out_file = sys.argv[1:]
|
|||
cfg = read_config(lmp_file)
|
||||
|
||||
args = [
|
||||
source_port, "-iwad", cfg["iwad"],
|
||||
source_port,
|
||||
"-iwad", join("iwads", cfg["iwad"]),
|
||||
"-statdump", out_file,
|
||||
"-timedemo", lmp_file,
|
||||
] + shlex.split(os.getenv("DOOMOPTS", ""))
|
||||
|
|
Loading…
Reference in a new issue