child-sync test passes

This commit is contained in:
Philip Monk 2019-02-22 15:52:18 -08:00
parent 3f74d30085
commit e22eac6a72
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
6 changed files with 38 additions and 30 deletions

View File

@ -135,18 +135,14 @@
::
:- %change-file
%+ compose-tests (galaxy ~bud)
(touch-file ~bud)
(touch-file ~bud %home)
::
:- %child-sync
%+ compose-tests
:: %+ compose-tests
:: %+ compose-tests
%+ compose-tests
(galaxy ~bud)
:: (reload-vane ~bud %clay)
(raw-ship ~marbud)
:: (touch-file ~bud)
(check-file-touched ~marbud)
%+ compose-tests
(star ~marbud)
(touch-file ~bud %base)
(check-file-touched ~marbud %home)
::
:- %individual-breach
*test-core

View File

@ -80,11 +80,11 @@
::
?: ?=($pawn myr)
[[%base %collections] [%base %hall] [%base %talk] [%base %dojo] ~]
:~ [%home %collections]
[%home %acme]
[%home %dns]
:~ :: [%home %collections]
:: [%home %acme]
:: [%home %dns]
[%home %dojo]
[%home %hall]
:: [%home %hall]
[%home %talk]
==
::

View File

@ -62,13 +62,13 @@
==
::
++ insert-file
|= [who=ship pax=path txt=@t]
|= [who=ship des=desk pax=path txt=@t]
^- (list ph-event)
?> ?=([@ @ @ *] pax)
=/ file [/text/plain (as-octs:mimes:html txt)]
%+ send-events-to who
:~
[//sync/0v1n.2m9vh %into i.t.pax | [t.t.t.pax `file]~]
[//sync/0v1n.2m9vh %into des | [t.t.t.pax `file]~]
==
::
++ on-dojo-output
@ -245,7 +245,7 @@
:: Ship must have been started.
::
++ touch-file
|= her=ship
|= [her=ship des=desk]
^- test-core
=| warped=@t
|%
@ -259,8 +259,8 @@
=. warped (cat 3 '=> . ' .^(@t %cx pax))
:_ ..start
%- zing
:~ (dojo her "|mount %")
(insert-file her pax warped)
:~ (dojo her "|mount /={(trip des)}=")
(insert-file her des pax warped)
==
::
++ route
@ -271,7 +271,7 @@
:~ %- on-ergo
:^ her who ovo
|= $~
=/ pax /i/[(scot %p her)]/home/(scot %da now)/sur/aquarium/hoon/noun
=/ pax /i/(scot %p her)/[des]/(scot %da now)/sur/aquarium/hoon/noun
?: =(warped (need (scry-aqua (unit @) now pax)))
[%test-done &]~
~& %not-done-yet
@ -284,7 +284,7 @@
:: Ship must have been started.
::
++ check-file-touched
|= her=ship
|= [her=ship des=desk]
^- test-core
|%
++ label (cat 3 'check-file-touched-' (scot %p her))
@ -297,7 +297,7 @@
:: is already mounted)
::
~& %mounting
[(dojo her "|mount %") ..start]
[(dojo her "|mount /={(trip des)}=") ..start]
::
++ route
|= [now=@da who=ship ovo=unix-effect]
@ -307,7 +307,12 @@
~& %cbing
=/ pax /home/(scot %da now)/sur/aquarium/hoon
=/ warped (cat 3 '=> . ' .^(@t %cx (weld /(scot %p our) pax)))
=/ aqua-pax :(weld /i/(scot %p her) pax /noun)
=/ aqua-pax
;: weld
/i/(scot %p her)
pax(- des)
/noun
==
?: =(warped (need (scry-aqua (unit @) now aqua-pax)))
[%test-done &]~
~& %not-done-yet
@ -336,8 +341,8 @@
/(scot %p our)/home/(scot %da now)/sys/vane/[vane]/hoon
:_ ..start
%- zing
:~ (dojo her "|mount %")
(insert-file her pax .^(@t %cx pax))
:~ (dojo her "|mount /=home=")
(insert-file her %home pax .^(@t %cx pax))
[%test-done &]~
==
::

View File

@ -462,7 +462,7 @@
::
++ hurl :: start loop
|= {lac/? ovo/ovum}
~? &(!lac !=(%belt -.q.ovo)) ["" %unix -.q.ovo p.ovo]
~? &(!lac !=(%belt -.q.ovo)) ["" %unix -.q.ovo p.ovo now]
:: ^- {p/(list ovum) q/(pair worm (list {p/@tas q/vase}))}
^- {p/(list ovum) q=(list [label=@tas =vane])}
?> ?=(^ p.ovo)
@ -644,7 +644,7 @@
::
=/ pit=vase !>(..is) ::
=/ vil=vile (viol p.pit) :: cached reflexives
=| $: lac=_| :: laconic bit
=| $: lac=_& :: laconic bit
eny=@ :: entropy
our=ship :: identity
bud=vase :: %zuse

View File

@ -3773,9 +3773,9 @@
:: only one of these should be going at once, so queue
::
?: &(?=(?(%info %into %merg) -.req) |(=(now tip.ruf) ?=(^ cue.ruf)))
=. cue.ruf (~(put to cue.ruf) [hen req])
=/ wait=(list move)
?~(cue.ruf ~ [hen %pass /queued-request %b %wait now]~)
?^(cue.ruf ~ [hen %pass /queued-request %b %wait now]~)
=. cue.ruf (~(put to cue.ruf) [hen req])
[wait ..^$]
(handle-task hen req)
::
@ -4251,13 +4251,18 @@
=/ queued-duct=duct -.queued
=/ queued-task=task:able +.queued
::
~& :* %x-clay-waking
queued-duct
hen
?~(cue.ruf /empty -:(need ~(top to cue.ruf)))
==
~| [%mismatched-ducts %queued queued-duct %timer hen]
?> =(hen queued-duct)
::
=/ wait
?~ cue.ruf
~
[hen %pass /queued-request %b %wait now]~
[-:(need ~(top to cue.ruf)) %pass /queued-request %b %wait now]~
=^ moves ..^$ (handle-task hen queued-task)
[(weld wait moves) ..^$]
:: =^ mos=(list move) une

View File

@ -298,7 +298,9 @@
++ init :: initialize
~& [%dill-init our ram]
^+ .
=. moz :_(moz [hen %pass / %c %merg %home our %base da+now %init])
=. moz
:_ moz
[hen %pass /merg/home %c %merg %home our %base da+now %init]
.
::
++ mere :: continue init