Only autodetect if we have a test directory.