mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
73 lines
2.5 KiB
XML
73 lines
2.5 KiB
XML
<tool id="job_properties" name="Test Job Properties">
|
|
<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'
|
|
#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' &&
|
|
sh -c "exit 2"
|
|
#end if
|
|
#if $failbool
|
|
; sh -c "exit 127"
|
|
#end if
|
|
|
|
]]></command>
|
|
<inputs>
|
|
<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" />
|
|
<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>
|