When a test script calls another test script and there is a
failure in the called test script, the failure is not
propagated up to the main/calling test suite and Maloo is
not registering the failed test. An example of this is
sanity-dom calls sanity and sanityn, but, if a sanity test
fails, Maloo does not recognize the sanity failure.
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I1914ecbece469cc1faffdffa4c980241ba3020b2
Reviewed-on: https://review.whamcloud.com/39409
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
complete $SECONDS
check_and_cleanup_lustre
complete $SECONDS
check_and_cleanup_lustre
+exit_status "${TMP}/sanity.log ${TMP}/sanityn.log"
exit_status () {
local status=0
exit_status () {
local status=0
- local log=$TESTSUITELOG
+ local logs="$TESTSUITELOG $1"
+
+ for log in $logs; do
+ if [ -f "$log" ]; then
+ grep -qw FAIL $log && status=1
+ fi
+ done
- [ -f "$log" ] && grep -qw FAIL $log && status=1