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, launcher: add unit test for flag escaping #7402

Closed
wants to merge 4 commits into from

Conversation

laszlocsomor
Copy link
Contributor

Add a unit test to assert that:

  • WindowsEscapeArg escapes flags as expected
  • When we pass a WindowsEscapeArg-escaped flag to
    CreateProcessW, the subprocess receives the
    original flag.

This is a follow-up to #7395

Next I'll fix WindowsEscapeArg to correctly escape
arguments.

See #7072

@laszlocsomor
Copy link
Contributor Author

@meteorcloudy : please note that this PR contains two commits. You should only review the second one, i.e. 915111c .

Add a unit test to assert that:
- WindowsEscapeArg escapes flags as expected
- When we pass a WindowsEscapeArg-escaped flag to
  CreateProcessW, the subprocess receives the
  original flag.

This is a follow-up to bazelbuild#7395

Next I'll fix WindowsEscapeArg to correctly escape
arguments.

See bazelbuild#7072
@bazel-io bazel-io closed this in 6a7b0fb Feb 13, 2019
laszlocsomor added a commit to laszlocsomor/bazel that referenced this pull request Feb 13, 2019
Add a correct implementation of WindowsEscapeArg.

This is a follow-up to bazelbuild#7402

Next steps:
- update Bazel to separate jvm_flags that are
  embedded in the native lauancher by some other
  character than space, so that arguments with
  spaces can be embedded

- replace the current WindowsEscapeArg
  implementation in the launcher with the new,
  correct one

See bazelbuild#7072
@laszlocsomor laszlocsomor deleted the gh-7072-b branch February 13, 2019 08:50
bazel-io pushed a commit that referenced this pull request Feb 13, 2019
Add a correct implementation of WindowsEscapeArg.

This is a follow-up to #7402

Next steps:
- update Bazel to separate jvm_flags that are
  embedded in the native lauancher by some other
  character than space, so that arguments with
  spaces can be embedded

- replace the current WindowsEscapeArg
  implementation in the launcher with the new,
  correct one

See #7072

Closes #7411.

PiperOrigin-RevId: 233733871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants