# HG changeset patch
# User hackdna
# Date 1368482366 14400
# Node ID ee221004e3b4a6df8635738ec5191b797203d820
# Parent 5ac9c40dae3521608570bdc640879a7c7f35451a
Add an option to produce empty files.
diff -r 5ac9c40dae35 -r ee221004e3b4 refinery_test_1-1.xml
--- a/refinery_test_1-1.xml Mon May 13 16:52:26 2013 -0400
+++ b/refinery_test_1-1.xml Mon May 13 17:59:26 2013 -0400
@@ -2,12 +2,13 @@
for testing Galaxy workflow execution from Refinery
- refinery_test_tool.py -i $input_file -o $output_file -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr
+ refinery_test_tool.py -i $input_file -o $output_file -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr $empty_outfile
+
diff -r 5ac9c40dae35 -r ee221004e3b4 refinery_test_1-2.xml
--- a/refinery_test_1-2.xml Mon May 13 16:52:26 2013 -0400
+++ b/refinery_test_1-2.xml Mon May 13 17:59:26 2013 -0400
@@ -2,12 +2,13 @@
for testing Galaxy workflow execution from Refinery
- refinery_test_tool.py -i $input_file -o $output_file1 $output_file2 -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr
+ refinery_test_tool.py -i $input_file -o $output_file1 $output_file2 -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr $empty_outfile
+
diff -r 5ac9c40dae35 -r ee221004e3b4 refinery_test_2-1.xml
--- a/refinery_test_2-1.xml Mon May 13 16:52:26 2013 -0400
+++ b/refinery_test_2-1.xml Mon May 13 17:59:26 2013 -0400
@@ -2,13 +2,14 @@
for testing Galaxy workflow execution from Refinery
- refinery_test_tool.py -i $input_file1 $input_file2 -o $output_file -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr
+ refinery_test_tool.py -i $input_file1 $input_file2 -o $output_file -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr $empty_outfile
+
diff -r 5ac9c40dae35 -r ee221004e3b4 refinery_test_2-2.xml
--- a/refinery_test_2-2.xml Mon May 13 16:52:26 2013 -0400
+++ b/refinery_test_2-2.xml Mon May 13 17:59:26 2013 -0400
@@ -2,13 +2,14 @@
for testing Galaxy workflow execution from Refinery
- refinery_test_tool.py -i $input_file1 $input_file2 -o $output_file1 $output_file2 -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr
+ refinery_test_tool.py -i $input_file1 $input_file2 -o $output_file1 $output_file2 -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr $empty_outfile
+
diff -r 5ac9c40dae35 -r ee221004e3b4 refinery_test_2-6.xml
--- a/refinery_test_2-6.xml Mon May 13 16:52:26 2013 -0400
+++ b/refinery_test_2-6.xml Mon May 13 17:59:26 2013 -0400
@@ -2,13 +2,14 @@
for testing Galaxy workflow execution from Refinery
- refinery_test_tool.py -i $input_file1 $input_file2 -o $output_file1 $output_file2 $output_file3 $output_file4 $output_file5 $output_file6 -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr
+ refinery_test_tool.py -i $input_file1 $input_file2 -o $output_file1 $output_file2 $output_file3 $output_file4 $output_file5 $output_file6 -e $exit_code -p $p_fail -s $sleep_time $stdout $stderr $empty_outfile
+
diff -r 5ac9c40dae35 -r ee221004e3b4 refinery_test_tool.py
--- a/refinery_test_tool.py Mon May 13 16:52:26 2013 -0400
+++ b/refinery_test_tool.py Mon May 13 17:59:26 2013 -0400
@@ -29,8 +29,11 @@
input = read_files(args.input_files)
try:
for out_file in args.output_files:
- out_file.write("Output file name: " + out_file.name + "\n\n")
- out_file.write(input)
+ if args.empty_outfile:
+ output = ''
+ else:
+ output = "Output file name: " + out_file.name + "\n\n" + input
+ out_file.write(output)
except IOError as e:
cleanup(args)
parser.error(e)
@@ -104,6 +107,8 @@
help='write a message to stdout')
parser.add_argument('--stderr', action='store_true',
help='write a message to stderr')
+ parser.add_argument('--empty_outfile', action='store_true',
+ help='produce empty output file(s)')
parser.add_argument('-p', '--p-fail', type=float, default=0.0,
help='probability of execution failure, default: %(default)s')
parser.add_argument('-s', '--sleep', dest='seconds', type=int, default=0,