X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fclam%2Ftarget_runner.sh;h=553463f06007f5fb150028a0cdb89af173d4b88f;hb=7c7d191539d4e5a94c4b39433e32b05deab44f24;hp=d915a9aa9e0e32b2806cd4673603a2c1f3eca014;hpb=94202be535cdd66fc7bfea5e8c5be0be859002c6;p=feisty_meow.git diff --git a/scripts/clam/target_runner.sh b/scripts/clam/target_runner.sh old mode 100755 new mode 100644 index d915a9aa..553463f0 --- a/scripts/clam/target_runner.sh +++ b/scripts/clam/target_runner.sh @@ -16,14 +16,26 @@ #echo -e "\tDIRTY_FILE=${DIRTY_FILE}" #echo -e "\tSUBMAKE_FLAG=${SUBMAKE_FLAG}" #echo -e "\tFAILURE_FILE=${FAILURE_FILE}" +#echo -e "\tRUN_ALL_TESTS=${RUN_ALL_TESTS}" -if [ ! -z "${RUN_TARGETS}" ]; then +if [ ! -z "${RUN_TARGETS}" -a ! -z "${RUN_ALL_TESTS}" ]; then if [ -f "${DIRTY_FILE}" -o -f "${SUBMAKE_FLAG}" ]; then total_exitval=0; for program_name in ${RUN_TARGETS}; do base=$(basename $program_name); - "$program_name"; - exitval=$?; + if [ "$OP_SYSTEM" == "WIN32" ]; then + # extra step to force win32 applications to stay held in our grip, + # since they will float off and appear to have stopped when + # run by cygwin. but by grabbing the i/o stream, we know it's + # running until it's done. + "$program_name" 2>&1 | cat + # we care about the exit status of the first process in the pipe, + # which is the app being run. + exitval=${PIPESTATUS[0]} + else + "$program_name" + exitval=$?; + fi if [ $exitval -ne 0 ]; then echo "ERROR: $program_name exits with $exitval at $(date)"; total_exitval=$(($total_exitval + 1));