8005582: java/lang/Runtime/exec/WinCommand.java intermittent test failures
Summary: Remove file-deletion code at cleanup which conflicts with jtreg cleanup
Reviewed-by: chegar
--- a/jdk/test/java/lang/Runtime/exec/WinCommand.java Thu Jan 10 10:21:44 2013 -0800
+++ b/jdk/test/java/lang/Runtime/exec/WinCommand.java Thu Jan 10 15:09:45 2013 -0500
@@ -135,24 +135,19 @@
// Win9x systems don't have a cmd.exe
if (new File(systemDirW, "cmd.exe").exists()) {
- try {
- out.println("Running cmd.exe tests...");
- writeFile("cdcmd.cmd", "@echo off\r\nCD\r\n");
- writeFile("cdbat.bat", "@echo off\r\nCD\r\n");
- checkCD("cmd",
- "cmd.exe",
- systemDirW + "\\cmd.exe",
- // Only the ".exe" extension can be omitted
- systemDirW + "\\cmd",
- systemDirM + "/cmd.exe",
- systemDirM + "/cmd",
- "/" + systemDirM + "/cmd",
- "cdcmd.cmd", "./cdcmd.cmd", ".\\cdcmd.cmd",
- "cdbat.bat", "./cdbat.bat", ".\\cdbat.bat");
- } finally {
- new File("cdcmd.cmd").delete();
- new File("cdbat.bat").delete();
- }
+ out.println("Running cmd.exe tests...");
+ writeFile("cdcmd.cmd", "@echo off\r\nCD\r\n");
+ writeFile("cdbat.bat", "@echo off\r\nCD\r\n");
+ checkCD("cmd",
+ "cmd.exe",
+ systemDirW + "\\cmd.exe",
+ // Only the ".exe" extension can be omitted
+ systemDirW + "\\cmd",
+ systemDirM + "/cmd.exe",
+ systemDirM + "/cmd",
+ "/" + systemDirM + "/cmd",
+ "cdcmd.cmd", "./cdcmd.cmd", ".\\cdcmd.cmd",
+ "cdbat.bat", "./cdbat.bat", ".\\cdbat.bat");
}
// 16-bit apps like command.com must have a console;