|
|
@ -4,10 +4,12 @@ printf "Running program...\n\n\n" |
|
|
|
if [ "$1" = "test" ] |
|
|
|
if [ "$1" = "test" ] |
|
|
|
then |
|
|
|
then |
|
|
|
printf "Running tests...\n" |
|
|
|
printf "Running tests...\n" |
|
|
|
|
|
|
|
echo "#define TEST_SUITE" > ./test/test.h |
|
|
|
if g++ $(find . -type f -name "*.cpp") -g ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
|
|
|
if g++ $(find . -type f -name "*.cpp") -g ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
|
|
|
gdb ./${PROJECT_NAME} "$@" |
|
|
|
gdb ./${PROJECT_NAME} "$@" |
|
|
|
fi |
|
|
|
fi |
|
|
|
else |
|
|
|
else |
|
|
|
|
|
|
|
echo "" > ./test/test.h |
|
|
|
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*") -g ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
|
|
|
if g++ $(find . -type f -name "*.cpp" -not -path "./test/*") -g ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then |
|
|
|
gdb ./${PROJECT_NAME} "$@" |
|
|
|
gdb ./${PROJECT_NAME} "$@" |
|
|
|
fi |
|
|
|
fi |
|
|
|