-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis_build.sh
14 lines (14 loc) · 1.01 KB
/
.travis_build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
echo "Generating googletest library"
clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -isystem tests/googletest/googletest/ -c -o tests/gtest-all.o tests/googletest/googletest/src/gtest-all.cc
ar -rv tests/libgtest.a tests/gtest-all.o
echo "Compiling unit tests..."
clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -c -o tests/main.o tests/main.cpp
clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -c -o tests/node_test.o tests/node_test.cpp
clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -c -o tests/ksom_test.o tests/ksom_test.cpp
clang++ -std=c++1y -g -Wall -Wextra -o tests/gtest tests/main.o tests/node_test.o tests/ksom_test.o -pthread -Ltests/ -lgtest
echo "Running unit tests..."
tests/gtest -v
result=$?
rm -r tests/gtest tests/main.o tests/node_test.o tests/ksom_test.o tests/gtest-all.o tests/libgtest.a
echo "Unit tests completed : $result"
exit $result