Skip to content
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

Exec transition is missing on lcov_merger in sh_test and cc_test #17630

Closed
thirtyseven opened this issue Mar 1, 2023 · 2 comments
Closed

Exec transition is missing on lcov_merger in sh_test and cc_test #17630

thirtyseven opened this issue Mar 1, 2023 · 2 comments
Labels
team-Rules-Server Issues for serverside rules included with Bazel type: bug untriaged

Comments

@thirtyseven
Copy link
Contributor

thirtyseven commented Mar 1, 2023

Description of the bug:

This is basically the same bug as #17568 but for sh_test and cc_test

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Sample workspace: testrepo.zip

unzip testrepo.zip
cd testrepo
bazel coverage :ShTest

Test output:

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:ShTest
-----------------------------------------------------------------------------
GCov does not exist at the given path: ''
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/devtools/coverageoutputgenerator/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at com.google.testing.coverage.JacocoCoverageRunner.getMainClass(JacocoCoverageRunner.java:321)
        at com.google.testing.coverage.JacocoCoverageRunner.main(JacocoCoverageRunner.java:584)

Which operating system are you running Bazel on?

macOS 13.2.1

What is the output of bazel info release?

6.1.0rc2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@sgowroji
Copy link
Member

sgowroji commented Mar 1, 2023

Hi @thirtyseven, Could you please add a Reproducible example for the above issue. Thanks!

@thirtyseven
Copy link
Contributor Author

thirtyseven commented Mar 1, 2023

I have added an example @sgowroji. The setup is mostly the same as #17568 which I just submitted a fix for.

@thirtyseven thirtyseven changed the title Exec transition is missing on lcov_merger in sh_test Exec transition is missing on lcov_merger in sh_test and cc_test Mar 1, 2023
fweikert pushed a commit to fweikert/bazel that referenced this issue May 25, 2023
Fixes bazelbuild#17630

Closes bazelbuild#17631.

PiperOrigin-RevId: 513254952
Change-Id: Id97892db8adca0d8bbb5ecd87a44e3f711a5b56c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-Server Issues for serverside rules included with Bazel type: bug untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants