# HG changeset patch # User jgish # Date 1365197439 14400 # Node ID 1332910c5c5b82a30254e8241b8658f53bed5b73 # Parent b702977e7212d2d8ed16c5f4e321a9f2e6227ffb 8006036: (process) cleanup code in java/lang/Runtime/exec/WinCommand.java Summary: put back delete of files on test test cleanup Reviewed-by: lancea diff --git a/test/java/lang/Runtime/exec/WinCommand.java b/test/java/lang/Runtime/exec/WinCommand.java --- a/test/java/lang/Runtime/exec/WinCommand.java +++ b/test/java/lang/Runtime/exec/WinCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -135,19 +135,24 @@ // Win9x systems don't have a cmd.exe if (new File(systemDirW, "cmd.exe").exists()) { - 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"); + 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(); + } } // 16-bit apps like command.com must have a console;