test: Port yaml test to mcl
This commit is contained in:
8
test/shell/graph-exit1.mcl
Normal file
8
test/shell/graph-exit1.mcl
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
exec ["exec1", "exec2", "exec3", "exec4", "exec0",] {
|
||||||
|
cmd => "sleep 15s",
|
||||||
|
}
|
||||||
|
|
||||||
|
# linear chain
|
||||||
|
Exec["exec1"] -> Exec["exec2"]
|
||||||
|
Exec["exec2"] -> Exec["exec3"]
|
||||||
|
Exec["exec3"] -> Exec["exec4"]
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
# should take 15 seconds for longest resources plus startup time to shutdown
|
# should take 15 seconds for longest resources plus startup time to shutdown
|
||||||
# we don't want the ^C to allow the rest of the graph to continue executing!
|
# we don't want the ^C to allow the rest of the graph to continue executing!
|
||||||
# this is a test of mgmt exiting quickly via a fast pause after it sees a ^C
|
# this is a test of mgmt exiting quickly via a fast pause after it sees a ^C
|
||||||
$TIMEOUT "$MGMT" run --no-watch --no-pgp --tmp-prefix yaml --yaml graph-exit1.yaml &
|
$TIMEOUT "$MGMT" run --no-watch --no-pgp --tmp-prefix lang --lang graph-exit1.mcl &
|
||||||
pid=$!
|
pid=$!
|
||||||
sleep 5s # let the initial resources start to run...
|
sleep 5s # let the initial resources start to run...
|
||||||
killall -SIGINT mgmt # send ^C to exit mgmt
|
killall -SIGINT mgmt # send ^C to exit mgmt
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
---
|
|
||||||
graph: parallel
|
|
||||||
resources:
|
|
||||||
exec:
|
|
||||||
- name: exec1
|
|
||||||
cmd: sleep 10s
|
|
||||||
shell: ''
|
|
||||||
timeout: 0
|
|
||||||
watchcmd: ''
|
|
||||||
watchshell: ''
|
|
||||||
ifcmd: ''
|
|
||||||
ifshell: ''
|
|
||||||
state: present
|
|
||||||
- name: exec2
|
|
||||||
cmd: sleep 10s
|
|
||||||
shell: ''
|
|
||||||
timeout: 0
|
|
||||||
watchcmd: ''
|
|
||||||
watchshell: ''
|
|
||||||
ifcmd: ''
|
|
||||||
ifshell: ''
|
|
||||||
state: present
|
|
||||||
- name: exec3
|
|
||||||
cmd: sleep 10s
|
|
||||||
shell: ''
|
|
||||||
timeout: 0
|
|
||||||
watchcmd: ''
|
|
||||||
watchshell: ''
|
|
||||||
ifcmd: ''
|
|
||||||
ifshell: ''
|
|
||||||
state: present
|
|
||||||
- name: exec4
|
|
||||||
cmd: sleep 10s
|
|
||||||
shell: ''
|
|
||||||
timeout: 0
|
|
||||||
watchcmd: ''
|
|
||||||
watchshell: ''
|
|
||||||
ifcmd: ''
|
|
||||||
ifshell: ''
|
|
||||||
state: present
|
|
||||||
- name: exec0
|
|
||||||
cmd: sleep 10s
|
|
||||||
shell: ''
|
|
||||||
timeout: 0
|
|
||||||
watchcmd: ''
|
|
||||||
watchshell: ''
|
|
||||||
ifcmd: ''
|
|
||||||
ifshell: ''
|
|
||||||
state: present
|
|
||||||
edges:
|
|
||||||
- name: e1
|
|
||||||
from:
|
|
||||||
kind: exec
|
|
||||||
name: exec1
|
|
||||||
to:
|
|
||||||
kind: exec
|
|
||||||
name: exec2
|
|
||||||
- name: e2
|
|
||||||
from:
|
|
||||||
kind: exec
|
|
||||||
name: exec2
|
|
||||||
to:
|
|
||||||
kind: exec
|
|
||||||
name: exec3
|
|
||||||
- name: e3
|
|
||||||
from:
|
|
||||||
kind: exec
|
|
||||||
name: exec3
|
|
||||||
to:
|
|
||||||
kind: exec
|
|
||||||
name: exec4
|
|
||||||
Reference in New Issue
Block a user