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 from glob import glob
import os import os
from os.path import exists, join
import sys import sys
from common import * from common import *
@ -13,6 +14,10 @@ for filename in glob("expected/**/*.txt", recursive=True):
lmp_file = filename.replace("expected/", "demos/").replace(".txt", ".lmp") lmp_file = filename.replace("expected/", "demos/").replace(".txt", ".lmp")
cfg = read_config(lmp_file) 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") pwad = cfg.get("pwad")
if pwad is not None: if pwad is not None:
out_file = filename.replace("expected/", "output/") out_file = filename.replace("expected/", "output/")

View file

@ -13,7 +13,8 @@ lmp_file, out_file = sys.argv[1:]
cfg = read_config(lmp_file) cfg = read_config(lmp_file)
args = [ args = [
source_port, "-iwad", cfg["iwad"], source_port,
"-iwad", join("iwads", cfg["iwad"]),
"-statdump", out_file, "-statdump", out_file,
"-timedemo", lmp_file, "-timedemo", lmp_file,
] + shlex.split(os.getenv("DOOMOPTS", "")) ] + shlex.split(os.getenv("DOOMOPTS", ""))