diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-12 05:11:14 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-12 05:11:14 -0500 |
| commit | fc966aa764cf30bcd6e75d9a1c3d89558ca95988 (patch) | |
| tree | d5e133e38b81954485e14556b0aa41ce39b65ac5 /scripts | |
| parent | 2063e9dffff751d5f2cbca2817aee5daaa463cf3 (diff) | |
| download | dotemacs-fc966aa764cf30bcd6e75d9a1c3d89558ca95988.tar.gz dotemacs-fc966aa764cf30bcd6e75d9a1c3d89558ca95988.zip | |
refactor(build): extract the shared test-runner loop into a make macro
`test-unit' and `test-integration' carried the same ~45-line shell loop (run each .el file in its own Emacs with the slow/perf-tagged tests skipped, count "Ran N", collect failures, dump a per-file log, print a ✓/✗ summary banner, exit 1 on any fail), differing only in the file list and the label. The `:perf' tag filter had to be added in both last week, which is the kind of drift this invites.
Now a `define run-el-tests' macro (parametrized by the file list and the lowercase/uppercase labels) holds the loop once, and the two targets are one `@$(call run-el-tests,...)' line each. The banner string moved to a `BANNER' variable. No behavior change: `make test-unit', `make test-integration', and `make test' produce the same output.
`coverage' keeps its own loop. It uses `run-coverage-file.el' instead of `-l ert', skips the pass-count and the per-file log, has a much shorter summary, and is bracketed by the .elc cleanup and the coverage-file check. Folding it in would need three more parameters and conditionals, which would cost more clarity than the duplication does.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
