mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
fix(test): convert forbidden SKIP()s in the complexity suite to policy forms
The no-skips lint gate (scripts/check-no-test-skips.sh) rightly rejected the throughput-report test's two SKIP() calls: - CBM_SKIP_PERF=1 is deliberate operator configuration, not a hidden environment failure: reporting is off by request, so the test PASSes with a stderr note instead of skipping. - an uncreatable report dir IS an environment failure and now FAILs with the remedy in the message (set CBM_COMPLEXITY_REPORT_DIR), per the policy text. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
1 parent
f95fe55b82
commit
ec16764fee
1 file changed
+7
-2
@@ -609,7 +609,12 @@ TEST(complexity_shared_package_growth_stays_linear) {
|
||||
TEST(complexity_throughput_report_written) {
|
||||
const char *skip_perf = getenv("CBM_SKIP_PERF");
|
||||
if (skip_perf && skip_perf[0] == '1') {
|
||||
SKIP("CBM_SKIP_PERF: throughput rates are meaningless under CPU starvation");
|
||||
/* Deliberate operator config, not a hidden environment failure
|
||||
* (no-skips policy): rates measured under CBM_SKIP_PERF starvation
|
||||
* would only mislead, so reporting is OFF and there is nothing left
|
||||
* for this test to assert. */
|
||||
fprintf(stderr, " [complexity] CBM_SKIP_PERF=1: throughput report disabled by config\n");
|
||||
PASS();
|
||||
}
|
||||
if (cx_measure_pair() != 0) {
|
||||
FAIL("failed to build/run the complexity corpus pair");
|
||||
@@ -619,7 +624,7 @@ TEST(complexity_throughput_report_written) {
|
||||
dir = "private/benchmarks";
|
||||
}
|
||||
if (th_mkdir_p(dir) != 0) {
|
||||
SKIP("report dir not creatable here (read-only checkout?)");
|
||||
FAIL("report dir not creatable (set CBM_COMPLEXITY_REPORT_DIR to a writable path)");
|
||||
}
|
||||
char path[1024];
|
||||
snprintf(path, sizeof(path), "%s/complexity-%lld.json", dir, (long long)time(NULL));
|
||||
|
||||
Reference in new issue
Block a user