Skip to content

Commit

Permalink
Fix tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy committed Jul 24, 2024
1 parent abcdb43 commit ce2dd97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/test/py/bazel/bazel_windows_cpp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ def testCppErrorShouldBeVisible(self):

def testBuildWithClangClByToolchainResolution(self):
self.DisableBzlmod()
self.ScratchFile('WORKSPACE', [
'register_execution_platforms(',
' ":windows_clang"',
')',
Expand Down
5 changes: 4 additions & 1 deletion src/test/py/bazel/bazel_windows_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
class BazelWindowsTest(test_base.TestBase):

def createProjectFiles(self):
self.ScratchFile('MODULE.bazel', [
'bazel_dep(name = "platforms", version = "0.0.9")',
])
self.ScratchFile('foo/BUILD', [
'platform(',
' name = "x64_windows-msys-gcc",',
Expand Down Expand Up @@ -133,7 +136,7 @@ def testWindowsCompilesAssembly(self):
def testWindowsEnvironmentVariablesSetting(self):
self.ScratchFile('BUILD')
rule_definition = [
'my_repo = use_repo_rule(":repo.bzl", "my_repo")',
'my_repo = use_repo_rule("//:repo.bzl", "my_repo")',
'my_repo(name = "env_test")',
]
self.ScratchFile('MODULE.bazel', rule_definition)
Expand Down
1 change: 1 addition & 0 deletions src/test/py/bazel/test_wrapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ def testRunningTestFromExternalRepo(self):
]
self.ScratchFile('MODULE.bazel', rule_definition)
self.ScratchFile('BUILD', ['py_test(name = "x", srcs = ["x.py"])'])
self.ScratchFile('a/REPO.bazel')
self.ScratchFile('a/BUILD', ['py_test(name = "x", srcs = ["x.py"])'])
self.ScratchFile('x.py')
self.ScratchFile('a/x.py')
Expand Down

0 comments on commit ce2dd97

Please sign in to comment.