我有一个小任务,我使用TensorFlow创建音乐:
https://github.com/tensorflow/magenta
当我运行代码--- bazel test //magenta:all
时
我收到以下错误:
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.
答案 0 :(得分:4)
运行时
bazel test magenta:all
这意味着"执行文件magenta / BUILD中定义的所有* _test规则。 当我查看该文件时,那里没有定义测试。 https://github.com/tensorflow/magenta/blob/master/magenta/BUILD
你应该尝试:
bazel test magenta/...
这会转换为洋红色文件夹中包含的所有内容,包括其他包。有关更多信息,请参阅: https://bazel.build/versions/master/docs/command-line-reference.html