mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
unittests: Add a unit test that causes a SEGV and...
...that can only be run by explicitly calling it with 'test execute category /DO_NOT_RUN/ name RAISE_SEGV' This allows us to more easily test CI and debugging tools that should do certain things when asterisk coredumps. To allow this a new member was added to the ast_test_info structure named 'explicit_only'. If set by a test, the test will be skipped during a 'test execute all' or 'test execute category ...'. Change-Id: Ia3a11856aae4887df9a02b6b081cc777b36eb6ed
This commit is contained in:
@@ -344,7 +344,7 @@ static int test_execute_multiple(const char *name, const char *category, struct
|
||||
execute = 0;
|
||||
switch (mode) {
|
||||
case TEST_CATEGORY:
|
||||
if (!test_cat_cmp(test->info.category, category)) {
|
||||
if (!test_cat_cmp(test->info.category, category) && !test->info.explicit_only) {
|
||||
execute = 1;
|
||||
}
|
||||
break;
|
||||
@@ -354,7 +354,7 @@ static int test_execute_multiple(const char *name, const char *category, struct
|
||||
}
|
||||
break;
|
||||
case TEST_ALL:
|
||||
execute = 1;
|
||||
execute = !test->info.explicit_only;
|
||||
}
|
||||
|
||||
if (execute) {
|
||||
|
Reference in New Issue
Block a user