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

test: ensure that tests cover seq exit phase

parent 277d7ca1
No related branches found
No related tags found
No related merge requests found
...@@ -59,11 +59,11 @@ $killit; ...@@ -59,11 +59,11 @@ $killit;
EOF EOF
} elsif (-r "$db") { } elsif (-r "$db") {
print $OUT <<EOF; print $OUT <<EOF;
exec "$valgrind./$exe -S -t -d $db" or die "exec failed: $err"; system "$valgrind./$exe -S -t -d $db";
EOF EOF
} else { } else {
print $OUT <<EOF; print $OUT <<EOF;
exec "$valgrind./$exe -S -t" or die "exec failed: $err"; system "$valgrind./$exe -S -t";
EOF EOF
} }
......
...@@ -8,6 +8,7 @@ in the file LICENSE that is included with this distribution. ...@@ -8,6 +8,7 @@ in the file LICENSE that is included with this distribution.
#include "epicsThread.h" #include "epicsThread.h"
#include "epicsEvent.h" #include "epicsEvent.h"
#include "epicsExit.h"
#include "seqCom.h" #include "seqCom.h"
#include "../testSupport.h" #include "../testSupport.h"
...@@ -44,6 +45,11 @@ void seq_test_init(int num_tests) ...@@ -44,6 +45,11 @@ void seq_test_init(int num_tests)
} }
} }
void seq_test_at_thread_exit(void *dummy)
{
epicsExit(EXIT_SUCCESS);
}
void seq_test_done(void) void seq_test_done(void)
{ {
epicsThreadSetPriority(epicsThreadGetIdSelf(), epicsThreadPriorityMedium); epicsThreadSetPriority(epicsThreadGetIdSelf(), epicsThreadPriorityMedium);
...@@ -51,7 +57,7 @@ void seq_test_done(void) ...@@ -51,7 +57,7 @@ void seq_test_done(void)
#if defined(vxWorks) #if defined(vxWorks)
epicsEventSignal(this_test_done); epicsEventSignal(this_test_done);
#else #else
exit(0); epicsAtThreadExit(seq_test_at_thread_exit, 0);
#endif #endif
} }
......
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