-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
42 lines (33 loc) · 665 Bytes
/
test.sh
File metadata and controls
42 lines (33 loc) · 665 Bytes
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
cd "`dirname $0`"
artifacts="artifacts"
if ! [ -d ./$artifacts ]; then
mkdir $artifacts
fi
cd $artifacts
source_files=(
'../src/parser.c'
'../src/tokenizer.c'
'../src/file-handler.c'
'../src/linked-list.c'
'../src/hash-table.c'
'../src/id-table.c'
)
test_files=(
'../tests/main.c'
'../tests/test.c'
'../tests/utils.c'
'../tests/test-tokenizer.c'
'../tests/test-parser.c'
'../tests/test-id-table.c'
)
files=("${source_files[@]}" "${test_files[@]}")
args=""
if [ -f ./_test ]; then
rm _test
fi
for file in "${files[@]}"; do
args+=$file' '
done
if clang -g -Wall -o _test $args; then
./_test
fi