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 ifdef YES_PERFBD
TESTFLAGS += -t $(TEST_TRACE) --trace-backtrace --trace-freq=100 TESTFLAGS += -t $(TEST_TRACE) --trace-backtrace --trace-freq=100
endif endif
ifndef NO_PERFBD ifdef YES_PERFBD
BENCHFLAGS += -t $(BENCH_TRACE) --trace-backtrace --trace-freq=100 BENCHFLAGS += -t $(BENCH_TRACE) --trace-backtrace --trace-freq=100
endif endif
ifdef YES_TESTMARKS ifdef YES_TESTMARKS
TESTFLAGS += -o $(TEST_CSV) TESTFLAGS += -o $(TEST_CSV)
endif endif
ifndef NO_BENCHMARKS ifdef YES_BENCHMARKS
BENCHFLAGS += -o $(BENCH_CSV) BENCHFLAGS += -o $(BENCH_CSV)
endif endif
ifdef VERBOSE ifdef VERBOSE
@@ -356,7 +356,7 @@ summary-diff sizes-diff: $(OBJ) $(CI)
## Build the test-runner ## Build the test-runner
.PHONY: test-runner build-test .PHONY: test-runner build-test
test-runner build-test: CFLAGS+=-Wno-unused-function test-runner build-test: CFLAGS+=-Wno-unused-function
ifndef NO_COV ifdef YES_COV
test-runner build-test: CFLAGS+=--coverage test-runner build-test: CFLAGS+=--coverage
endif endif
ifdef YES_PERF ifdef YES_PERF
@@ -368,7 +368,7 @@ endif
# note we remove some binary dependent files during compilation, # note we remove some binary dependent files during compilation,
# otherwise it's way to easy to end up with outdated results # otherwise it's way to easy to end up with outdated results
test-runner build-test: $(TEST_RUNNER) test-runner build-test: $(TEST_RUNNER)
ifndef NO_COV ifdef YES_COV
rm -f $(TEST_GCDA) rm -f $(TEST_GCDA)
endif endif
ifdef YES_PERF ifdef YES_PERF
@@ -414,7 +414,7 @@ endif
ifdef YES_PERF ifdef YES_PERF
bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer
endif endif
ifndef NO_PERFBD ifdef YES_PERFBD
bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer bench-runner build-bench: CFLAGS+=-fno-omit-frame-pointer
endif endif
# note we remove some binary dependent files during compilation, # note we remove some binary dependent files during compilation,
@@ -426,7 +426,7 @@ endif
ifdef YES_PERF ifdef YES_PERF
rm -f $(BENCH_PERF) rm -f $(BENCH_PERF)
endif endif
ifndef NO_PERFBD ifdef YES_PERFBD
rm -f $(BENCH_TRACE) rm -f $(BENCH_TRACE)
endif endif