From 43b11ea215d45e80f6d373c5c0bb5f73f32edae4 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 8 Apr 2016 14:10:01 -0500 Subject: [PATCH] Test: Compare resources even if SLA fails If the SLA fails, we still want to compare resources so we can tell if Rally is leaking resources regardless of the success or failure of the task. Change-Id: I16f69c15851892ca1d66c2c2d705e816a7bde7ea --- tests/ci/rally-gate.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/ci/rally-gate.sh b/tests/ci/rally-gate.sh index 32ae304a..27b948b3 100755 --- a/tests/ci/rally-gate.sh +++ b/tests/ci/rally-gate.sh @@ -76,9 +76,17 @@ rally task detailed --iterations-data > rally-plot/detailed_with_iterations.txt gzip -9 rally-plot/detailed_with_iterations.txt rally task report --out rally-plot/results.html gzip -9 rally-plot/results.html -rally task sla_check | tee rally-plot/sla.txt +# NOTE(stpierre): if the sla check fails, we still want osresources.py +# to run, so we turn off -e and save the return value +set +e +rally task sla_check | tee rally-plot/sla.txt +retval=$? +set -e + +cp resources_at_start.txt rally-plot/ python $BASE/new/rally/tests/ci/osresources.py\ --compare-with-list resources_at_start.txt\ | gzip > rally-plot/resources_diff.txt.gz -cp resources_at_start.txt rally-plot/ + +exit $retval