Skip to content

genhtml can't find Java source files when generating a coverage report #2528

@hanwen

Description

@hanwen

Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.

Description of the problem / feature request / question:

$ git clone --recursive https://gerrit.googlesource.com/gerrit

$ cd gerrit

$ bazel version
Build label: 0.4.4
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Feb 1 18:54:21 2017 (1485975261)
Build timestamp: 1485975261
Build timestamp as int: 1485975261

$ bazel coverage --test_output=streamed //gerrit-common:auto_value_tests
.........
WARNING: Streamed test output requested so all tests will be run locally, without sharding, one at a time.
INFO: Using default value for --instrumentation_filter: "//gerrit-common".
INFO: Override the above default with --instrumentation_filter
INFO: Found 1 test target...
JUnit4 Test Runner
.
Time: 0.027

OK (1 test)

BazelTestRunner exiting with a return value of 0
JVM shutdown hooks (if any) will run now.
The JVM will exit once they complete.

-- JVM shutdown starting at 2017-02-13 15:38:40 --

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/devtools/lcovmerger/Main : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
FAIL: //gerrit-common:auto_value_tests (see /home/hanwen/.cache/bazel/_bazel_hanwen/9590700e58e6cc9bff046cc6a346bc64/execroot/gerrit/bazel-out/local-fastbuild/testlogs/gerrit-common/auto_value_tests/test.log).
Target //gerrit-common:auto_value_tests up-to-date:
bazel-bin/gerrit-common/auto_value_tests.jar
bazel-bin/gerrit-common/auto_value_tests

If asking a question or requesting a feature, also tell us about the underlying problem you're trying to solve.

If possible, provide a minimal example to reproduce the problem:

Environment info

  • Operating System:

  • Bazel version (output of bazel info release):

  • If bazel info release returns "development version" or "(@Non-Git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD):

Have you found anything relevant by searching the web? (e.g. GitHub issues, email threads in the [email protected] archive)

Anything else, information or logs or outputs that would be helpful?

(If they are large, please upload as attachment or provide link).

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)coveragetype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions