projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4063 from ntherning/fix-culture-info-problem-in-RepeatInfoTest
[mono.git]
/
scripts
/
ci
/
run-step.sh
diff --git
a/scripts/ci/run-step.sh
b/scripts/ci/run-step.sh
index 2e47f85518414c2deebcc949466344288b876dfd..4ea5fbc4c3a3e3593a5fc7c84782901ea32fe587 100755
(executable)
--- a/
scripts/ci/run-step.sh
+++ b/
scripts/ci/run-step.sh
@@
-1,5
+1,9
@@
#!/bin/bash -e
TIMEOUTCMD=`dirname "${BASH_SOURCE[0]}"`/babysitter
#!/bin/bash -e
TIMEOUTCMD=`dirname "${BASH_SOURCE[0]}"`/babysitter
+if ! ${TIMEOUTCMD} -h >/dev/null 2>&1; then
+ TIMEOUTCMD=timeout # fall back to timeout if babysitter doesn't work (e.g. python not installed or wrong version)
+fi
+
export MONO_BABYSITTER_LOG_FILE=babysitter_report.json_lines
helptext ()
export MONO_BABYSITTER_LOG_FILE=babysitter_report.json_lines
helptext ()
@@
-50,7
+54,7
@@
fi
STARTTIME=`date +%s`
echo "*** start: ${LABEL}"
if [ -n "${FATAL}" ]; then
STARTTIME=`date +%s`
echo "*** start: ${LABEL}"
if [ -n "${FATAL}" ]; then
- ${TIMEOUTCMD} --signal=ABRT --kill-after=60s ${TIMEOUT}
$@
&& echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[42mPassed\e[0m" || (echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[41mFailed\e[0m" && exit 1)
+ ${TIMEOUTCMD} --signal=ABRT --kill-after=60s ${TIMEOUT}
"$@"
&& echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[42mPassed\e[0m" || (echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[41mFailed\e[0m" && exit 1)
else
else
- ${TIMEOUTCMD} --signal=ABRT --kill-after=60s ${TIMEOUT}
$@
&& echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[42mPassed\e[0m" || echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[43mUnstable\e[0m"
+ ${TIMEOUTCMD} --signal=ABRT --kill-after=60s ${TIMEOUT}
"$@"
&& echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[42mPassed\e[0m" || echo -e "*** end($(echo $(date +%s) - ${STARTTIME} | bc)): ${LABEL}: \e[43mUnstable\e[0m"
fi
fi