Skip to content

Commit

Permalink
impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Foo committed Feb 5, 2024
1 parent d37e1ba commit 518ff8f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions script/RunTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import subprocess, argparse, os
import subprocess, argparse, os, platform

class TestMap:
def forEachProcess(self):
Expand All @@ -14,7 +14,13 @@ def __str__(self):
def run(self):
failed = []
for name in self.forEachProcess():
completed = subprocess.run(['./{}'.format(name)], cwd=self.folder, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
cmd_possible = {
'Linux':'./{}'.format(name),
'Windows':name
}
cmd = cmd_possible[platform.system()]
print('======================================>>>>> running `{}`'.format(cmd))
completed = subprocess.run([cmd], cwd=self.folder, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if not completed.returncode == 0:
failed.append(name)
print('{}\n{}\n'.format(completed.stdout, completed.stderr))
Expand Down

0 comments on commit 518ff8f

Please sign in to comment.