-
Notifications
You must be signed in to change notification settings - Fork 27
/
test.sh
executable file
·136 lines (103 loc) · 2.76 KB
/
test.sh
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/sh
make gettingStarted
make createDataSet
make manipulatingChromosomes
make customNodeFunction
make customFitnessFunction
make customSelectionScheme
make customReproductionScheme
make averageBehaviour
make neuroEvolution
make customES
make visualization
echo "\n\n ** gettingStarted ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./gettingStarted > /dev/null
if [ $? -eq 1 ]; then
echo gettingStarted: memory leak...
exit
else
echo gettingStarted: PASS
fi
echo "\n\n ** createDataSet ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./createDataSet > /dev/null
if [ $? -eq 1 ]; then
echo createDataSet: memory leak...
exit
else
echo createDataSet: PASS
fi
echo "\n\n ** manipulatingChromosomes ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./manipulatingChromosomes > /dev/null
if [ $? -eq 1 ]; then
echo manipulatingChromosomes: memory leak...
exit
else
echo manipulatingChromosomes: PASS
fi
echo "\n\n ** customNodeFunction ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./customNodeFunction > /dev/null
if [ $? -eq 1 ]; then
echo customNodeFunction: memory leak...
exit
else
echo customNodeFunction: PASS
fi
echo "\n\n ** customFitnessFunction ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./customFitnessFunction > /dev/null
if [ $? -eq 1 ]; then
echo customFitnessFunction: memory leak...
exit
else
echo customFitnessFunction: PASS
fi
echo "\n\n ** customSelectionScheme ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 --error-exitcode=1 ./customSelectionScheme > /dev/null
if [ $? -eq 1 ]; then
echo customSelectionScheme: memory leak...
exit
else
echo customSelectionScheme: PASS
fi
echo "\n\n ** customReproductionScheme ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./customReproductionScheme > /dev/null
if [ $? -eq 1 ]; then
echo customReproductionScheme: memory leak...
exit
else
echo customReproductionScheme: PASS
fi
echo "\n\n ** averageBehaviour ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./averageBehaviour > /dev/null
if [ $? -eq 1 ]; then
echo averageBehaviour: memory leak...
exit
else
echo averageBehaviour: PASS
fi
echo "\n\n ** neuroEvolution ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./neuroEvolution > /dev/null
if [ $? -eq 1 ]; then
echo neuroEvolution: memory leak...
exit
else
echo neuroEvolution: PASS
fi
echo "\n\n ** customES ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./customES > /dev/null
if [ $? -eq 1 ]; then
echo customES: memory leak...
exit
else
echo customES: PASS
fi
echo "\n\n ** visualization ** \n\n"
valgrind --leak-check=yes --error-exitcode=1 ./visualization > /dev/null
if [ $? -eq 1 ]; then
echo visualization: memory leak...
exit
else
echo visualization: PASS
fi
echo "\n\n Test Complete :) \n\n"
rm chromo.*
make clean