-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83aa120
commit 9afcbe3
Showing
5 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
import subprocess | ||
import time | ||
from tqdm import tqdm | ||
|
||
BASE_DIR = "/tmp/data" | ||
|
||
tests = ["example_test", "restart"] | ||
|
||
|
||
def main(): | ||
print("Creating work dir") | ||
data_dir = BASE_DIR + f"run-{time.time()}/" | ||
if not os.path.isdir(data_dir): | ||
os.makedirs(data_dir) | ||
print("Running tests") | ||
for test_name in tqdm(tests): | ||
test_dir = "./tests/" + test_name | ||
log_dir = data_dir + test_name.replace(".py", ".log") | ||
log_file = open(log_dir, "wt") | ||
test = subprocess.Popen(["python", test_dir + ".py"], | ||
stdout=log_file, stderr=log_file) | ||
test.wait() | ||
if test.returncode != 0: | ||
print(f"Test {test_name} not passed") | ||
else: | ||
print(f"Test {test_name} passed") | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters