-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.py
81 lines (58 loc) · 2.59 KB
/
test.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import os
import time
import sys
defines = ["LINUX", "TEST"]
links = "-lsfml-graphics -lsfml-window -lsfml-system -lgtest -pthread"
output = "test"
defineString = ""
first = True
for item in defines:
if not first:
defineString += " "
else:
first = False
defineString += f"-D{item}"
os.chdir("test")
print('---------------------------')
print('-- graph operations test --')
print('---------------------------')
cppFiles = "../noose/nodeProvider/nodeFunctionality.cpp ../noose/nodeProvider/nodeProvider.cpp ../noose/logic/connectionSystem.cpp ../noose/logic/graphOperations.cpp ../noose/logic/node.cpp ../noose/logic/nodeSystem.cpp graphOperationsTest.cpp"
finalString = f"g++ -o {output} {cppFiles} {links} {defineString} -w"
os.system(finalString)
os.system("./test")
print('--------------------------')
print('-- node provider test --')
print('--------------------------')
cppFiles = "../noose/nodeProvider/nodeFunctionality.cpp ../noose/nodeProvider/nodeProvider.cpp ../noose/logic/connectionSystem.cpp ../noose/logic/graphOperations.cpp ../noose/logic/node.cpp ../noose/logic/nodeSystem.cpp nodeProviderTest.cpp"
finalString = f"g++ -o {output} {cppFiles} {links} {defineString} -w"
os.system(finalString)
os.system("./test")
print('--------------------------')
print('-- searcher test --')
print('--------------------------')
cppFiles = "../noose/nodeProvider/nodeFunctionality.cpp ../noose/nodeProvider/nodeProvider.cpp ../noose/logic/connectionSystem.cpp ../noose/logic/graphOperations.cpp ../noose/logic/node.cpp ../noose/logic/nodeSystem.cpp ../noose/searcher.cpp searcherTest.cpp"
finalString = f"g++ -o {output} {cppFiles} {links} {defineString} -w"
os.system(finalString)
os.system("./test")
print('--------------------------')
print('-- logic component test --')
print('--------------------------')
cppFiles = "../noose/nodeProvider/nodeFunctionality.cpp ../noose/nodeProvider/nodeProvider.cpp ../noose/logic/connectionSystem.cpp ../noose/logic/graphOperations.cpp ../noose/logic/node.cpp ../noose/logic/nodeSystem.cpp logicComponentTest.cpp"
finalString = f"g++ -o {output} {cppFiles} {links} {defineString} -w"
os.system(finalString)
os.system("./test")
'''
'''
'''
'''
if 'ui' not in sys.argv:
exit()
print('--------------------------')
print('-- ui node system test --')
print('--------------------------')
os.chdir("../noose/")
cppFiles = " ".join(["../noose" + file[1:] for file in os.popen("find . | grep cpp").read().split("\n") if len(file) > 0])
os.chdir("../test/")
finalString = f"g++ -o {output} {cppFiles} {links} {defineString} -w -DTEST"
os.system(finalString)
os.system("./test")