Search code examples
bazel

Bazel workaround for filenames with ':' in them?


I have Python tests that depend on files with ':' in the filenames.

I would like to put the tests under bazel, but bazel becomes unhappy when I supply the files in the data argument to py_test, complaining that:

invalid target name 'bazel_test_cases/foo/input/foo:bar': target names may not contain ':'

Is there a work around for this?


Solution

  • I don't think there is a workaround. : is normally used to separate the package and the target name. And trying to escape with \ fails with target names may not contain '\'