Skip to content

Commit c946f3c

Browse files
committed
Problem: private_selftest is DRAFT but called unconditionally
Solution: wrap it in ifdefs to fix stable-only builds
1 parent c7cc547 commit c946f3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zproject_class.gsl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,10 @@ test_runall (bool verbose)
292292
continue;
293293
if (!item->subtest)
294294
item->test (verbose);
295+
#ifdef $(PROJECT.PREFIX)_BUILD_DRAFT_API // selftest is still in draft
295296
else
296297
$(project.prefix)_private_selftest (verbose, item->subtest);
298+
#endif // $(PROJECT.PREFIX)_BUILD_DRAFT_API
297299
}
298300

299301
printf ("Tests passed OK\\n");
@@ -393,8 +395,10 @@ main (int argc, char **argv)
393395
printf ("Running $(project.name) test '%s'...\\n", test->testname);
394396
if (!test->subtest)
395397
test->test (verbose);
398+
#ifdef $(PROJECT.PREFIX)_BUILD_DRAFT_API // selftest is still in draft
396399
else
397400
$(project.prefix)_private_selftest (verbose, test->subtest);
401+
#endif // $(PROJECT.PREFIX)_BUILD_DRAFT_API
398402
}
399403
else
400404
test_runall (verbose);

0 commit comments

Comments
 (0)