summaryrefslogtreecommitdiff
path: root/share/python/lib/runcmd.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'share/python/lib/runcmd.yaml')
-rw-r--r--share/python/lib/runcmd.yaml96
1 files changed, 70 insertions, 26 deletions
diff --git a/share/python/lib/runcmd.yaml b/share/python/lib/runcmd.yaml
index a5119d8..a01cfac 100644
--- a/share/python/lib/runcmd.yaml
+++ b/share/python/lib/runcmd.yaml
@@ -1,91 +1,135 @@
# Steps to run commands.
- given: helper script {filename} for runcmd
- function: runcmd_helper_script
+ impl:
+ python:
+ function: runcmd_helper_script
- given: srcdir is in the PATH
- function: runcmd_helper_srcdir_path
+ impl:
+ python:
+ function: runcmd_helper_srcdir_path
- when: I run (?P<argv0>\S+)(?P<args>.*)
regex: true
- function: runcmd_step
+ impl:
+ python:
+ function: runcmd_step
- when: I run, in (?P<dirname>\S+), (?P<argv0>\S+)(?P<args>.*)
regex: true
- function: runcmd_step_in
+ impl:
+ python:
+ function: runcmd_step_in
- when: I try to run (?P<argv0>\S+)(?P<args>.*)
regex: true
- function: runcmd_try_to_run
+ impl:
+ python:
+ function: runcmd_try_to_run
- when: I try to run, in (?P<dirname>\S+), (?P<argv0>\S+)(?P<args>.*)
regex: true
- function: runcmd_try_to_run_in
+ impl:
+ python:
+ function: runcmd_try_to_run_in
# Steps to examine exit code of latest command.
- then: exit code is {exit}
- function: runcmd_exit_code_is
+ impl:
+ python:
+ function: runcmd_exit_code_is
- then: exit code is not {exit}
- function: runcmd_exit_code_is_not
+ impl:
+ python:
+ function: runcmd_exit_code_is_not
- then: command is successful
- function: runcmd_exit_code_is_zero
+ impl:
+ python:
+ function: runcmd_exit_code_is_zero
- then: command fails
- function: runcmd_exit_code_is_nonzero
+ impl:
+ python:
+ function: runcmd_exit_code_is_nonzero
# Steps to examine stdout/stderr for exact content.
- then: stdout is exactly "(?P<text>.*)"
regex: true
- function: runcmd_stdout_is
+ impl:
+ python:
+ function: runcmd_stdout_is
-- then: "stdout isn't exactly \"(?P<text>.*)\""
+- then: 'stdout isn''t exactly "(?P<text>.*)"'
regex: true
- function: runcmd_stdout_isnt
+ impl:
+ python:
+ function: runcmd_stdout_isnt
- then: stderr is exactly "(?P<text>.*)"
regex: true
- function: runcmd_stderr_is
+ impl:
+ python:
+ function: runcmd_stderr_is
-- then: "stderr isn't exactly \"(?P<text>.*)\""
+- then: 'stderr isn''t exactly "(?P<text>.*)"'
regex: true
- function: runcmd_stderr_isnt
+ impl:
+ python:
+ function: runcmd_stderr_isnt
# Steps to examine stdout/stderr for sub-strings.
- then: stdout contains "(?P<text>.*)"
regex: true
- function: runcmd_stdout_contains
+ impl:
+ python:
+ function: runcmd_stdout_contains
-- then: "stdout doesn't contain \"(?P<text>.*)\""
+- then: 'stdout doesn''t contain "(?P<text>.*)"'
regex: true
- function: runcmd_stdout_doesnt_contain
+ impl:
+ python:
+ function: runcmd_stdout_doesnt_contain
- then: stderr contains "(?P<text>.*)"
regex: true
- function: runcmd_stderr_contains
+ impl:
+ python:
+ function: runcmd_stderr_contains
-- then: "stderr doesn't contain \"(?P<text>.*)\""
+- then: 'stderr doesn''t contain "(?P<text>.*)"'
regex: true
- function: runcmd_stderr_doesnt_contain
+ impl:
+ python:
+ function: runcmd_stderr_doesnt_contain
# Steps to match stdout/stderr against regular expressions.
- then: stdout matches regex (?P<regex>.*)
regex: true
- function: runcmd_stdout_matches_regex
+ impl:
+ python:
+ function: runcmd_stdout_matches_regex
- then: stdout doesn't match regex (?P<regex>.*)
regex: true
- function: runcmd_stdout_doesnt_match_regex
+ impl:
+ python:
+ function: runcmd_stdout_doesnt_match_regex
- then: stderr matches regex (?P<regex>.*)
regex: true
- function: runcmd_stderr_matches_regex
+ impl:
+ python:
+ function: runcmd_stderr_matches_regex
- then: stderr doesn't match regex (?P<regex>.*)
regex: true
- function: runcmd_stderr_doesnt_match_regex
+ impl:
+ python:
+ function: runcmd_stderr_doesnt_match_regex