| 1 |
-- main.mcl -- |
| 2 |
exec "exec0" { |
| 3 |
cmd => "echo this is stdout && echo this is stderr 1>&2", # to stdout && stderr |
| 4 |
shell => "/bin/bash", |
| 5 |
} |
| 6 |
|
| 7 |
file ["/tmp/command-output", "/tmp/command-stdout", "/tmp/command-stderr",] { |
| 8 |
state => $const.res.file.state.exists, |
| 9 |
} |
| 10 |
|
| 11 |
Exec["exec0"].stdout -> File["/tmp/command-stdout"].content |
| 12 |
Exec["exec0"].stderr -> File["/tmp/command-stderr"].content |
| 13 |
# XXX: The Content line can be swapped randomly, create test to allow either. |
| 14 |
# XXX: In the meantime, we skip including it. |
| 15 |
#Exec["exec0"].output -> File["/tmp/command-output"].content |
| 16 |
# Field: file[/tmp/command-output].Content = "this is stdout\nthis is stderr\n" |
| 17 |
# Field: file[/tmp/command-output].Content = "this is stderr\nthis is stdout\n" |
| 18 |
-- OUTPUT -- |
| 19 |
Edge: exec[exec0] -> file[/tmp/command-stderr] # exec[exec0] -> file[/tmp/command-stderr] |
| 20 |
Edge: exec[exec0] -> file[/tmp/command-stdout] # exec[exec0] -> file[/tmp/command-stdout] |
| 21 |
Field: exec[exec0].Cmd = "echo this is stdout && echo this is stderr 1>&2" |
| 22 |
Field: exec[exec0].Shell = "/bin/bash" |
| 23 |
Field: file[/tmp/command-output].State = "exists" |
| 24 |
Field: file[/tmp/command-stderr].Content = "this is stderr\n" |
| 25 |
Field: file[/tmp/command-stderr].State = "exists" |
| 26 |
Field: file[/tmp/command-stdout].Content = "this is stdout\n" |
| 27 |
Field: file[/tmp/command-stdout].State = "exists" |
| 28 |
Vertex: exec[exec0] |
| 29 |
Vertex: file[/tmp/command-output] |
| 30 |
Vertex: file[/tmp/command-stderr] |
| 31 |
Vertex: file[/tmp/command-stdout] |