You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Analysis tests automatically create a script with the test result, consisting of test messages and exit (0/1). It generally works nice. However, I've noticed that generated bash scripts don't contain a shebang. This means that if the test is built with Bazel, but runs with some outside tool, it might not be able to run such script without certain hacks which shouldn't be necessary.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Just build any analysis test on Linux and look at the generated script. No shebang.
Which operating system are you running Bazel on?
Linux
What is the output of bazel info release?
6.1.0-12
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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
I'm quite sure it can be fixed with a small fix to AnalysisTestActionBuilder, something along the lines of
if (isExecutedOnWindows) {
sb.append("@echo off\n");
} else {
sb.append("#/bin/sh")
}
The text was updated successfully, but these errors were encountered:
See #18940 for more details. I've also wanted to update the tests, but it seems that this code doesn't have any test coverage (or I couldn't find it). To be fair, it is probably simple enough to not need it.
Closes#19780.
PiperOrigin-RevId: 572627238
Change-Id: I3685e782833712199a2696ac67477b9f2bb2f7ae
Description of the bug:
Analysis tests automatically create a script with the test result, consisting of test messages and exit (0/1). It generally works nice. However, I've noticed that generated bash scripts don't contain a shebang. This means that if the test is built with Bazel, but runs with some outside tool, it might not be able to run such script without certain hacks which shouldn't be necessary.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Just build any analysis test on Linux and look at the generated script. No shebang.
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?6.1.0-12
If
bazel info release
returnsdevelopment 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
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
I'm quite sure it can be fixed with a small fix to AnalysisTestActionBuilder, something along the lines of
The text was updated successfully, but these errors were encountered: