xwim/tests/runtests/run.py

18 lines
502 B
Python
Raw Normal View History

2021-02-14 10:46:03 +00:00
#!/bin/python3
import os;
import sys;
import subprocess;
from fnmatch import fnmatch;
for root, dirs, files in os.walk('../../'):
for f in files:
if len(sys.argv) > 1 and not fnmatch(f, sys.argv[1]):
continue;
print(f"Running {f}")
print(f"{os.path.join(root,f)}")
r = subprocess.run(["../../../target/src/xwim", os.path.join(root, f)], capture_output=True, encoding='utf-8')
print(f"{r.stdout}")
print(f"{r.stderr}", file=sys.stderr)