Code related to defining and creating the $TF_FAIL file was missed in
the port of auster and yaml to b1_8. This patch adds the missing
code. Namely:
- Define TF_FAIL in acceptance-small.sh
- add 'touch $TF_FAIL' to the test-framework.sh ERR signal trap
Additionally, the file test for $TF_FAIL variable should be quoted in
acceptance-small.sh and auster.sh. Otherwise, if this variable is not
defined, bash will spit out something like
acceptance-small.sh: line 123: [: too many arguments
Bash variables should generally be quoted whenever they are referenced.
(see http://tldp.org/LDP/abs/html/quotingvar.html).
Signed-off-by: Chris Horn <hornc@cray.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I2071c859d00b8cd8bd423bf9f626b44352456191
Reviewed-on: http://review.whamcloud.com/516
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
ACC_SM_ONLY="${ACC_SM_ONLY} $@"
fi
+export TF_FAIL=$TMP/tf.fail
+
if [ "$ACC_SM_ONLY" ]; then
for O in $DEFAULT_SUITES; do
O=$(echo $O | tr "-" "_" | tr "[:lower:]" "[:upper:]")
bash $suite_script ${!suite_only}
rc=$?
duration=$(($(date +%s) - $start_ts))
- if [ -f $TF_FAIL -o $rc -ne 0 ]; then
+ if [ -f "$TF_FAIL" -o $rc -ne 0 ]; then
status="FAIL"
else
status="PASS"
doit bash $suite_script
rc=$?
duration=$(($(date +%s) - $start_ts))
- if [ -f $TF_FAIL -o $rc -ne 0 ]; then
+ if [ -f "$TF_FAIL" -o $rc -ne 0 ]; then
status="FAIL"
else
status="PASS"
#!/bin/bash
# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-trap 'print_summary && echo "test-framework exiting on error"' ERR
+trap 'print_summary && touch $TF_FAIL && \
+ echo "test-framework exiting on error"' ERR
set -e
#set -x