mirror of https://github.com/PCSX2/pcsx2.git
GSRunner: Don't skip dumps with dots in their filename
This commit is contained in:
parent
747e11d7dd
commit
cd4434135e
|
@ -7,20 +7,19 @@ import multiprocessing
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
def is_gs_path(path):
|
def get_gs_name(path):
|
||||||
ppath = Path(path)
|
lpath = path.lower()
|
||||||
for extension in [[".gs"], [".gs", ".xz"], [".gs", ".zst"]]:
|
|
||||||
if ppath.suffixes == extension:
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
for extension in [".gs", ".gs.xz", ".gs.zst"]:
|
||||||
|
if lpath.endswith(extension):
|
||||||
|
return os.path.basename(path)[:-len(extension)]
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def run_regression_test(runner, dumpdir, renderer, upscale, renderhacks, parallel, gspath):
|
def run_regression_test(runner, dumpdir, renderer, upscale, renderhacks, parallel, gspath):
|
||||||
args = [runner]
|
args = [runner]
|
||||||
gsname = Path(gspath).name
|
gsname = get_gs_name(gspath)
|
||||||
while gsname.rfind('.') >= 0:
|
|
||||||
gsname = gsname[:gsname.rfind('.')]
|
|
||||||
|
|
||||||
real_dumpdir = os.path.join(dumpdir, gsname).strip()
|
real_dumpdir = os.path.join(dumpdir, gsname).strip()
|
||||||
if not os.path.exists(real_dumpdir):
|
if not os.path.exists(real_dumpdir):
|
||||||
|
@ -62,7 +61,7 @@ def run_regression_test(runner, dumpdir, renderer, upscale, renderhacks, paralle
|
||||||
|
|
||||||
def run_regression_tests(runner, gsdir, dumpdir, renderer, upscale, renderhacks, parallel=1):
|
def run_regression_tests(runner, gsdir, dumpdir, renderer, upscale, renderhacks, parallel=1):
|
||||||
paths = glob.glob(gsdir + "/*.*", recursive=True)
|
paths = glob.glob(gsdir + "/*.*", recursive=True)
|
||||||
gamepaths = list(filter(is_gs_path, paths))
|
gamepaths = list(filter(lambda x: get_gs_name(x) is not None, paths))
|
||||||
|
|
||||||
if not os.path.isdir(dumpdir):
|
if not os.path.isdir(dumpdir):
|
||||||
os.mkdir(dumpdir)
|
os.mkdir(dumpdir)
|
||||||
|
|
Loading…
Reference in New Issue