Skip to content

Commit ab14b7c

Browse files
lkarstenFelipe Zimmerle
authored andcommitted
Add support for disabling test cases.
The JSON test case format has an "enabled" key that is not currently being honored. This trivial patch adds support for skipping test cases that has enabled set to 0.
1 parent c22658e commit ab14b7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/regression/regression.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ void perform_unit_test(ModSecurityTest<RegressionTest> *test,
9393
std::vector<RegressionTest *> *tests,
9494
ModSecurityTestResults<RegressionTestResult> *res, int *count) {
9595

96-
9796
for (RegressionTest *t : *tests) {
97+
if (t->enabled == 0) {
98+
continue;
99+
}
100+
98101
CustomDebugLog *debug_log = new CustomDebugLog();
99102
modsecurity::ModSecurity *modsec = NULL;
100103
modsecurity::Rules *modsec_rules = NULL;

0 commit comments

Comments
 (0)