From cc2966a385c8030343ab2c4d6f62fccb549eb9c0 Mon Sep 17 00:00:00 2001 From: "benjamin.franksen" <benjamin.franksen@helmholtz-berlin.de> Date: Thu, 19 Sep 2013 20:05:07 +0000 Subject: [PATCH] test: make pvGetComplete.st more user friendly --- test/validate/pvGetComplete.st | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/test/validate/pvGetComplete.st b/test/validate/pvGetComplete.st index 4f49aa92..d97200b7 100644 --- a/test/validate/pvGetComplete.st +++ b/test/validate/pvGetComplete.st @@ -8,10 +8,10 @@ program pvGetCompleteTest %%#include "../testSupport.h" -#define NRUNS 50000 +#define NRUNS 20000 entry { - seq_test_init(2*NRUNS); + seq_test_init(1); testDiag("start"); } @@ -25,8 +25,12 @@ ss pvGetComplete { state count { when (n < NRUNS) { n++; + if (n%1000==0) { + testDiag("passed %d runs", n); + } } state test when () { + testPass("%d pvGets completed in time and results agree with predictions", 2*NRUNS); } exit } state test { @@ -43,15 +47,22 @@ ss pvGetComplete { } } when (delay(2)) { - testSkip(2,"completion timeout"); - } state count + testFail("pvGet completion timeout"); + } state fail when (pvGetComplete(r[0]) && pvGetComplete(r[1])) { int i; for (i=0; i<2; i++) { - testOk(r[i]==w[i],"%d==%d",r[i],w[i]); + if (r[i] != w[i]) { + testFail("n=%d, i=%d, w=%d, r=%d", n, i, w[i], r[i]); + state fail; + } } } state count } + state fail { + when () { + } exit + } } exit { -- GitLab