New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get error : ERROR: <builtin>: output '_coverage/_coverage_report.dat' was not created when execute “bazel run” command #12868
Comments
As supplements: build --define=ABSOLUTE_JAVABASE=/opt/buildtools/adoptopenjdk-8u242b08/jdk8u242-b08 And error log in /root/.cache/bazel/_bazel_root/ef23feb022b492d353b857069ef82962:
|
Is there a work-around for this?
It works for me only in Mac: Darwin Kernel Version 20.6.0, Bazel: release 4.0.0 |
I don't see specific issue for Bazel here, maybe report this also on |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
I got this output:
INFO: Build options --collect_code_coverage, --coverage_report_generator, --instrumentation_filter, and 1 more have changed, discarding analysis cache.
INFO: Analyzed target //:sq (2 packages loaded, 174 targets configured).
INFO: Found 1 target...
ERROR: /opt/code/serp/bepcloudbazel/bepcloud/BUILD.bazel:27:10: //:sq: missing input file '//:bazel-out/_coverage/_coverage_report.dat'
Target //:sq failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /opt/code/serp/bepcloudbazel/bepcloud/BUILD.bazel:27:10 1 input file(s) do not exist
INFO: Elapsed time: 0.193s, Critical Path: 0.07s
INFO: 4 processes: 4 worker.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
And then ,i tried to run : "bazel coverage //..." to generate the "_coverage_report.dat" file, but got an error as below:
account@DZ:/opt/code/serp/bepcloudbazel/bepcloud# bazel coverage //...
_INFO: Using default value for --instrumentation_filter: "//bepcloud-parent/bepcloud-common[/:]".
INFO: Override the above default with --instrumentation_filter
INFO: Build options --collect_code_coverage, --coverage_report_generator, --instrumentation_filter, and 1 more have changed, discarding analysis cache.
INFO: Analyzed 6 targets (0 packages loaded, 230 targets configured).
INFO: Found 5 targets and 1 test target...
INFO: LCOV coverage report is located at /root/.cache/bazel/_bazel_root/b522ef4008cbaf1fbce240d7f801c5b6/execroot/main/bazel-out/_coverage/_coverage_report.dat
and execpath is bazel-out/_coverage/_coverage_report.dat
INFO: From CoverageReport _coverage/_coverage_report.dat:
Jan 21, 2021 3:06:49 PM com.google.devtools.coverageoutputgenerator.SonarQubeCoverageGenerator getTracefiles
INFO: Found 1 tracefiles.
Jan 21, 2021 3:06:49 PM com.google.devtools.coverageoutputgenerator.SonarQubeCoverageGenerator parseFiles
SEVERE: Parsing file bazel-out/k8-fastbuild/testlogs/bepcloud-parent/bepcloud-common/subarrytest/coverage.dat
Jan 21, 2021 3:06:49 PM com.google.devtools.coverageoutputgenerator.SonarQubeCoverageGenerator getGcovInfoFiles
INFO: No gcov info file found.
Jan 21, 2021 3:06:49 PM com.google.devtools.coverageoutputgenerator.SonarQubeCoverageGenerator getProfdataFileOrNull
INFO: No .profdata file found.
Jan 21, 2021 3:06:49 PM com.google.devtools.coverageoutputgenerator.SonarQubeCoverageGenerator main
WARNING: There was no coverage found.
ERROR: : output '_coverage/_coverage_report.dat' was not created
ERROR: : not all outputs were created or valid
INFO: Elapsed time: 0.341s, Critical Path: 0.24s
INFO: 4 processes: 1 linux-sandbox, 3 worker.
FAILED: Build did NOT complete successfully
//bepcloud-parent/bepcloud-common:subarrytest (cached) PASSED in 0.7s
Executed 0 out of 1 test: 1 test passes.
All tests passed but there were other errors during the build.
FAILED: Build did NOT complete successfully_
What operating system are you running Bazel on?
What's the output of
bazel info release
?Have you found anything relevant by searching the web?
Any other information, logs, or outputs that you want to share?
The WORKSPACE file:
_http_archive(
name = "bazel_sonarqube",
sha256 = "e33f8222983b20cc4eb7d128db68bf83a63571d0b6e05b97bd3871b81f8fb9d9",
strip_prefix = "bazel-sonarqube-56537ff1cf4e6c28fba2b06e0f20d1f4e186645e",
urls = ["https://github.com/Zetten/bazel-sonarqube/archive/56537ff1cf4e6c28fba2b06e0f20d1f4e186645e.zip"],
)
load("@bazel_sonarqube//:repositories.bzl", "bazel_sonarqube_repositories")
bazel_sonarqube_repositories(
sonar_scanner_cli_sha256 = "a271a933d14da6e8705d58996d30afd0b4afc93c0bfe957eb377bed808c4fa89",
sonar_scanner_cli_version = "4.5.0.2216",
)_
The parent BUILD file:
_load("@bazel_sonarqube//:defs.bzl", "sonarqube")
filegroup(
name = "git",
srcs = glob(
[".git/"],
exclude = [".git//["], # gitk creates temp files with []
),
tags = ["manual"],
)
filegroup(
name = "coverage_report",
srcs = ["bazel-out/_coverage/_coverage_report.dat"],
tags = ["manual"],
visibility = ["//visibility:public"],
)
filegroup(
name = "test_reports",
srcs = glob(["bazel-testlogs/**/test.xml"]),
tags = ["manual"],
visibility = ["//visibility:public"],
)
sonarqube(
name = "sq",
coverage_report = ":coverage_report",
modules = {"//bepcloud-parent/bepcloud-common:subarrytest":"subarrytest"},
project_key = "bepcloud:bepcloud-common",
project_name = "bepcloud-common-bazel",
scm_info = [":git"],
tags = ["manual"],
)_
The child BUILD file:
_filegroup(
name = "file_java_srcs",
srcs = glob(["src/main/java/com/huawei/bepcloud/validater/SubArray.java"]),
)
java_library(
name = "source_java",
srcs = [":file_java_srcs"],
)
java_library(
name = "file_java_tests",
testonly = False,
srcs = glob(["src/main/java/com/huawei/bepcloud/validater/SubArrayTest.java"]),
deps = [
":source_java",
"@maven//:junit_junit",
],
)
java_test(
name = "subarrytest",
size = "small",
testonly = False,
test_class = "com.huawei.bepcloud.validater.SubArrayTest",
runtime_deps = [":file_java_tests"],
visibility = ["//visibility:public"],
)_
The ENV is:
OS: Ubuntu 18.04.2 LTS
GCC: gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
bazel : 3.5.0
sonarqube : 8.5.1.38104
The text was updated successfully, but these errors were encountered: