mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-25 23:40:53 +08:00
Updated testing so that failures of the should fail tests will compile
but will return 1 in testing if they actually built
This commit is contained in:
parent
524517b369
commit
748a1fd5a9
@ -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;
|
||||
|
||||
|
11
test_fail.sh
11
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user