Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=22298 Buffalo should be able to detect test failures
[fs/lustre-release.git]
/
lustre
/
tests
/
acceptance-small.sh
diff --git
a/lustre/tests/acceptance-small.sh
b/lustre/tests/acceptance-small.sh
index
2a52d82
..
f92f3fa
100755
(executable)
--- a/
lustre/tests/acceptance-small.sh
+++ b/
lustre/tests/acceptance-small.sh
@@
-31,6
+31,8
@@
fi
[ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\""
[ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484"
[ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\""
[ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484"
+export TF_FAIL=$TMP/tf.fail
+
if [ "$ACC_SM_ONLY" ]; then
for O in $DEFAULT_SUITES; do
O=$(echo $O | tr "-" "_" | tr "[:lower:]" "[:upper:]")
if [ "$ACC_SM_ONLY" ]; then
for O in $DEFAULT_SUITES; do
O=$(echo $O | tr "-" "_" | tr "[:lower:]" "[:upper:]")
@@
-104,7
+106,7
@@
title() {
esac
fi
fi
esac
fi
fi
- log "-----============= acceptance-small: "$*" ============-----
`date`
"
+ log "-----============= acceptance-small: "$*" ============-----
$(date)
"
}
is_sanity_benchmark() {
}
is_sanity_benchmark() {
@@
-141,9
+143,24
@@
run_suite() {
echo "$suite_script located."
if [[ ${!suite} != no ]]; then
echo "$suite_script located."
if [[ ${!suite} != no ]]; then
+ local rc
+ local status
+ local duration
+ local start_ts=$(date +%s)
+ rm -rf $TF_FAIL
title $suite_name
log_test $suite_name
bash $suite_script ${!suite_only}
title $suite_name
log_test $suite_name
bash $suite_script ${!suite_only}
+ rc=$?
+ duration=$(($(date +%s) - $start_ts))
+ if [ -f $TF_FAIL -o $rc -ne 0 ]; then
+ status="FAIL"
+ else
+ status="PASS"
+ fi
+ echo "Script: $status"
+ log_test_status $duration $status
+
$CLEANUP
$SETUP
eval ${suite}="done"
$CLEANUP
$SETUP
eval ${suite}="done"