aboutsummaryrefslogtreecommitdiffstats
path: root/executor/test.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-06-04 12:43:35 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-06-05 09:08:39 +0000
commit3623b56060a97ba5ae6e4ba25db127e58ad0e6be (patch)
tree8c597f695bc91fdf62d249458a88e5aa90cd348b /executor/test.h
parentb10deed5794ca7dc562130060796399dd1c66117 (diff)
executor: allow to run a single test
Diffstat (limited to 'executor/test.h')
-rw-r--r--executor/test.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/executor/test.h b/executor/test.h
index d2b0d4b94..bb1291f97 100644
--- a/executor/test.h
+++ b/executor/test.h
@@ -247,11 +247,13 @@ static struct {
{"test_coverage_filter", test_coverage_filter},
};
-static int run_tests()
+static int run_tests(const char* test)
{
int ret = 0;
for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
const char* name = tests[i].name;
+ if (test && strcmp(test, name))
+ continue;
printf("=== RUN %s\n", name);
int res = tests[i].f();
ret |= res > 0;