Skip to content

Commit 7c7c2f1

Browse files
authored
Merge pull request #9 from aofarrel/filechecker-send-to-output-file
Update filechecker.wdl
2 parents b50fa8c + ca0e87f commit 7c7c2f1

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

filechecker.wdl

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,33 @@ task stuart_filechecker {
1616

1717
if cat ~{truth} | md5sum --check test.txt
1818
then
19-
echo "Files pass" > report.txt
19+
echo "Files pass" | tee -a report.txt
2020
else
2121
if ~{verbose}
2222
then
23-
>&2 echo "Test checksum:"
24-
>&2 cat test.txt
25-
>&2 echo "-=-=-=-=-=-=-=-=-=-"
26-
>&2 echo "Truth checksum:"
27-
>&2 cat truth.txt
28-
>&2 echo "-=-=-=-=-=-=-=-=-=-"
29-
>&2 echo "Contents of the output file:"
30-
>&2 cat ~{test}
31-
>&2 echo "-=-=-=-=-=-=-=-=-=-"
32-
>&2 echo "Contents of the truth file:"
33-
>&2 cat ~{truth}
34-
>&2 echo "-=-=-=-=-=-=-=-=-=-"
35-
>&2 echo "cmp and diff of these files:"
36-
>&2 cmp --verbose test.txt truth.txt
37-
>&2 diff test.txt truth.txt
38-
>&2 diff -w test.txt truth.txt
23+
echo "Test checksum:" | tee -a report.txt
24+
cat test.txt | tee -a report.txt
25+
echo "Truth checksum:" | tee -a report.txt
26+
cat truth.txt | tee -a report.txt
27+
echo "-=-=-=-=-=-=-=-=-=-\nContents of test file:" | tee -a report.txt
28+
cat ~{test} | tee -a report.txt
29+
echo "-=-=-=-=-=-=-=-=-=-\nContents of truth file:" | tee -a report.txt
30+
cat ~{truth} | tee -a report.txt
31+
echo "-=-=-=-=-=-=-=-=-=-\ncmp and diff of files:" | tee -a report.txt
32+
cmp --verbose test.txt truth.txt | tee -a report.txt
33+
diff test.txt truth.txt | tee -a report.txt
34+
diff -w test.txt truth.txt
3935
else
4036
if ~{exact}
4137
then
42-
echo "Files do not pass" > report.txt
38+
echo "Files do not pass md5sum check" | tee -a report.txt
4339
else
44-
echo "Calling Rscript to check for functional equivalence."
40+
echo "Calling Rscript to check for functional equivalence..."
4541
if Rscript /opt/rough_equivalence_check.R ~{test} ~{truth} ~{tolerance}
4642
then
47-
echo "Outputs are not identical, but are mostly equivalent." > report.txt
43+
echo "Outputs are not identical, but are mostly equivalent." | tee -a report.txt
4844
else
49-
echo "Outputs vary beyond accepted tolerance (default:1.0e-8)." > report.txt
45+
echo "Outputs vary beyond accepted tolerance (default:1.0e-8)." | tee -a report.txt
5046
fi
5147
fi
5248
fi

0 commit comments

Comments
 (0)