diff options
author | Alexandre Conrad <alexandre@surveymonkey.com> | 2014-04-25 14:13:57 -0700 |
---|---|---|
committer | Alexandre Conrad <alexandre@surveymonkey.com> | 2014-04-26 18:07:34 -0700 |
commit | 2ae9c25cef9e5c04806e2f41152dc464db188be4 (patch) | |
tree | e54e8f3b1ca46c91cb753e585c2816e7400ad1f3 | |
parent | c68249a7f16af8aacbce2639cb2600f5638aca0c (diff) | |
download | python-jenkins-job-builder-2ae9c25cef9e5c04806e2f41152dc464db188be4.tar.gz python-jenkins-job-builder-2ae9c25cef9e5c04806e2f41152dc464db188be4.tar.xz python-jenkins-job-builder-2ae9c25cef9e5c04806e2f41152dc464db188be4.zip |
add tests for shell builder
Change-Id: I37350e7e813db173e033bd4131e62be77ab9753a
-rw-r--r-- | jenkins_jobs/modules/builders.py | 7 | ||||
-rw-r--r-- | tests/builders/fixtures/shell.xml | 8 | ||||
-rw-r--r-- | tests/builders/fixtures/shell.yaml | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py index 51542567..d2df345e 100644 --- a/jenkins_jobs/modules/builders.py +++ b/jenkins_jobs/modules/builders.py @@ -50,12 +50,11 @@ def shell(parser, xml_parent, data): """yaml: shell Execute a shell command. - :Parameter: the shell command to execute + :arg str parameter: the shell command to execute - Example:: + Example: - builders: - - shell: "make test" + .. literalinclude:: /../../tests/builders/fixtures/shell.yaml """ shell = XML.SubElement(xml_parent, 'hudson.tasks.Shell') diff --git a/tests/builders/fixtures/shell.xml b/tests/builders/fixtures/shell.xml new file mode 100644 index 00000000..7ab1aac8 --- /dev/null +++ b/tests/builders/fixtures/shell.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<project> + <builders> + <hudson.tasks.Shell> + <command>make test</command> + </hudson.tasks.Shell> + </builders> +</project> diff --git a/tests/builders/fixtures/shell.yaml b/tests/builders/fixtures/shell.yaml new file mode 100644 index 00000000..96d32284 --- /dev/null +++ b/tests/builders/fixtures/shell.yaml @@ -0,0 +1,2 @@ +builders: + - shell: "make test" |