提交 f0abe5be 编写于 作者: M michaelm

8028060: test/java/net/URLPermission/nstest/lookup.sh failing (win)

Reviewed-by: alanb
上级 863e084d
......@@ -66,7 +66,7 @@ public class LookupTest {
String cmd = args[0];
if (cmd.equals("-getport")) {
port = Utils.getFreePort();
System.out.println(port);
System.out.print(port);
} else if (cmd.equals("-runtest")) {
port = Integer.parseInt(args[1]);
SimpleNameService.put("allowedAndFound.com", "127.0.0.1");
......
#!/bin/sh
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
......@@ -29,7 +28,19 @@
# LookupTest.java SimpleNameServiceDescriptor.java
# @run shell/timeout=50 lookup.sh
#
DIR=`pwd`
OS=`uname -s`
case ${OS} in
Windows_* | CYGWIN*)
PS=";"
FS="\\"
;;
*)
PS=":"
FS="/"
;;
esac
port=`${TESTJAVA}/bin/java -cp ${TESTCLASSES} LookupTest -getport`
......@@ -45,4 +56,4 @@ grant {
};
POLICY
${TESTJAVA}/bin/java -Djava.security.policy=file://${DIR}/policy -Dsun.net.spi.nameservice.provider.1=simple,sun -cp ${TESTCLASSES}:${TESTSRC} LookupTest -runtest $port
${TESTJAVA}/bin/java -Djava.security.policy=file:./policy -Dsun.net.spi.nameservice.provider.1=simple,sun -cp ${TESTCLASSES}${PS}${TESTSRC} LookupTest -runtest ${port}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册