summaryrefslogtreecommitdiffstats
path: root/cpukit/libtest
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-17 21:21:16 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-23 09:27:47 +0200
commit77814040262f2ae1a479f94d962139d68052b743 (patch)
tree24775331ece5294692e2b54ae5ed3f3bb5f2b366 /cpukit/libtest
parentlibtest: Split POSIX Keys support (diff)
downloadrtems-77814040262f2ae1a479f94d962139d68052b743.tar.bz2
libtest: Add T_stop()
Update #3199.
Diffstat (limited to 'cpukit/libtest')
-rw-r--r--cpukit/libtest/t-test.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/cpukit/libtest/t-test.c b/cpukit/libtest/t-test.c
index e74b4d3495..4c5746fc5c 100644
--- a/cpukit/libtest/t-test.c
+++ b/cpukit/libtest/t-test.c
@@ -423,8 +423,8 @@ T_add_failure(T_context *ctx)
memory_order_relaxed);
}
-static void
-T_stop(T_context *ctx)
+T_NO_RETURN static void
+T_do_stop(T_context *ctx)
{
T_fixture_node *node;
@@ -445,6 +445,12 @@ T_stop(T_context *ctx)
longjmp(ctx->case_begin_context, 1);
}
+T_NO_RETURN void
+T_stop(void)
+{
+ T_do_stop(&T_instance);
+}
+
void T_plan(unsigned int planned_steps)
{
T_context *ctx;
@@ -568,7 +574,7 @@ T_check_true(bool ok, const T_check_context *t, const char *fmt, ...)
}
if ((t->flags & T_CHECK_STOP) != 0) {
- T_stop(ctx);
+ T_do_stop(ctx);
}
} else if ((t->flags & T_CHECK_QUIET) == 0 &&
ctx->verbosity >= T_VERBOSE) {