Windows: fix native test wrapper's arg. escaping
The native test wrapper now correctly escapes the
arguments for the subprocess, using
bazel::launcher::WindowsEscapeArg2 from the native
launcher.
The test_wrapper_test now uses a mock C++ binary
instead of a .bat file to verify the test
arguments. Doing so trades the weird command line
flag parsing logic of cmd.exe (inherent in using a
.bat file) for the saner C++ flag parsing one.
Fixes https://github.com/bazelbuild/bazel/issues/7956
Unblocks https://github.com/bazelbuild/bazel/issues/6622
Closes #7957.
PiperOrigin-RevId: 242446422
diff --git a/tools/test/BUILD b/tools/test/BUILD
index 735e2fb..6deb7dd 100644
--- a/tools/test/BUILD
+++ b/tools/test/BUILD
@@ -80,6 +80,7 @@
"//src/main/cpp/util:strings",
"//src/main/native/windows:lib-file",
"//src/main/native/windows:lib-util",
+ "//src/tools/launcher/util",
"//third_party/ijar:zip",
"@bazel_tools//tools/cpp/runfiles",
],