mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
79 lines
2.8 KiB
XML
79 lines
2.8 KiB
XML
<tool id="job_properties" name="Test Job Properties" version="1.0.0">
|
|
<stdio>
|
|
<exit_code range="127" level="fatal" description="Failing exit code." />
|
|
</stdio>
|
|
<version_command>echo 'v1.1'</version_command>
|
|
<command><![CDATA[
|
|
#if $thebool
|
|
echo 'The bool is true' &&
|
|
echo 'The bool is really true' 1>&2 &&
|
|
echo 'This is a line of text.' > '$out_file1' &&
|
|
cp '$out_file1' '$one' &&
|
|
cp '$out_file1' '$two' &&
|
|
sleep $sleepsecs
|
|
#else
|
|
echo 'The bool is not true' &&
|
|
echo 'The bool is very not true' 1>&2 &&
|
|
echo 'This is a different line of text.' > '$out_file1' &&
|
|
sleep $sleepsecs &&
|
|
sh -c 'exit 2'
|
|
#end if
|
|
#if $failbool
|
|
## use ';' to concatenate commands so that the next one is run independently
|
|
## of the exit code of the previous one
|
|
; exit 127
|
|
#end if
|
|
]]></command>
|
|
<inputs>
|
|
<param name="sleepsecs" type="integer" value="0" label="Sleep this many seconds"/>
|
|
<param name="thebool" type="boolean" label="The boolean property" />
|
|
<param name="failbool" type="boolean" label="The failure property" checked="false" />
|
|
</inputs>
|
|
<outputs>
|
|
<data name="out_file1" format="txt" />
|
|
<collection name="list_output" type="list" label="A list output">
|
|
<data name="one" format="txt" />
|
|
<data name="two" format="txt" />
|
|
</collection>
|
|
</outputs>
|
|
<tests>
|
|
<test expect_exit_code="0">
|
|
<param name="thebool" value="true" />
|
|
<output name="out_file1" file="simple_line.txt" >
|
|
<metadata name="data_lines" value="1" />
|
|
</output>
|
|
<assert_command>
|
|
<has_text text="really" />
|
|
</assert_command>
|
|
<assert_stdout>
|
|
<has_line line="The bool is true" />
|
|
</assert_stdout>
|
|
<assert_stderr>
|
|
<has_line line="The bool is really true" />
|
|
</assert_stderr>
|
|
<assert_command_version>
|
|
<has_text text="v1.1" />
|
|
</assert_command_version>
|
|
</test>
|
|
<test expect_exit_code="2">
|
|
<param name="thebool" value="false" />
|
|
<output name="out_file1" file="simple_line_alternative.txt" />
|
|
<assert_command>
|
|
<has_text text="very not" />
|
|
</assert_command>
|
|
<assert_stdout>
|
|
<has_line line="The bool is not true" />
|
|
</assert_stdout>
|
|
<assert_stderr>
|
|
<has_line line="The bool is very not true" />
|
|
</assert_stderr>
|
|
</test>
|
|
<test expect_exit_code="127" expect_failure="true">
|
|
<param name="thebool" value="true" />
|
|
<param name="failbool" value="true" />
|
|
</test>
|
|
</tests>
|
|
<help>
|
|
</help>
|
|
</tool>
|