From c4f57608d06b386b7fe071c051c26b9afbc66eb7 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 15 Mar 2019 13:01:50 -0400 Subject: [PATCH] test: Port yaml test to mcl --- test/shell/graph-exit1.mcl | 8 +++++ test/shell/graph-exit1.sh | 2 +- test/shell/graph-exit1.yaml | 71 ------------------------------------- 3 files changed, 9 insertions(+), 72 deletions(-) create mode 100644 test/shell/graph-exit1.mcl delete mode 100644 test/shell/graph-exit1.yaml diff --git a/test/shell/graph-exit1.mcl b/test/shell/graph-exit1.mcl new file mode 100644 index 00000000..fcbab750 --- /dev/null +++ b/test/shell/graph-exit1.mcl @@ -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"] diff --git a/test/shell/graph-exit1.sh b/test/shell/graph-exit1.sh index 26979ee5..0e74be0f 100755 --- a/test/shell/graph-exit1.sh +++ b/test/shell/graph-exit1.sh @@ -5,7 +5,7 @@ # 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! # 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=$! sleep 5s # let the initial resources start to run... killall -SIGINT mgmt # send ^C to exit mgmt diff --git a/test/shell/graph-exit1.yaml b/test/shell/graph-exit1.yaml deleted file mode 100644 index 02cae43d..00000000 --- a/test/shell/graph-exit1.yaml +++ /dev/null @@ -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