-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
39 lines (32 loc) · 1.03 KB
/
main.py
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
from total_tests import *
from total_experiments import run_experiments
import sys
def main():
# Running experiments
if len(sys.argv) == 2 and sys.argv[1] == '--experiments':
run_experiments()
# Running validation tests
else:
to_run = []
draw = False
# Default setup
if len(sys.argv) == 1:
to_run = ["SAT", "CSP", "CSP_iterative", "SAT_iterative"]
# Custom setup
else:
for i in range(1, len(sys.argv)):
if sys.argv[i] == '--draw':
draw = True
else:
to_run.append(sys.argv[i])
for mode in to_run:
if mode == "CSP" or mode == "SAT" or mode == "CSP_iterative" or mode == "SAT_iterative":
if run_tests(mode, draw):
print("Tests passed.")
else:
print("Tests failed.")
else:
print("Unsupported mode")
return
if __name__ == '__main__':
main()