baseline#
- baseline(*, src: str | None = None, dst: str | None = None, when: str | dict[str, str] | None = None, flag: str | None = None) None#
Rebaseline a test by running
canary rebaseline ...in the test session directory (or one of its subdirectories)Usage#
.pyt:import canary canary.directives.baseline(src, dst, when=...) canary.directives.baseline(flag=..., when=...)
.vvt:#VVT: baseline (options=..., platforms=..., testname=...) : src,dst #VVT: baseline (options=..., platforms=..., testname=...) : flag
Parameters#
src: The source file.dst: The destination file to replace withsrcwhen: Restrict processing of the directive to this conditionflag: Run the test script with the--FLAGoption on the command line to perform rebaselining.flagshould start with a hyphen (-). The script should parse this value and perform the appropriate rebaselining.
The
whenexpression is limited to the following conditions:testname: Restrict processing of the directive to this test nameplatforms: Restrict processing of the directive to certain platform or platformsparameters: Restrict processing of the directive to certain parameter names and values
Examples#
import canary canary.directives.baseline("file.exo", "file.base_exo", when="platforms='not darwin'")
# VVT: baseline (platforms="not darwin") : file.exo,file.base_exowill replace
file.base_exowithfile.exowhen the baseline stage is ran in its results directory:$ canary run [options] $ cd $(canary -C TestResults location /TESTID) $ canary rebaseline .