NO_RT test option causes cmake to use
-B baselinedir instead of
-V testimage.png. It also causes the test script to be executed directly, instead of via the
rtImageTest test driver, even though this is not explicitly stated in the documentation:
-Bis passed instead of
-V, only providing a baseline dir, assuming
NO_VALIDis not specified.
The goal of this MR is to make it so that Python test scripts that use
Testing.main() will work regardless of whether they are executed directly, or whether they are executed via
rtImageTest. This removes the need for the
NO_RT option in almost all cases.
In order to run these tests without
NO_RT, two changes were made to
- Before searching
-B baselinedirfor test images, the images passed with
-V testimage.pngare also checked, if they have the same basename as the desired image.
- More flexibility is provided for the test arg positions, allowing for
rtImageTest.py testscript.py -arg1 x -arg2 yinstead of strictly requiring
testscript.py -arg1 x -arg2 y.
After this change, the only tests that absolutely require
NO_RT are the ones that require the baselinedir rather than just one test image, i.e. the ones that require multiple baselines, or that require baselines that are not named after the test.
The benefit of this change is less frustration for people who wrote a test, but didn't add
NO_RT and don't understand why their test doesn't work. The caveat is that leaving out the
NO_RT means that
rtImageTest is used unnecessarily for