Repository navigation
test: cut repeated work from the project suite - #1460
Merged
Merged
Conversation
Tests no longer rerun bashunit only to read its exit code, shared runs are cached per file, the summary test uses a small fixture instead of real test files, the parity check walks the repo once, and the no-jq PATH is built with one ln call. Contributor docs point full runs at make test/parallel, since make test is sequential.
JesusValeraDev
approved these changes
Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The project suite repeated work without testing anything more. This removes the repeats and keeps every assertion.
bench_reports,listandoutput_stdoutrun their shared command once per file and the tests read the cached result.summary_outputused real test files as fixtures (bashunit_init_test.shthree times). It now uses a small fixture with one skipped and one incomplete test. This also removes the rule thatbashunit_init_test.shmust keep exactly one skip.total_tests_paritywalked every repo test file three times, once per filter. It now walks once and checks all three cases.json_skip_labelbuilt its no-jq PATH with about 970lncalls per test. It now builds it once with onelncall.BASHUNIT_PARALLEL_JOBS=4 make test, butmake testruns sequentially and that variable does not turn parallel on. They now usemake test/parallel, whichmake helpalso lists.Timing
Files run one at a time, before and after:
bashunit_summary_output_test.shtotal_tests_parity_test.shbashunit_json_skip_label_test.shbashunit_bench_reports_test.shbashunit_output_stdout_test.shFull suite with
--parallel --jobs 4: 69s before, 59s after. A sequential local run (what the old docs led to) took 5m46s.Test plan
./bashunit --parallel --jobs 4 tests: 2840 passed, same test count as main./bashunit --suite strict tests: greenmake sa,make lintnpm run agents:check