Fix test on Windows (#19980)

* comment out broken tests

* fixed test for windows
This commit is contained in:
devhl-labs 2024-10-28 12:35:55 -04:00 committed by GitHub
parent 32fdd7c4d8
commit 891698784d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -740,14 +740,22 @@ public class DefaultCodegenTest {
Future<Boolean> call2 = executor.submit(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return codegen.executePostProcessor(new String[] { "echo Hello" });
String os = System.getProperty("os.name");
String postProcessor = os.contains("Windows")
? "cmd.exe /c echo hello"
: "echo Hello";
return codegen.executePostProcessor(new String[] { postProcessor });
}
});
Future<Boolean> call3 = executor.submit(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return codegen.executePostProcessor(new String[] { "echo", "Hello" });
String os = System.getProperty("os.name");
String[] postProcessor = os.contains("Windows")
? new String[] { "cmd.exe", "/c", "echo", "hello" }
: new String[] { "echo", "Hello" };
return codegen.executePostProcessor(postProcessor);
}
});