Finding locations of test assets#

It is often useful to know the location a test’s execution directory. The canary location command can display the locations of test assets:

$ canary location -h
usage: canary location [-h] [-i | -l | -x | -s] testspec

Print locations of test files and directories

positional arguments:
  testspec    Test name or test id

options:
  -i          Show the location of the test's input file
  -l          Show the location of the test's log file
  -x          Show the location of the test's working directory
  -s          Show the location of the test's source directory
  -h, --help  Show this help message and exit.

If no options are give, -x is assumed.

For example to move to the test execution directory, simply:

cd $(canary location ID)

where ID is the test ID that is printed by canary status.