Repository navigation
tests: run the production pbr.uc, not a rewritten copy - #205
Merged
stangri merged 1 commit intoNov 9, 2026
Merged
Conversation
run_tests.sh rewrote pbr.uc with sed and awk into a temporary directory and tested that copy. Both steps are leftovers: - the sed converts fs, uci and ubus imports to require(), but pbr.uc no longer has those imports; it gets the modules through create_pbr() - the awk forward-declares top-level functions, and create_pbr is the only one left Delete both and load files/lib/pbr directly, so the tests exercise the file that ships. This takes 90 lines out of the runner and also removes its need for gawk. The shim has caused harm before: see mossdef-org#174. Suggested in the review of openwrt/packages#31156. The suite gives the same 75 of 75 before and after, on the ucode in OpenWrt 25.12 (85922056) and on current master. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Erik Conijn <egc112@msn.com>
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.
run_tests.sh rewrote pbr.uc with sed and awk into a temporary directory and tested that copy. Both steps are leftovers:
Delete both and load files/lib/pbr directly, so the tests exercise the file that ships. This takes 90 lines out of the runner and also removes its need for gawk. The shim has caused harm before: see #174.
Suggested in the review of openwrt/packages#31156. The suite gives the same 75 of 75 before and after, on the ucode in OpenWrt 25.12 (85922056) and on current master.
Assisted-by: Claude:claude-opus-5-5