testMakeSFTDAG.sh: use reference results, add more tests
Description
-
The tests in
testMakeSFTDAG.sh
still check the contents of the generated.dag
,.sub
, etc. files against expected output. Instead of coding that output directly into the test script, however, the expected output is read from files stored in the reference result tarballtestMakeSFTDAG.tar.gz
. If a test is added/changed, a new tarball is generated in the test directory, and a warning message is printed to copy the new tarball to the source directory to update the reference results. This should make it a bit easier to add new tests. The test code is in a functionunittest
which can be easily reused for new tests. -
In addition to checking against a reference result, the tests also check for specific strings in the generated output, e.g. expected SFT names,
MakeSFTs
options. This replaces the current tests where variable names are inserted into the reference results, e.g. to check that SFT names match the given input. Again this will hopefully make writing new tests a bit easier. This test code is also in a function calledgreptest
for ease of reuse. -
Added new tests to check for the default SFT window (
tukey:0.001
) as well as explicit choices of different Tukey windows (see !2363 (comment 1168158), #767 (closed)). -
Extended the 2nd segment so that 2 (overlapped) SFTs are generated, and check that the SFT names appear in the generated
.dag
,.sub
, etc. files. -
Added a test to generate more than 1 SFT per job, check that all SFT names appear in the generated output (see #767 (comment 1175263), !2373 (merged)).
Closes #767 (closed).
API Changes and Justification
Backwards Compatible Changes
-
This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions -
This change adds new classes/functions/structs/types to a public C header file or Python module
Backwards Incompatible Changes
-
This change modifies an existing class/function/struct/type definition in a public C header file or Python module -
This change removes an existing class/function/struct/type from a public C header file or Python module