From 6fd5c75ab3993721cd1b0b00e0779a59d52f2837 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Thu, 31 Aug 2017 00:29:52 +0200 Subject: [PATCH] qa/check: allow tests to SKIP themselves --- qa/check | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qa/check b/qa/check index 65b0c14..375cb9b 100755 --- a/qa/check +++ b/qa/check @@ -18,10 +18,16 @@ for(t in $l){ echo -n $t: $t > /tmp/qa.log >[2=1] st = $status - if(~ `{echo $st|field 3} PASS) { + switch( `{echo $st|field 3} ){ + case PASS rm /tmp/qa.log && echo PASS + case SKIP + echo -n ' SKIP: ' && cat /tmp/qa.log && rm /tmp/qa.log + case FAIL + echo $st && cat /tmp/qa.log; exit $st + case * + echo Unexpected test result: $st && cat /tmp/qa.log; exit $st } - if not { echo $st && cat /tmp/qa.log; exit $st} } } }