han
han

Reputation: 31

Bazel error: "No test targets were found, yet testing was requested"

I have a small assignment where I used TensorFlow to create music:

https://github.com/tensorflow/magenta

When I run the code --- bazel test //magenta:all I get the following error:

WARNING: /home/admin/.cache/bazel/_bazel_admin/fb30f33370a5b97d4f9b1dde06f8f344/external/protobuf/protobuf.bzl:90:19: Variables HOST_CFG and DATA_CFG are deprecated in favor of strings "host" and "data" correspondingly.
WARNING: /home/admin/.cache/bazel/_bazel_admin/fb30f33370a5b97d4f9b1dde06f8f344/external/protobuf/protobuf.bzl:96:28: Variables HOST_CFG and DATA_CFG are deprecated in favor of strings "host" and "data" correspondingly.
INFO: Found 2 targets and 0 test targets...
INFO: Elapsed time: 4.977s, Critical Path: 0.66s
ERROR: No test targets were found, yet testing was requested.

Upvotes: 3

Views: 7125

Answers (1)

gunan
gunan

Reputation: 927

When you run

bazel test magenta:all

This means "execute all *_test rules defined in file magenta/BUILD. When I look at that file, there are no tests defined there. https://github.com/tensorflow/magenta/blob/master/magenta/BUILD

You should try:

bazel test magenta/...

This translates to all things that are included in magenta folder, including other packages. For more information, please see: https://bazel.build/versions/master/docs/command-line-reference.html

Upvotes: 8

Related Questions