-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
70 lines (60 loc) · 1.37 KB
/
run.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
#!/bin/bash
create_missing_dirs() {
if [ ! -d "binary" ]; then
mkdir binary
fi
if [ ! -d "object" ]; then
mkdir object
fi
}
clean_and_compile() {
create_missing_dirs
make clean; make
}
create_all_tests() {
clean_and_compile
make test_data
make test_entry
make test_list
make test_table
}
# runs tests with valgrind
run_all_tests_valgrind() {
create_all_tests
echo "--- RUNNING TEST_DATA ---"
valgrind ./binary/test_data
echo "--- RUNNING TEST_ENTRY ---"
valgrind ./binary/test_entry
echo "--- RUNNING TEST_LIST ---"
valgrind ./binary/test_list
echo "--- RUNNING TEST_TABLE ---"
valgrind ./binary/test_table
}
run_test_data() {
clean_and_compile
echo "--- COMPILING TEST_DATA ---"
make test_data
echo "--- RUNNING TEST_DATA ---"
valgrind ./binary/test_data
}
run_test_entry() {
clean_and_compile
echo "--- COMPILING TEST_ENTRY ---"
make test_entry
echo "--- RUNNING TEST_ENTRY ---"
valgrind ./binary/test_entry
}
run_test_list() {
clean_and_compile
echo "--- COMPILING TEST_LIST ---"
make test_list
echo "--- RUNNING TEST_LIST ---"
valgrind ./binary/test_list
}
run_test_table() {
clean_and_compile
echo "--- COMPILING TEST_TABLE ---"
make test_table
echo "--- RUNNING TEST_TABLE ---"
valgrind ./binary/test_table
}