Changed all test/bench runner build-time features to opt-in

- NO_COV    -> YES_COV
- NO_PERF   -> YES_PERF
- NO_PERFBD -> YES_PERFBD

Previously, COV defaulted to yes for tests, and PERFBD defaulted to yes
for benches. This is sometimes useful, but much less often than I
originally thought. Might as well not pay for what we don't use.

With this, the build features of the test/bench runners are consistent
by default, which is probably a good thing.

This _does_ have a noticable, if minor, impact on test runtime:

  YES_COV: 674.15s
  NO_COV:  584.97s (-13.2%)

As for the naming, the YES_* prefix is needed to avoid conflicts with
the tool variables themselves. I'm not sure what the best approach to
variable naming is here...

  $ YES_PERF=1 PERF=~/my_perf/my_perf make test-runner -j
This commit is contained in:
Christopher Haster
2024-02-16 03:23:40 -06:00
parent 75ac29e8e6
commit 0b4bdf7684
+6 -6
View File
@@ -132,13 +132,13 @@ endif
ifdef YES_PERFBD
TESTFLAGS += -t $(TEST_TRACE) --trace-backtrace --trace-freq=100
endif
ifndef NO_PERFBD
ifdef YES_PERFBD
BENCHFLAGS += -t $(BENCH_TRACE) --trace-backtrace --trace-freq=100
endif
ifdef YES_TESTMARKS
TESTFLAGS += -o $(TEST_CSV)
endif
ifndef NO_BENCHMARKS
ifdef YES_BENCHMARKS
BENCHFLAGS += -o $(BENCH_CSV)
endif
ifdef VERBOSE
@@ -356,7 +356,7 @@ summary-diff sizes-diff: $(OBJ) $(CI)
## Build the test-runner
.PHONY: test-runner build-test
test-runner build-test: CFLAGS+=-Wno-unused-function
ifndef NO_COV
ifdef YES_COV
test-runner build-test: CFLAGS+=--coverage
endif
ifdef YES_PERF
@@ -368,7 +368,7 @@ endif
# note we remove some binary dependent files during compilation,
# otherwise it's way to easy to end up with outdated results
test-runner build-test: $(TEST_RUNNER)
ifndef NO_COV
ifdef YES_COV
rm -f $(TEST_GCDA)
endif
ifdef YES_PERF
@@ -414,7 +414,7 @@ endif
ifdef YES_PERF
bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer
endif
ifndef NO_PERFBD
ifdef YES_PERFBD
bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer
endif
# note we remove some binary dependent files during compilation,
@@ -426,7 +426,7 @@ endif
ifdef YES_PERF
rm -f $(BENCH_PERF)
endif
ifndef NO_PERFBD
ifdef YES_PERFBD
rm -f $(BENCH_TRACE)
endif