From 524517b369e9574f2e5895734dfdfcb6c1242b14 Mon Sep 17 00:00:00 2001 From: Darrell Wright Date: Sun, 26 Nov 2017 23:11:58 -0500 Subject: [PATCH] Added scripts to do fail testing --- compile_fail.sh | 14 ++++++++++++++ test_fail.sh | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100755 compile_fail.sh create mode 100755 test_fail.sh diff --git a/compile_fail.sh b/compile_fail.sh new file mode 100755 index 0000000..936c09a --- /dev/null +++ b/compile_fail.sh @@ -0,0 +1,14 @@ +#!/bin/bash +export TEST_BIN_NAME=$1 +echo "Building ${TEST_BIN_NAME}" +shift 1 +export BUILD_COMMAND=$@ +echo "Build command: ${BUILD_COMMAND}" +eval ${BUILD_COMMAND} #>/dev/null 2>/dev/null +if [ $? -eq 0 ]; then + exit 1; +fi +echo "#!/bin/bash" > ${TEST_BIN_NAME} +chmod u+x ${TEST_BIN_NAME} +exit 0; + diff --git a/test_fail.sh b/test_fail.sh new file mode 100755 index 0000000..20de1f5 --- /dev/null +++ b/test_fail.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ -e $@ ]]; then + exit 1; +fi +exit 0; +