mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
fix(ci): read the test executable list on Windows as well
The Windows job failed on the new step with "no test executables found under build". Ninja prints the target names with the platform separator, so the Windows build graph lists tests\name_tests.exe where Linux lists tests/name_tests, and the reader matched neither the backslash nor the .exe suffix. Accept both separators and a .exe suffix. Verified by driving the function with recorded Ninja output for both platforms, which now return the same names, and by re-running the check against the Linux tree, which still reports 362 test executables and the same five.
This commit is contained in:
@@ -3,7 +3,7 @@ import re
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
TEST_OUTPUT = "tests/"
|
||||
TEST_OUTPUT = r"tests[\\/]"
|
||||
|
||||
KNOWN_UNRUN = {
|
||||
"agc_driver_bda_device_tests",
|
||||
@@ -19,9 +19,14 @@ def built(build):
|
||||
capture_output=True, text=True, check=True).stdout
|
||||
names = set()
|
||||
for line in listed.splitlines():
|
||||
found = re.match(rf"^{TEST_OUTPUT}([A-Za-z0-9_]+)(?::|\s|$)", line)
|
||||
if found:
|
||||
names.add(found.group(1))
|
||||
found = re.match(rf"^{TEST_OUTPUT}([A-Za-z0-9_.]+)", line)
|
||||
if not found:
|
||||
continue
|
||||
name = found.group(1).rstrip(".")
|
||||
if name.endswith(".exe"):
|
||||
name = name[:-4]
|
||||
if name:
|
||||
names.add(name)
|
||||
return names
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user