22 lines
547 B
Bash
22 lines
547 B
Bash
#!/bin/sh
|
|
|
|
# Note:
|
|
# This works perfectly on Windows 10 Anniversary Edition using Ubuntu on Windows,
|
|
# just apt-get install g++!
|
|
|
|
CXXTest="../../CxxTest"
|
|
CXXTestGen="$CXXTest/bin/cxxtestgen"
|
|
|
|
$CXXTestGen --error-printer -o runner.cpp SegmentDisplayTestSuite.h
|
|
if [ $? -ne 0 ]; then
|
|
echo "Generating unit test runner failed, aborting"
|
|
exit $?
|
|
fi
|
|
|
|
g++ -o runner -I$CXXTest -I ../ -Imock -std=c++11 mock/Mock.cpp ../lib/*.cpp runner.cpp
|
|
if [ $? -ne 0 ]; then
|
|
echo "Compiling unit test runner failed, aborting"
|
|
exit $?
|
|
fi
|
|
|
|
./runner |