Add iwads/ subdirectory for placing IWAD files.

This commit is contained in:
Simon Howard 2024-09-01 00:10:58 -04:00
parent 5a0c33a256
commit c32e69b438
3 changed files with 11 additions and 1 deletions

4
iwads/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
doom.wad
doom2.wad
plutonia.wad
tnt.wad

View File

@ -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/")

View File

@ -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", ""))