Windows: fix rule_size_test for the test wrapper

Fix //src:rule_size_test so it works when using
--experimental_windows_native_test_wrapper.

The test failed with the Windows-native test
wrapper because the test wrapper launches the test
binary directly, and the rule created an empty
.bat file as its executable, and CreateProcessW
apparently cannot run empty .bat files.

Also: log the failed command in the test wrapper
when CreateProcessW fails.

See https://github.com/bazelbuild/bazel/issues/5508

Closes #7112.

PiperOrigin-RevId: 229162712
diff --git a/src/rule_size_test.bzl b/src/rule_size_test.bzl
index 66024ea..e80fb90 100644
--- a/src/rule_size_test.bzl
+++ b/src/rule_size_test.bzl
@@ -88,7 +88,14 @@
 
     if ctx.attr.is_windows:
         test_bin = ctx.actions.declare_file(ctx.label.name + ".bat")
-        ctx.actions.write(output = test_bin, content = "", is_executable = True)
+
+        # CreateProcessW can launch .bat files directly as long as they are NOT
+        # empty. Therefore we write a .bat file with a comment in it.
+        ctx.actions.write(
+            output = test_bin,
+            content = "@REM dummy",
+            is_executable = True,
+        )
     else:
         test_bin = ctx.actions.declare_file(ctx.label.name + ".sh")
         ctx.actions.write(