Skip to content

Windows: Tests in the root of the workspace are broken in Bazel 0.12.0 #5079

Closed

Description

@jasharpe

Description of the problem / feature request:

All tests in the root of the workspace are broken in Bazel 0.12.0, failing with

external/bazel_tools/tools/test/test-setup.sh: line 231: : command not found

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

Create a repo on a Windows machine with an empty WORKSPACE and the contents of this gist: https://gist.github.com/jasharpe/ca1cdbeb293d0d1cd1d552dbabee0bb5

In the root of the workspace, with Bazel 0.12.0, run:

bazel clean; bazel test :sh_test --test_output=errors

Actual:

==================== Test output for //:sh_test:
external/bazel_tools/tools/test/test-setup.sh: line 231: : command not found
================================================================================

Expected: Test should pass.

What operating system are you running Bazel on?

Windows Server 2016

What's the output of bazel info release?

release 0.12.0

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

N/A

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

N/A

Have you found anything relevant by searching the web?

No.

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

This is broken because for a test in the root of the workspace, Bazel is looking in the runfiles manifest for:

__main__/./sh_test.exe

(Note the "/./" in the middle! That's the problem.)

But the manifest has an entry that looks like this:

...
__main__/sh_test.exe ...
...

(Note no "/./" in the middle.)

I am pretty sure this was working in Bazel 0.11.

Activity

  1. jasharpe commented on Apr 23, 2018

    @jasharpe
    Author
  2. jasharpe commented on Apr 23, 2018

    @jasharpe
    Author

    BTW this is broken in the same way at HEAD.

  3. jasharpe commented on Apr 23, 2018

    @jasharpe
    Author

    Confirmed that this is not broken on Bazel 0.11.1. The exact same test command passes.

  4. laszlocsomor commented on Apr 24, 2018

    @laszlocsomor
    Contributor

    @jasharpe , thanks for a detailed bug report! I'll take a look.

  5. self-assigned this
    on Apr 24, 2018
  6. laszlocsomor commented on Apr 24, 2018

    @laszlocsomor
    Contributor

    Culprit is eb067ea.

  7. laszlocsomor commented on Apr 24, 2018

    @laszlocsomor
    Contributor

    This is blocking #4583

  8. added
    P1
    on Apr 24, 2018
  9. laszlocsomor commented on Apr 24, 2018

    @laszlocsomor
    Contributor

    We'll cherry-pick a fix into 0.13.0 . Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1platform: windowstype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions