@@ -16,37 +16,33 @@ task stuart_filechecker {
16
16
17
17
if cat ~ {truth} | md5sum --check test.txt
18
18
then
19
- echo " Files pass" > report.txt
19
+ echo " Files pass" | tee -a report.txt
20
20
else
21
21
if ~ {verbose}
22
22
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
39
35
else
40
36
if ~ {exact}
41
37
then
42
- echo " Files do not pass" > report.txt
38
+ echo " Files do not pass md5sum check " | tee -a report.txt
43
39
else
44
- echo " Calling Rscript to check for functional equivalence."
40
+ echo " Calling Rscript to check for functional equivalence... "
45
41
if Rscript /opt/rough_equivalence_check.R ~ {test} ~ {truth} ~ {tolerance}
46
42
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
48
44
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
50
46
fi
51
47
fi
52
48
fi
0 commit comments