-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetupAll.py
More file actions
46 lines (37 loc) · 1.48 KB
/
setupAll.py
File metadata and controls
46 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import sys
sys.path.append('scripts')
import os
from timedprocess import Command
import argparse
import time
def main():
start = time.time()
parser = argparse.ArgumentParser(description='Setup Project')
parser.add_argument('--cc', type=int, help='Compute Capability (e.g. 61, 70, 75', default=70)
args = parser.parse_args()
current_dir = os.getcwd()
# Build general testcase
Command("python clean.py".format()).run()
Command("python setup.py --cc {}".format(str(args.cc))).run(timeout=3600)
# Build allocation testcases
os.chdir(os.path.join(current_dir, "tests/alloc_tests"))
Command("python clean.py".format()).run()
Command("python setup.py --cc {}".format(str(args.cc))).run(timeout=3600)
# Build fragmentation testcases
os.chdir(os.path.join(current_dir, "tests/frag_tests"))
Command("python clean.py".format()).run()
Command("python setup.py --cc {}".format(str(args.cc))).run(timeout=3600)
# Build graph testcases
os.chdir(os.path.join(current_dir, "tests/graph_tests"))
Command("python clean.py".format()).run()
Command("python setup.py --cc {}".format(str(args.cc))).run(timeout=3600)
# Build synthetic testcases
os.chdir(os.path.join(current_dir, "tests/synth_tests"))
Command("python clean.py".format()).run()
Command("python setup.py --cc {}".format(str(args.cc))).run(timeout=3600)
end = time.time()
timing = end - start
print("Script finished in {0:.0f} min {1:.0f} sec".format(timing / 60, timing % 60))
print("Setup done!")
if __name__ == "__main__":
main()