Commit f39d346f authored by Tom Niget's avatar Tom Niget

Add files for stdout and stderr

parent 519e76e8
...@@ -55,14 +55,14 @@ class TestStatus(enum.Enum): ...@@ -55,14 +55,14 @@ class TestStatus(enum.Enum):
return color("{:^7s}".format(msg)) return color("{:^7s}".format(msg))
def exec_cmd(cmd, quiet): def exec_cmd(cmd, quiet):
stdout = subprocess.DEVNULL if quiet else None stdout = subprocess.DEVNULL if quiet else sys.stdout
stderr = subprocess.DEVNULL if quiet else None stderr = subprocess.DEVNULL if quiet else sys.stderr
return subprocess.run(cmd, shell=True, stdout=stdout, stderr=stderr).returncode return subprocess.run(cmd, shell=True, stdout=stdout, stderr=stderr).returncode
def run_test(path, quiet=True): def run_test(path, quiet=True):
if quiet: if quiet:
sys.stdout = open(os.devnull, 'w') sys.stdout = open(path.with_suffix(".out"), 'w')
sys.stderr = open(os.devnull, 'w') sys.stderr = open(path.with_suffix(".err"), 'w')
if args.only and path.stem not in args.only: if args.only and path.stem not in args.only:
return TestStatus.SKIPPED return TestStatus.SKIPPED
print(path.name) print(path.name)
......
* *
!/**/ !/**/
!*.* !*.*
*.cpp *.cpp
\ No newline at end of file *.err
*.out
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment