提交 407d5415 编写于 作者: K kohsuke

base directory needs to be set manually

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12455 71c3de6d-444a-0410-be80-ed276b4c234a
上级 07de704d
...@@ -223,6 +223,13 @@ public abstract class HudsonTestCase extends TestCase { ...@@ -223,6 +223,13 @@ public abstract class HudsonTestCase extends TestCase {
return new LocalLauncher(new StreamTaskListener(System.out)); return new LocalLauncher(new StreamTaskListener(System.out));
} }
/**
* Allocates a new temporary directory for the duration of this test.
*/
protected File createTmpDir() throws IOException {
return TestEnvironment.get().temporaryDirectoryAllocator.allocate();
}
/** /**
* Returns the last item in the list. * Returns the last item in the list.
*/ */
......
...@@ -43,7 +43,9 @@ public class JNLPLauncherTest extends HudsonTestCase { ...@@ -43,7 +43,9 @@ public class JNLPLauncherTest extends HudsonTestCase {
ArgumentListBuilder args = new ArgumentListBuilder(); ArgumentListBuilder args = new ArgumentListBuilder();
args.add("java","-jar"); args.add("java","-jar");
args.add(Which.jarFile(netx.jnlp.runtime.JNLPRuntime.class).getAbsolutePath()); args.add(Which.jarFile(netx.jnlp.runtime.JNLPRuntime.class).getAbsolutePath());
args.add("-headless","-nosecurity","-jnlp", getJnlpLink(c)); args.add("-headless","-basedir");
args.add(createTmpDir());
args.add("-nosecurity","-jnlp", getJnlpLink(c));
return args; return args;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册