Skip to content

Cannot run sh_test tests on Windows [#6622 will fix it] #7387

Description

@vmax

Description of the problem / feature request:

I cannot bazel run sh_test on Windows whereas bazel test succeeds

Feature requests: what underlying problem are you trying to solve with this feature?

As a user of bazel on Mac I would expect bazel run on a test target to behave the same as bazel test --test_output=streamed which doesn't seem to be the case.

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

Create an sh_test with whatever contents

Resulting error:

Executing tests from //:a                                                                                                                                            
external/bazel_tools/tools/test/test-setup.sh: line 147: cd: /c/users/circleci/_bazel~1/q3reexpr/execroot/__main__/bazel-out/x64_windows-fastbuild/bin/a.exe.runfiles
/__main__: No such file or directory                                                                                                                                 
Could not chdir /c/users/circleci/_bazel~1/q3reexpr/execroot/__main__/bazel-out/x64_windows-fastbuild/bin/a.exe.runfiles/__main__  

What operating system are you running Bazel on?

Windows Server 2019

What's the output of bazel info release?

 bazel version                                                                                                                                           
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".                            
INFO: Invocation ID: aa5a2fea-ff69-4f76-b963-f7fb4f427831                                                                                                 
Build label: 0.22.0                                                                                                                                       
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar                                      
Build time: Mon Jan 28 12:59:27 2019 (1548680367)                                                                                                         
Build timestamp: 1548680367                                                                                                                               
Build timestamp as int: 1548680367

Have you found anything relevant by searching the web?

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

Let me know if I'm wrong in understanding bazel run vs bazel test

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)area-WindowsWindows-specific issues and feature requeststeam-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websitetype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions