diff --git a/compile_fail.sh b/compile_fail.sh index 936c09a..d418a24 100755 --- a/compile_fail.sh +++ b/compile_fail.sh @@ -5,10 +5,12 @@ shift 1 export BUILD_COMMAND=$@ echo "Build command: ${BUILD_COMMAND}" eval ${BUILD_COMMAND} #>/dev/null 2>/dev/null + if [ $? -eq 0 ]; then - exit 1; + echo -ne "#!/bin/bash\nexit 1;" > ${TEST_BIN_NAME} +else + echo -ne "#!/bin/bash\nexit 0;" > ${TEST_BIN_NAME} 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 index 20de1f5..6562647 100755 --- a/test_fail.sh +++ b/test_fail.sh @@ -1,7 +1,10 @@ #!/bin/bash -if [[ -e $@ ]]; then - exit 1; -fi -exit 0; +echo $1 +eval $1 + +if [ $? -eq 0 ]; then + exit 0; +fi +exit 1;