mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 11:40:11 +03:00
ph: add ph-all to run multiple tests
This commit is contained in:
parent
9d47222139
commit
f8b612d053
@ -151,8 +151,7 @@
|
||||
::
|
||||
?- -.next.output
|
||||
%wait [[cards %next ~] eval-form]
|
||||
%skip ~| [%take-got-skip ?~(in.strand-input ~ [+< +>-]:u.in.strand-input)]
|
||||
!!
|
||||
%skip [[cards %next ~] eval-form]
|
||||
%fail [[cards %fail err.next.output] eval-form]
|
||||
%done [[cards %done value.next.output] eval-form]
|
||||
%cont
|
||||
|
@ -504,4 +504,24 @@
|
||||
;< ~ bind:m (poke-our %spider %spider-start poke-vase)
|
||||
;< ~ bind:m (sleep ~s0) :: wait for thread to start
|
||||
(pure:m tid)
|
||||
::
|
||||
+$ thread-result
|
||||
(each vase [term (list tang)])
|
||||
::
|
||||
++ await-thread
|
||||
|= [file=term args=vase]
|
||||
=/ m (strand ,thread-result)
|
||||
^- form:m
|
||||
;< =bowl:spider bind:m get-bowl
|
||||
=/ tid (scot %ta (cat 3 'strand_' (scot %uv (sham file eny.bowl))))
|
||||
=/ tid (scot %ta (cat 3 'strand_' (scot %uv (sham file eny.bowl))))
|
||||
=/ poke-vase !>([`tid.bowl `tid file args])
|
||||
;< ~ bind:m (watch-our /awaiting/[tid] %spider /thread-result/[tid])
|
||||
;< ~ bind:m (poke-our %spider %spider-start poke-vase)
|
||||
;< ~ bind:m (sleep ~s0) :: wait for thread to start
|
||||
;< =cage bind:m (take-fact /awaiting/[tid])
|
||||
?+ p.cage ~|([%strange-thread-result p.cage file tid] !!)
|
||||
%thread-done (pure:m %& q.cage)
|
||||
%thread-fail (pure:m %| !<([term (list tang)] q.cage))
|
||||
==
|
||||
--
|
||||
|
@ -2716,7 +2716,7 @@
|
||||
|= [=message-num =message-blob]
|
||||
^- (list static-fragment)
|
||||
::
|
||||
=/ fragments=(list fragment) (rip 13 message-blob)
|
||||
=/ fragments=(list fragment) (rip 20 message-blob)
|
||||
=/ num-fragments=fragment-num (lent fragments)
|
||||
=| counter=@
|
||||
::
|
||||
@ -2741,7 +2741,7 @@
|
||||
$(index +(index), sorted [(~(got by fragments) index) sorted])
|
||||
::
|
||||
%- cue
|
||||
%+ can 13
|
||||
%+ can 20
|
||||
%+ turn (flop sorted)
|
||||
|=(a=@ [1 a])
|
||||
:: +bind-duct: find or make new $bone for .duct in .ossuary
|
||||
|
38
pkg/arvo/ted/ph/all.hoon
Normal file
38
pkg/arvo/ted/ph/all.hoon
Normal file
@ -0,0 +1,38 @@
|
||||
/- spider
|
||||
/+ *strandio
|
||||
=, strand=strand:spider
|
||||
^- thread:spider
|
||||
|= args=vase
|
||||
=/ m (strand ,vase)
|
||||
=+ !<(group=(list @tas) args)
|
||||
;< =bowl:spider bind:m get-bowl
|
||||
=/ threads=(list @tas)
|
||||
?- group
|
||||
~
|
||||
:~ %ph-add
|
||||
%ph-hi
|
||||
%ph-child-sync
|
||||
%ph-breach-multiple
|
||||
%ph-breach-sudden
|
||||
%ph-hi-linnup-az
|
||||
%ph-moon-az
|
||||
==
|
||||
::
|
||||
[%all ~]
|
||||
=+ .^(=arch %cy /(scot %p our.bowl)/home/(scot %da now.bowl)/ted/ph)
|
||||
%+ turn (turn ~(tap by dir.arch) head)
|
||||
|= =term
|
||||
(cat 3 'ph-' term)
|
||||
::
|
||||
*
|
||||
(turn group |=(=term (cat 3 'ph-' term)))
|
||||
==
|
||||
::
|
||||
=| results=(list [@tas thread-result])
|
||||
|- ^- form:m
|
||||
=* loop $
|
||||
?~ threads
|
||||
(pure:m !>(results))
|
||||
;< =thread-result bind:m (await-thread i.threads *vase)
|
||||
;< ~ bind:m (flog-text "ph-all: {<i.threads>} complete")
|
||||
loop(threads t.threads, results [[i.threads thread-result] results])
|
Loading…
Reference in New Issue
Block a user