Test suite now automatically enables/disables itself

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 2 years ago
parent 987ed63b81
commit 1bd63d2787
  1. 2
      C++/scripts/build.sh
  2. 2
      C++/scripts/debug.sh
  3. 4
      C++/scripts/md5

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

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

@ -1,6 +1,6 @@
build.sh:ca58f10d4e30d807987ea0105930ae51 -
build.sh:6fbec04ed16be42bab846f1eed603133 -
commit.sh:d03a46e721060c22ccb146e19d27e70a -
debug.sh:cd1190f874a6f85a7ac7631ef0a00490 -
debug.sh:7f57c6640be5f262988961c3b45dce97 -
lines.sh:3b907786f7fc9204025993016c9080de -
release.sh:0a525311cc14b9c8aefc6f2b816129a1 -
temp:d41d8cd98f00b204e9800998ecf8427e -

Loading…
Cancel
Save