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

Windows: windows_remote_test fails with --incompatible_windows_native_test_wrapper #9009

Closed
laszlocsomor opened this issue Jul 30, 2019 · 2 comments
Assignees
Labels
area-Windows Windows-specific issues and feature requests P1 I'll work on this now. (Assignee required) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@laszlocsomor
Copy link
Contributor

laszlocsomor commented Jul 30, 2019

Windows 10
Bazel 0.28.1

//src/test/py/bazel:windows_remote_test fails with --incompatible_windows_native_test_wrapper :

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //src/test/py/bazel:windows_remote_test
-----------------------------------------------------------------------------
.C:\python3\lib\unittest\suite.py:107: ResourceWarning: unclosed file <_io.BufferedRandom name=3>
  for index, test in enumerate(self):
C:\python3\lib\unittest\suite.py:107: ResourceWarning: unclosed file <_io.BufferedRandom name=4>
  for index, test in enumerate(self):
....F
======================================================================
FAIL: testShTestRunsRemotely (__main__.WindowsRemoteTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "\\?\D:\temp\Bazel.runfiles_v5_7ny3c\runfiles\io_bazel\src\test\py\bazel\windows_remote_test.py", line 139, in testShTestRunsRemotely
    self.assertIn('RUNFILES_MANIFEST_FILE: ""', stdout)
AssertionError: 'RUNFILES_MANIFEST_FILE: ""' not found in ['==================== Test output for //foo:foo_test:', 'hello test', 'RUNFILES_MANIFEST_FILE: "D:/temp/build-d474d29e-f9b9-46ea-b31d-e75a5d46c2f6/bazel-out/x64_windows-fastbuild/bin/foo/foo_test.exe.runfiles/MANIFEST"', '================================================================================', '//foo:foo_test                                                           PASSED in 0.2s', '', 'Executed 1 out of 1 test: 1 test passes.', 'There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.']

----------------------------------------------------------------------
Ran 6 tests in 188.195s

Full log: https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/3833#9aef8611-6633-4d18-9012-3d17e507deb3

@laszlocsomor laszlocsomor changed the title Windows: bazel:windows_remote_testfail with --incompatible_windows_native_test_wrapper Windows: windows_remote_test fails with --incompatible_windows_native_test_wrapper Jul 30, 2019
@laszlocsomor laszlocsomor self-assigned this Jul 30, 2019
@laszlocsomor laszlocsomor added P1 I'll work on this now. (Assignee required) area-Windows Windows-specific issues and feature requests type: bug labels Jul 30, 2019
@laszlocsomor
Copy link
Contributor Author

I think the culprit is

!SetPathEnv(L"RUNFILES_MANIFEST_FILE", runfiles_mf)) {
.

The test wrapper should check if the manifest exists before exporting it, like test-setup.sh does:

if [[ "${RUNFILES_MANIFEST_ONLY:-}" == "1" && -e "${RUNFILES_MANIFEST_FILE:-}" ]]; then

@laszlocsomor
Copy link
Contributor Author

The test wrapper should check if the manifest exists before exporting it

That is indeed the culprit. I'll fix that.

However, RUNFILES_MANIFEST_ONLY=1 while RUNFILES_DIR has a value (in testShTestRunsRemotely). Looks like a bug.

laszlocsomor added a commit to laszlocsomor/bazel that referenced this issue Jul 30, 2019
Fixes bazelbuild#9009

Change-Id: Iadbb70bb9cceea8bdf4f4d9b67a70efa2463fbd4
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests P1 I'll work on this now. (Assignee required) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants