From fd991cb9640907b9889ed45829ec2d9d97f5a8a7 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Fri, 22 Jan 2021 04:23:52 -0800 Subject: [PATCH] Improve sonobuoy status output handling Signed-off-by: Brad Davidson --- scripts/test-helpers | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/test-helpers b/scripts/test-helpers index 9384459a48..136253d818 100755 --- a/scripts/test-helpers +++ b/scripts/test-helpers @@ -171,12 +171,12 @@ export -f dump-logs # --- retrieve-sonobuoy-logs() { - sonobuoy status || true - local status=passed local code=0 + local testStatus=$(sonobuoy status 2>&1) + cat <<< $testStatus - if ! sonobuoy status | grep -q -E ' +e2e +complete +passed +'; then + if ! grep -q -E '\s+e2e\s+complete\s+passed\s+' <<< $testStatus; then status=failed code=1 fi