Merge pull request #6467 from urbit/dr/clean-up-test-thread

ted/test.hoon: repair vestigial select-by-prefix feature
This commit is contained in:
Ted Blackman 2023-04-19 11:35:58 -04:00 committed by GitHub
commit 5661bfed74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,13 +26,6 @@
&+[leaf+"OK {name}"]~
|+(flop `tang`[leaf+"FAILED {name}" p.run])
==
:: +filter-tests-by-prefix: TODO document
::
++ filter-tests-by-prefix
|= [prefix=path tests=(list test)]
^+ tests
=/ prefix-length=@ud (lent prefix)
(skim tests |=([p=path *] =(prefix (scag prefix-length p))))
:: +resolve-test-paths: add test names to file paths to form full identifiers
::
++ resolve-test-paths
@ -130,15 +123,11 @@
gather-tests(fiz t.fiz, build-ok |)
~> %slog.0^leaf+"built {(spud s.beam.i.fiz)}"
=/ arms=(list test-arm) (get-test-arms u.cor)
::
:: XX this logic appears to be vestigial
::
:: if test path specified an arm prefix, filter arms to match
=? arms ?=(^ test.i.fiz)
|- ^+ arms
?~ arms ~|(no-test-arm+i.fiz !!)
?: =(name.i.arms u.test.i.fiz)
[i.arms]~
$(arms t.arms)
%+ skim arms
|= test-arm
=((end [3 (met 3 u.test.i.fiz)] name) u.test.i.fiz)
=. test-arms (~(put by test-arms) (snip s.beam.i.fiz) arms)
gather-tests(fiz t.fiz)
%- pure:m !> ^= ok