Skip to content
Snippets Groups Projects
Commit cc2966a3 authored by benjamin.franksen's avatar benjamin.franksen
Browse files

test: make pvGetComplete.st more user friendly

parent aead703a
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,10 @@ program pvGetCompleteTest ...@@ -8,10 +8,10 @@ program pvGetCompleteTest
%%#include "../testSupport.h" %%#include "../testSupport.h"
#define NRUNS 50000 #define NRUNS 20000
entry { entry {
seq_test_init(2*NRUNS); seq_test_init(1);
testDiag("start"); testDiag("start");
} }
...@@ -25,8 +25,12 @@ ss pvGetComplete { ...@@ -25,8 +25,12 @@ ss pvGetComplete {
state count { state count {
when (n < NRUNS) { when (n < NRUNS) {
n++; n++;
if (n%1000==0) {
testDiag("passed %d runs", n);
}
} state test } state test
when () { when () {
testPass("%d pvGets completed in time and results agree with predictions", 2*NRUNS);
} exit } exit
} }
state test { state test {
...@@ -43,15 +47,22 @@ ss pvGetComplete { ...@@ -43,15 +47,22 @@ ss pvGetComplete {
} }
} }
when (delay(2)) { when (delay(2)) {
testSkip(2,"completion timeout"); testFail("pvGet completion timeout");
} state count } state fail
when (pvGetComplete(r[0]) && pvGetComplete(r[1])) { when (pvGetComplete(r[0]) && pvGetComplete(r[1])) {
int i; int i;
for (i=0; i<2; 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 count
} }
state fail {
when () {
} exit
}
} }
exit { exit {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment