From 2d6ce2a10fd6e5627de586d616b8e7cb409d1417 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 12 Dec 2012 16:24:12 -0800 Subject: Removed src/detach. Prying one more stowaway off the side of the train. This isn't used, hasn't been used, and won't be used. --- test/files/detach-neg/det_bar.check | 4 - test/files/detach-neg/det_bar.scala | 13 -- test/files/detach-run/actor-run.check | 5 - test/files/detach-run/actor/Client.scala | 54 -------- test/files/detach-run/actor/Server.scala | 27 ---- test/files/detach-run/actor/ServerConsole.scala | 75 ----------- test/files/detach-run/actor/actor.flags | 1 - test/files/detach-run/actor/actor.scala | 157 ---------------------- test/files/detach-run/actor/java.policy | 25 ---- test/files/detach-run/basic-run.check | 5 - test/files/detach-run/basic/Client.scala | 48 ------- test/files/detach-run/basic/Server.scala | 22 --- test/files/detach-run/basic/ServerConsole.scala | 83 ------------ test/files/detach-run/basic/basic.flags | 1 - test/files/detach-run/basic/basic.scala | 169 ------------------------ test/files/detach-run/basic/java.policy | 26 ---- 16 files changed, 715 deletions(-) delete mode 100644 test/files/detach-neg/det_bar.check delete mode 100644 test/files/detach-neg/det_bar.scala delete mode 100644 test/files/detach-run/actor-run.check delete mode 100644 test/files/detach-run/actor/Client.scala delete mode 100644 test/files/detach-run/actor/Server.scala delete mode 100644 test/files/detach-run/actor/ServerConsole.scala delete mode 100644 test/files/detach-run/actor/actor.flags delete mode 100644 test/files/detach-run/actor/actor.scala delete mode 100644 test/files/detach-run/actor/java.policy delete mode 100644 test/files/detach-run/basic-run.check delete mode 100644 test/files/detach-run/basic/Client.scala delete mode 100644 test/files/detach-run/basic/Server.scala delete mode 100644 test/files/detach-run/basic/ServerConsole.scala delete mode 100644 test/files/detach-run/basic/basic.flags delete mode 100644 test/files/detach-run/basic/basic.scala delete mode 100644 test/files/detach-run/basic/java.policy (limited to 'test') diff --git a/test/files/detach-neg/det_bar.check b/test/files/detach-neg/det_bar.check deleted file mode 100644 index 70b47581a5..0000000000 --- a/test/files/detach-neg/det_bar.check +++ /dev/null @@ -1,4 +0,0 @@ -det_bar.scala:7: error: detach inapplicable for method bar - detach(bar) - ^ -one error found diff --git a/test/files/detach-neg/det_bar.scala b/test/files/detach-neg/det_bar.scala deleted file mode 100644 index 862afb1d6e..0000000000 --- a/test/files/detach-neg/det_bar.scala +++ /dev/null @@ -1,13 +0,0 @@ -import scala.remoting._ -class A(y: Int) { - var z = 2 - var bar = (x: Int) => x + y + z - def foo(x: Int): Int = x + y + z - bar = (x: Int) => x * y - detach(bar) -} - -object test extends App { - val a = new A(1) - println(a.bar(2)) -} diff --git a/test/files/detach-run/actor-run.check b/test/files/detach-run/actor-run.check deleted file mode 100644 index 9448ddd5fe..0000000000 --- a/test/files/detach-run/actor-run.check +++ /dev/null @@ -1,5 +0,0 @@ -Server.main 8889 -Client.main 127.0.0.1 8889 -yInstVal = 10 -zLocVal = 1000 -result received: 11111 diff --git a/test/files/detach-run/actor/Client.scala b/test/files/detach-run/actor/Client.scala deleted file mode 100644 index 12573e24d3..0000000000 --- a/test/files/detach-run/actor/Client.scala +++ /dev/null @@ -1,54 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -import scala.actors.Actor._, ClientHelper._ -import scala.actors.remote._, RemoteActor._ -import scala.remoting._, Debug._ - -object Foo { - def trace(msg: String) { info("[Foo.trace] "+msg)} -} -object Client { - val yInstVal: Int = 10 - var yInstVar: Int = 99 - object Bar { - def trace(msg: String) { info("[Bar.trace] "+msg) } - } - def main(args: Array[String]) { - init(args) - actor { - val server = select(Node(host, port), 'Server) - val zLocVal: Int = 1000 - var zLocVar: Int = 9998 - server ! detach( - (x: Int) => { - println("yInstVal = "+yInstVal) - this.trace("yInstVar = "+yInstVar) - Bar.trace("zLocVal = "+zLocVal) - Foo.trace("zLocVar = "+zLocVar) - zLocVar += 2 - System.out.println("zLocVal = "+zLocVal) - Debug.info("zLocVar = "+zLocVar) - x + yInstVal + yInstVar + zLocVal + zLocVar - }) - react { - case result: Int => - println("result received: " + result) - Predef.exit(0) - } - } - } - private def trace(msg: String) { info("[Client.trace] "+msg) } -} - -object ClientHelper { - private var _host = "127.0.0.1" - private var _port = 8888 - def host = _host - def port = _port - def init(args: Array[String]) { - try { _host = args(0) } catch { case _ => } - try { _port = args(1).toInt } catch { case _ => } - } -} diff --git a/test/files/detach-run/actor/Server.scala b/test/files/detach-run/actor/Server.scala deleted file mode 100644 index b56d22f744..0000000000 --- a/test/files/detach-run/actor/Server.scala +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -import scala.actors.Actor._ -import scala.actors.remote.RemoteActor._ - -object Server extends ServerConsole { - private def computation(f: Int => Int): Int = { - //some time-consuming task - f(2) - } - def main(args: Array[String]) { - actor { - classLoader = serverClassLoader - alive(args(0).toInt) - register('Server, self) - loopWhile(isRunning) { - react { - case f: (Int => Int) => - val result = computation(f) - sender ! result - } - } - } - } -} diff --git a/test/files/detach-run/actor/ServerConsole.scala b/test/files/detach-run/actor/ServerConsole.scala deleted file mode 100644 index 8ebd9d4c2e..0000000000 --- a/test/files/detach-run/actor/ServerConsole.scala +++ /dev/null @@ -1,75 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -import java.io.{BufferedReader, InputStreamReader} - -import scala.compat.Platform.currentTime -import scala.remoting.Debug, Debug._ - -trait ServerConsole extends Thread { - private val startTime = currentTime - actors.Debug.level = // e.g. 3 // info+warning+error - try { System.getProperty("scala.actors.logLevel", "0").toInt } - catch { case e => 0 } - - start() - - val serverClassLoader = { - import java.rmi.server.RMIClassLoader - val codebase = System.getProperty("java.rmi.server.codebase") - info("[ServerConsole] codebase="+codebase) - RMIClassLoader getClassLoader codebase - } - - private var isTerminated = false - - def terminate() { isTerminated = false } - - def isRunning = !isTerminated - - override def run() { - val in = new BufferedReader(new InputStreamReader(System.in)) - var quit = false - while (!quit) { - val args = getArgs(in) - if (args contains "quit") - quit = true - if (args contains "cls") { - println(ERASE_SCREEN) - println(CURSOR_HOME) - } - if (args contains "warning") - Debug.level = Level.WARNING - if (args contains "info") - Debug.level = Level.INFO - if (args contains "silent") - Debug.level = Level.SILENT - } - terminate() - println("Server exited ("+mkTimeString(currentTime - startTime)+")") - sys.exit(0) - } - - protected def trace(msg: String) { - Debug.info("[ServerConsole.trace] "+msg) - } - - private def getArgs(in: BufferedReader): List[String] = { - val input = try { in.readLine() } catch { case _ => null } - if (input != null) (input.trim split "\\s+").toList else Nil - } - - private def mkTimeString(time: Long): String = { - def twoDigits(i: Long) = (if (i < 10) "0" else "")+i - val sec = time / 1000 - val min = sec / 60 - val h = min / 60 - twoDigits(h) +":"+ - twoDigits(min - h * 60)+":"+ - twoDigits(sec - min * 60) - } - - private val ERASE_SCREEN = "\033[2J" - private val CURSOR_HOME = "\033[H" -} diff --git a/test/files/detach-run/actor/actor.flags b/test/files/detach-run/actor/actor.flags deleted file mode 100644 index 55eed8bbcd..0000000000 --- a/test/files/detach-run/actor/actor.flags +++ /dev/null @@ -1 +0,0 @@ --Xpluginsdir ../../../../build/pack/misc/scala-devel/plugins -Xplugin-require:detach -P:detach:enable diff --git a/test/files/detach-run/actor/actor.scala b/test/files/detach-run/actor/actor.scala deleted file mode 100644 index 23a10d6982..0000000000 --- a/test/files/detach-run/actor/actor.scala +++ /dev/null @@ -1,157 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -object Test { - - val name = "actor" - val host = "127.0.0.1" - val port = 8889 - - def main(args: Array[String]) { - setenv() - println("Server.main "+port) - Server.main(Array(port.toString)) - println("Client.main "+host+" "+port) - Client.main(Array(host, port.toString)) - Server.terminate() - } - - private def setenv() { - import Env._ - - // Java properties for server & client - System.setProperty("scala.actors.logLevel", actors_logLevel) - System.setProperty("scala.remoting.logLevel", logLevel) - System.setProperty("java.security.manager", "") - System.setProperty("java.security.policy", policyFile) - // Java properties for server only - System.setProperty("java.rmi.server.codebase", deployUrl) - System.setProperty("java.rmi.server.hostname", host) - System.setProperty("java.rmi.server.useCodebaseOnly", "true") - - // application-specific classes to be deployed and accessed via URL - // (i.e. detached closure, proxy interfaces and proxy stubs) - val classNames = List( - "$anonfun$main$1$proxy", - "$anonfun$main$1$proxyImpl_Stub", - "Bar$proxy", - "Bar$proxyImpl_Stub", - "Client$$anonfun$main$1$$anonfun$apply$1$detach", - "Client$proxy", - "Client$proxyImpl_Stub", - "Foo$proxy", - "Foo$proxyImpl_Stub") - - val proxyImplNames = - for (n <- classNames; i = n lastIndexOf "_Stub"; if i > 0) - yield n.substring(0, i) - - generatePolicyFile() - generateRmiStubs(proxyImplNames) - generateJarFile(classNames) - } -} - -object Env { - import java.io._, java.util.jar._ - - val actors_logLevel = "0" - // = "3" // info+warning+error - val logLevel = "silent" - // = "info" // debug user code only - // = "info,lib" // debug user & library code - - // we assume an Apache server is running locally for deployment - private val sep = File.separator - val docPath = System.getProperty("user.home")+sep+"public_html" - val docRoot = "http://127.0.0.1/~"+System.getProperty("user.name") - - private val policyTmpl = - System.getProperty("partest.cwd")+sep+Test.name+sep+"java.policy" - val outPath = System.getProperty("partest.output") - val libPath = System.getProperty("partest.lib") - val policyFile = outPath+sep+"java.policy" - val codebaseDir = outPath+sep+"-" - - assert((new File(docPath)).isDirectory, - "Root directory \""+docPath+"\" not found") - val deployJar = docPath+sep+Test.name+"_deploy.jar" - val deployUrl = docRoot+"/"+Test.name+"_deploy.jar" - - def generatePolicyFile() { - val in = new BufferedReader(new FileReader(policyTmpl)) - val out = new PrintWriter(new BufferedWriter(new FileWriter(policyFile))) - var line = in.readLine() - while (line != null) { - val line1 = line.replaceAll("@PROJECT_LIB_BASE@", codebaseDir) - out.println(line1) - line = in.readLine() - } - in.close() - out.close() - } - - def generateRmiStubs(classNames: List[String]) { - val options = List( - "-v1.2", - "-classpath "+libPath+File.pathSeparator+outPath, - "-d "+outPath) - rmic(options, classNames) - //ls(outPath) - } - - def generateJarFile(classNames: List[String]) { - val out = new JarOutputStream(new FileOutputStream(deployJar)) - classNames foreach (name => try { - val classFile = name+".class" - val in = new FileInputStream(outPath+sep+classFile) - out putNextEntry new JarEntry(classFile) - val buf = new Array[Byte](512) - var len = in read buf - while (len != -1) { - out.write(buf, 0, len) - len = in read buf - } - in.close() - } catch { - case e: FileNotFoundException => println(e) - }) - out.close() - } - - private def ls(path: String) { exec("ls -al "+path) } - - private def rmic(options: List[String], classNames: List[String]) { - val javaHome = scala.util.Properties.javaHome - val jdkHome = - if (javaHome endsWith "jre") javaHome.substring(0, javaHome.length-4) - else javaHome - val rmicExt = if (scala.util.Properties.isWin) ".exe" else "" - val rmicCmd = jdkHome+sep+"bin"+sep+"rmic"+rmicExt - val cmdLine = rmicCmd+options.mkString(" ", " ", "")+ - classNames.mkString(" "," ","") - // println(cmdLine) - exec(cmdLine) - } - - private def exec(command: String) { - val proc = Runtime.getRuntime exec command - proc.waitFor() - val out = new BufferedReader(new InputStreamReader(proc.getInputStream)) - var line = out.readLine() - while (line != null) { - println(line) - line = out.readLine() - } - out.close() - val err = new BufferedReader(new InputStreamReader(proc.getErrorStream)) - line = err.readLine() - while (line != null) { - println(line) - line = err.readLine() - } - err.close() - } -} - diff --git a/test/files/detach-run/actor/java.policy b/test/files/detach-run/actor/java.policy deleted file mode 100644 index b305f10b4c..0000000000 --- a/test/files/detach-run/actor/java.policy +++ /dev/null @@ -1,25 +0,0 @@ -// See http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html -// See http://mindprod.com/jgloss/policyfile.html -// The policy expands ${/} to the correct path or folder delimiter on your host platform. - -// Actions available with SocketPermission: accept, connect, listen, resolve -// 1) The "resolve" action is implied when any of the other actions are present. -// 2) The "listen" action is only meaningful when used with "localhost". - -grant { - permission java.net.SocketPermission "*:80", "connect,accept,listen"; - permission java.net.SocketPermission "*:1024-", "connect,accept,listen"; - permission java.util.PropertyPermission "scala.remoting.logLevel", "read"; - permission java.util.PropertyPermission "scala.remoting.port", "read"; -}; - -grant codeBase "@PROJECT_LIB_BASE@" { - permission java.lang.RuntimePermission "getClassLoader"; - permission java.util.PropertyPermission "java.rmi.server.codebase", "read"; - permission java.util.PropertyPermission "java.rmi.server.hostname", "read"; - permission java.util.PropertyPermission "sun.rmi.dgc.server.gcInterval", "read,write"; -}; - -//grant { -// permission java.security.AllPermission; -//}; diff --git a/test/files/detach-run/basic-run.check b/test/files/detach-run/basic-run.check deleted file mode 100644 index 6463d97497..0000000000 --- a/test/files/detach-run/basic-run.check +++ /dev/null @@ -1,5 +0,0 @@ -Server.main 8889 -> Client.main 127.0.0.1 8889 -yInstVal = 10 -zLocVal = 1000 -result received: 11111 diff --git a/test/files/detach-run/basic/Client.scala b/test/files/detach-run/basic/Client.scala deleted file mode 100644 index f8eddb041d..0000000000 --- a/test/files/detach-run/basic/Client.scala +++ /dev/null @@ -1,48 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -import java.net._, Thread._, ClientHelper._ -import scala.remoting._, Debug._ - -object Foo { - def trace(s: String) { info("[Foo.trace] "+s)} -} -object Client { - val yInstVal: Int = 10 - var yInstVar: Int = 99 - object Bar { - def trace(s: String) { info("[Bar.trace] "+s) } - } - def main(args: Array[String]) { - init(args) - val server = new Channel(host, port) - val zLocVal: Int = 1000 - var zLocVar: Int = 9998 - server ! detach( - (x: Int) => { - println("yInstVal = "+yInstVal) - this.trace("yInstVar = "+yInstVar) - Bar.trace("zLocVal = "+zLocVal) - Foo.trace("zLocVar = "+zLocVar) - zLocVar += 2 - System.out.println("zLocVal = "+zLocVal) - Debug.info("zLocVar = "+zLocVar) - x + yInstVal + yInstVar + zLocVal + zLocVar - }) - val result = server.receiveInt - println("result received: " + result) - } - private def trace(s: String) { info("[Client.trace] "+s) } -} - -object ClientHelper { - private var _host = "127.0.0.1" - private var _port = 8888 - def host = _host - def port = _port - def init(args: Array[String]) { - try { _host = args(0) } catch { case _ => } - try { _port = args(1).toInt } catch { case _ => } - } -} diff --git a/test/files/detach-run/basic/Server.scala b/test/files/detach-run/basic/Server.scala deleted file mode 100644 index f8aa02a4ba..0000000000 --- a/test/files/detach-run/basic/Server.scala +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -import scala.remoting.ServerChannel - -object Server extends ServerConsole { - private def computation(f: Int => Int): Int = { - //some time-consuming task - f(2) - } - def main(args: Array[String]) { - val server = new ServerChannel(args(0).toInt) - loop { - val client = server.accept - val f = client.receive[Int => Int] - val result = computation(f) - client ! result - } - server.close() - } -} diff --git a/test/files/detach-run/basic/ServerConsole.scala b/test/files/detach-run/basic/ServerConsole.scala deleted file mode 100644 index 65b81c0ca1..0000000000 --- a/test/files/detach-run/basic/ServerConsole.scala +++ /dev/null @@ -1,83 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -import java.io._ - -import scala.compat.Platform.currentTime -import scala.remoting.Debug, Debug._ - -trait ServerConsole extends Thread { - private val startTime = currentTime - - start() - - private var isTerminated = false - - def terminate() { isTerminated = true } - - protected def loop(block: => Unit) { - while (!isTerminated) { - try { - block - } - catch { - case e: ObjectStreamException => - trace("Object stream error ("+e.getMessage+")") - case e: EOFException => - trace("Connection lost") - case e: ClassNotFoundException => - trace("Class not found") - case e => - trace("Server error: "+e) - } - } - } - - override def run() { - val in = new BufferedReader(new InputStreamReader(System.in)) - var quit = false - while (!quit) { - val args = getArgs(in) - if (args contains "quit") - quit = true - if (args contains "cls") { - println(ERASE_SCREEN) - println(CURSOR_HOME) - } - if (args contains "warning") - Debug.level = Level.WARNING - if (args contains "info") - Debug.level = Level.INFO - if (args contains "silent") - Debug.level = Level.SILENT - } - terminate() - println("Server exited ("+mkTimeString(currentTime - startTime)+")") - exit(0) - - } - - protected def trace(msg: String) { - Debug.info("[ServerConsole.trace] "+msg) - } - - private def getArgs(in: BufferedReader): List[String] = { - print("> ") - val input = try { in.readLine() } catch { case _ => null } - if (input != null) (input.trim split "\\s+").toList else Nil - } - - private def mkTimeString(time: Long): String = { - def twoDigits(i: Long) = (if (i < 10) "0" else "")+i - val sec = time / 1000 - val min = sec / 60 - val h = min / 60 - twoDigits(h) +":"+ - twoDigits(min - h * 60)+":"+ - twoDigits(sec - min * 60) - } - - private val ERASE_SCREEN = "\033[2J" - private val CURSOR_HOME = "\033[H" -} diff --git a/test/files/detach-run/basic/basic.flags b/test/files/detach-run/basic/basic.flags deleted file mode 100644 index 55eed8bbcd..0000000000 --- a/test/files/detach-run/basic/basic.flags +++ /dev/null @@ -1 +0,0 @@ --Xpluginsdir ../../../../build/pack/misc/scala-devel/plugins -Xplugin-require:detach -P:detach:enable diff --git a/test/files/detach-run/basic/basic.scala b/test/files/detach-run/basic/basic.scala deleted file mode 100644 index 4d0fc2d933..0000000000 --- a/test/files/detach-run/basic/basic.scala +++ /dev/null @@ -1,169 +0,0 @@ -/* - * @author Stephane Micheloud - */ - -object Test { - - val name = "basic" - val host = "127.0.0.1" - val port = 8889 - - def main(args: Array[String]) { - setenv() - println("Server.main "+port) - server.start() - println("Client.main "+host+" "+port) - client.start() - server.terminate() - } - - private var server = new ServerThread(port) - private var client = new ClientThread(host, port) - - private class ServerThread(port: Int) extends Runnable { - private var th = new Thread(this) - def start() { th.start(); Thread.sleep(1000) } - def run() { Server.main(Array(port.toString)) } - def terminate() { Server.terminate(); sys.exit(0) } - } - - private class ClientThread(host: String, port: Int) extends Runnable { - private var th = new Thread(this) - def start() { th.start(); th.join() } - def run() { Client.main(Array(host, port.toString)) } - } - - private def setenv() { - import Env._ - - // Java properties for server & client - System.setProperty("scala.remoting.logLevel", logLevel) - System.setProperty("java.security.manager", "") - System.setProperty("java.security.policy", policyFile) - // Java properties for server only - System.setProperty("java.rmi.server.codebase", deployUrl) - System.setProperty("java.rmi.server.hostname", host) - System.setProperty("java.rmi.server.useCodebaseOnly", "true") - - // application-secific classes to be deployed and accessed via URL - // (i.e. detached closure, proxy interfaces and proxy stubs) - val classNames = List( - "Bar$proxy", - "Bar$proxyImpl_Stub", - "Client$$anonfun$main$1$detach", - "Client$proxy", - "Client$proxyImpl_Stub", - "Foo$proxy", - "Foo$proxyImpl_Stub") - - val proxyImplNames = - for (n <- classNames; i = n lastIndexOf "_Stub"; if i > 0) - yield n.substring(0, i) - - generatePolicyFile() - generateRmiStubs(proxyImplNames) - generateJarFile(classNames) - } -} - -object Env { - import java.io._, java.util.jar._ - - val actors_logLevel = "0" - // = "3" // info+warning+error - val logLevel = "silent" - // = "info" // debug user code only - // = "info,lib" // debug user & library code - - // we assume an Apache server is running locally for deployment - private val sep = File.separator - val docPath = System.getProperty("user.home")+sep+"public_html" - val docRoot = "http://127.0.0.1/~"+System.getProperty("user.name") - - private val policyTmpl = - System.getProperty("partest.cwd")+sep+Test.name+sep+"java.policy" - val outPath = System.getProperty("partest.output") - val libPath = System.getProperty("partest.lib") - val policyFile = outPath+sep+"java.policy" - val codebaseDir = outPath+sep+"-" - - assert((new File(docPath)).isDirectory, - "Root directory \""+docPath+"\" not found") - val deployJar = docPath+sep+Test.name+"_deploy.jar" - val deployUrl = docRoot+"/"+Test.name+"_deploy.jar" - - def generatePolicyFile() { - val in = new BufferedReader(new FileReader(policyTmpl)) - val out = new PrintWriter(new BufferedWriter(new FileWriter(policyFile))) - var line = in.readLine() - while (line != null) { - val line1 = line.replaceAll("@PROJECT_LIB_BASE@", codebaseDir) - out.println(line1) - line = in.readLine() - } - in.close() - out.close() - } - - def generateRmiStubs(classNames: List[String]) { - val options = List( - "-v1.2", - "-classpath "+libPath+File.pathSeparator+outPath, - "-d "+outPath) - rmic(options, classNames) - //ls(outPath) - } - - def generateJarFile(classNames: List[String]) { - val out = new JarOutputStream(new FileOutputStream(deployJar)) - classNames foreach (name => try { - val classFile = name+".class" - val in = new FileInputStream(outPath+sep+classFile) - out putNextEntry new JarEntry(classFile) - val buf = new Array[Byte](512) - var len = in read buf - while (len != -1) { - out.write(buf, 0, len) - len = in read buf - } - in.close() - } catch { - case e: FileNotFoundException => println(e) - }) - out.close() - } - - private def ls(path: String) { exec("ls -al "+path) } - - private def rmic(options: List[String], classNames: List[String]) { - val javaHome = scala.util.Properties.javaHome - val jdkHome = - if (javaHome endsWith "jre") javaHome.substring(0, javaHome.length-4) - else javaHome - val rmicExt = if (scala.util.Properties.isWin) ".exe" else "" - val rmicCmd = jdkHome+sep+"bin"+sep+"rmic"+rmicExt - val cmdLine = rmicCmd+options.mkString(" ", " ", "")+ - classNames.mkString(" "," ","") - // println(cmdLine) - exec(cmdLine) - } - - private def exec(command: String) { - val proc = Runtime.getRuntime exec command - proc.waitFor() - val out = new BufferedReader(new InputStreamReader(proc.getInputStream)) - var line = out.readLine() - while (line != null) { - println(line) - line = out.readLine() - } - out.close() - val err = new BufferedReader(new InputStreamReader(proc.getErrorStream)) - line = err.readLine() - while (line != null) { - println(line) - line = err.readLine() - } - err.close() - } -} diff --git a/test/files/detach-run/basic/java.policy b/test/files/detach-run/basic/java.policy deleted file mode 100644 index 92c1045c3d..0000000000 --- a/test/files/detach-run/basic/java.policy +++ /dev/null @@ -1,26 +0,0 @@ -// See http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html -// See http://mindprod.com/jgloss/policyfile.html -// The policy expands ${/} to the correct path or folder delimiter on your host platform. - -// Actions available with SocketPermission: accept, connect, listen, resolve -// 1) The "resolve" action is implied when any of the other actions are present. -// 2) The "listen" action is only meaningful when used with "localhost". - -grant { - permission java.net.SocketPermission "*:80", "connect,accept,listen"; - permission java.net.SocketPermission "*:1024-", "connect,accept,listen"; - permission java.util.PropertyPermission "scala.remoting.logLevel", "read"; - permission java.util.PropertyPermission "scala.remoting.port", "read"; -}; - -grant codeBase "@PROJECT_LIB_BASE@" { - permission java.lang.RuntimePermission "getClassLoader"; - permission java.lang.RuntimePermission "createClassLoader"; - permission java.util.PropertyPermission "java.rmi.server.codebase", "read"; - permission java.util.PropertyPermission "java.rmi.server.hostname", "read"; - permission java.util.PropertyPermission "sun.rmi.dgc.server.gcInterval", "read,write"; -}; - -//grant { -// permission java.security.AllPermission; -//}; -- cgit v1.2.3 From d5ee322b733f106dba91c045790ad33f3ce4f1bc Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 12 Dec 2012 16:25:56 -0800 Subject: Removed some dead tests. All attrition and no execution gives test a dull edge. --- test/attic/files/cli/test1/Main.check.j9vm5 | 4 -- test/attic/files/cli/test1/Main.check.java | 6 --- test/attic/files/cli/test1/Main.check.java5 | 6 --- test/attic/files/cli/test1/Main.check.java5_api | 19 -------- test/attic/files/cli/test1/Main.check.java5_j9 | 4 -- test/attic/files/cli/test1/Main.check.javac | 19 -------- test/attic/files/cli/test1/Main.check.javac5 | 24 ---------- test/attic/files/cli/test1/Main.check.javac6 | 29 ------------ test/attic/files/cli/test1/Main.check.jikes | 3 -- test/attic/files/cli/test1/Main.check.jikes5 | 3 -- test/attic/files/cli/test1/Main.check.scala | 24 ---------- test/attic/files/cli/test1/Main.check.scala_api | 33 ------------- test/attic/files/cli/test1/Main.check.scala_j9 | 15 ------ test/attic/files/cli/test1/Main.check.scalac | 61 ------------------------- test/attic/files/cli/test1/Main.check.scalaint | 45 ------------------ test/attic/files/cli/test1/Main.java | 8 ---- test/attic/files/cli/test1/Main.scala | 8 ---- test/attic/files/cli/test2/Main.check.j9vm5 | 4 -- test/attic/files/cli/test2/Main.check.java | 6 --- test/attic/files/cli/test2/Main.check.java5 | 6 --- test/attic/files/cli/test2/Main.check.java5_api | 24 ---------- test/attic/files/cli/test2/Main.check.java5_j9 | 36 --------------- test/attic/files/cli/test2/Main.check.javac | 27 ----------- test/attic/files/cli/test2/Main.check.javac5 | 28 ------------ test/attic/files/cli/test2/Main.check.javac6 | 33 ------------- test/attic/files/cli/test2/Main.check.jikes | 9 ---- test/attic/files/cli/test2/Main.check.jikes5 | 9 ---- test/attic/files/cli/test2/Main.check.scala | 24 ---------- test/attic/files/cli/test2/Main.check.scala_api | 37 --------------- test/attic/files/cli/test2/Main.check.scala_j9 | 15 ------ test/attic/files/cli/test2/Main.check.scalac | 61 ------------------------- test/attic/files/cli/test2/Main.check.scalaint | 45 ------------------ test/attic/files/cli/test2/Main.java | 8 ---- test/attic/files/cli/test2/Main.scala | 8 ---- test/attic/files/cli/test3/Main.check.j9vm5 | 5 -- test/attic/files/cli/test3/Main.check.java | 10 ---- test/attic/files/cli/test3/Main.check.java5 | 10 ---- test/attic/files/cli/test3/Main.check.java5_api | 29 ------------ test/attic/files/cli/test3/Main.check.java5_j9 | 36 --------------- test/attic/files/cli/test3/Main.check.javac | 33 ------------- test/attic/files/cli/test3/Main.check.javac5 | 31 ------------- test/attic/files/cli/test3/Main.check.javac6 | 36 --------------- test/attic/files/cli/test3/Main.check.jikes | 14 ------ test/attic/files/cli/test3/Main.check.jikes5 | 14 ------ test/attic/files/cli/test3/Main.check.scala | 28 ------------ test/attic/files/cli/test3/Main.check.scala_api | 41 ----------------- test/attic/files/cli/test3/Main.check.scala_j9 | 19 -------- test/attic/files/cli/test3/Main.check.scalac | 61 ------------------------- test/attic/files/cli/test3/Main.check.scalaint | 48 ------------------- test/attic/files/cli/test3/Main.java | 10 ---- test/attic/files/cli/test3/Main.scala | 10 ---- 51 files changed, 1126 deletions(-) delete mode 100644 test/attic/files/cli/test1/Main.check.j9vm5 delete mode 100644 test/attic/files/cli/test1/Main.check.java delete mode 100644 test/attic/files/cli/test1/Main.check.java5 delete mode 100644 test/attic/files/cli/test1/Main.check.java5_api delete mode 100644 test/attic/files/cli/test1/Main.check.java5_j9 delete mode 100644 test/attic/files/cli/test1/Main.check.javac delete mode 100644 test/attic/files/cli/test1/Main.check.javac5 delete mode 100644 test/attic/files/cli/test1/Main.check.javac6 delete mode 100644 test/attic/files/cli/test1/Main.check.jikes delete mode 100644 test/attic/files/cli/test1/Main.check.jikes5 delete mode 100644 test/attic/files/cli/test1/Main.check.scala delete mode 100644 test/attic/files/cli/test1/Main.check.scala_api delete mode 100644 test/attic/files/cli/test1/Main.check.scala_j9 delete mode 100644 test/attic/files/cli/test1/Main.check.scalac delete mode 100644 test/attic/files/cli/test1/Main.check.scalaint delete mode 100644 test/attic/files/cli/test1/Main.java delete mode 100644 test/attic/files/cli/test1/Main.scala delete mode 100644 test/attic/files/cli/test2/Main.check.j9vm5 delete mode 100644 test/attic/files/cli/test2/Main.check.java delete mode 100644 test/attic/files/cli/test2/Main.check.java5 delete mode 100644 test/attic/files/cli/test2/Main.check.java5_api delete mode 100644 test/attic/files/cli/test2/Main.check.java5_j9 delete mode 100644 test/attic/files/cli/test2/Main.check.javac delete mode 100644 test/attic/files/cli/test2/Main.check.javac5 delete mode 100644 test/attic/files/cli/test2/Main.check.javac6 delete mode 100644 test/attic/files/cli/test2/Main.check.jikes delete mode 100644 test/attic/files/cli/test2/Main.check.jikes5 delete mode 100644 test/attic/files/cli/test2/Main.check.scala delete mode 100644 test/attic/files/cli/test2/Main.check.scala_api delete mode 100644 test/attic/files/cli/test2/Main.check.scala_j9 delete mode 100644 test/attic/files/cli/test2/Main.check.scalac delete mode 100644 test/attic/files/cli/test2/Main.check.scalaint delete mode 100644 test/attic/files/cli/test2/Main.java delete mode 100644 test/attic/files/cli/test2/Main.scala delete mode 100644 test/attic/files/cli/test3/Main.check.j9vm5 delete mode 100644 test/attic/files/cli/test3/Main.check.java delete mode 100644 test/attic/files/cli/test3/Main.check.java5 delete mode 100644 test/attic/files/cli/test3/Main.check.java5_api delete mode 100644 test/attic/files/cli/test3/Main.check.java5_j9 delete mode 100644 test/attic/files/cli/test3/Main.check.javac delete mode 100644 test/attic/files/cli/test3/Main.check.javac5 delete mode 100644 test/attic/files/cli/test3/Main.check.javac6 delete mode 100644 test/attic/files/cli/test3/Main.check.jikes delete mode 100644 test/attic/files/cli/test3/Main.check.jikes5 delete mode 100644 test/attic/files/cli/test3/Main.check.scala delete mode 100644 test/attic/files/cli/test3/Main.check.scala_api delete mode 100644 test/attic/files/cli/test3/Main.check.scala_j9 delete mode 100644 test/attic/files/cli/test3/Main.check.scalac delete mode 100644 test/attic/files/cli/test3/Main.check.scalaint delete mode 100644 test/attic/files/cli/test3/Main.java delete mode 100644 test/attic/files/cli/test3/Main.scala (limited to 'test') diff --git a/test/attic/files/cli/test1/Main.check.j9vm5 b/test/attic/files/cli/test1/Main.check.j9vm5 deleted file mode 100644 index de454ef478..0000000000 --- a/test/attic/files/cli/test1/Main.check.j9vm5 +++ /dev/null @@ -1,4 +0,0 @@ -env: -cpp: No such file or directory -env: test1.Main: No such file or directory -env: -cp: No such file or directory -1: test 3 passed diff --git a/test/attic/files/cli/test1/Main.check.java b/test/attic/files/cli/test1/Main.check.java deleted file mode 100644 index 64410de98f..0000000000 --- a/test/attic/files/cli/test1/Main.check.java +++ /dev/null @@ -1,6 +0,0 @@ -Unrecognized option: -cpp -Could not create the Java virtual machine. -1: test 1 passed (1) -1: test 2 passed (1) -1: test 3 passed (1) -1: test 4 passed (2) diff --git a/test/attic/files/cli/test1/Main.check.java5 b/test/attic/files/cli/test1/Main.check.java5 deleted file mode 100644 index 64410de98f..0000000000 --- a/test/attic/files/cli/test1/Main.check.java5 +++ /dev/null @@ -1,6 +0,0 @@ -Unrecognized option: -cpp -Could not create the Java virtual machine. -1: test 1 passed (1) -1: test 2 passed (1) -1: test 3 passed (1) -1: test 4 passed (2) diff --git a/test/attic/files/cli/test1/Main.check.java5_api b/test/attic/files/cli/test1/Main.check.java5_api deleted file mode 100644 index 8693a5d92f..0000000000 --- a/test/attic/files/cli/test1/Main.check.java5_api +++ /dev/null @@ -1,19 +0,0 @@ -|-- allclasses-frame.html -|-- allclasses-noframe.html -|-- constant-values.html -|-- deprecated-list.html -|-- help-doc.html -|-- index-all.html -|-- index.html -|-- overview-tree.html -|-- package-list -|-- resources -| `-- inherit.gif -|-- stylesheet.css -`-- test1 - |-- Main.html - |-- package-frame.html - |-- package-summary.html - `-- package-tree.html - -2 directories, 15 files diff --git a/test/attic/files/cli/test1/Main.check.java5_j9 b/test/attic/files/cli/test1/Main.check.java5_j9 deleted file mode 100644 index de454ef478..0000000000 --- a/test/attic/files/cli/test1/Main.check.java5_j9 +++ /dev/null @@ -1,4 +0,0 @@ -env: -cpp: No such file or directory -env: test1.Main: No such file or directory -env: -cp: No such file or directory -1: test 3 passed diff --git a/test/attic/files/cli/test1/Main.check.javac b/test/attic/files/cli/test1/Main.check.javac deleted file mode 100644 index ba25d9b6ca..0000000000 --- a/test/attic/files/cli/test1/Main.check.javac +++ /dev/null @@ -1,19 +0,0 @@ -javac: invalid flag: -dd -Usage: javac -where possible options include: - -g Generate all debugging info - -g:none Generate no debugging info - -g:{lines,vars,source} Generate only some debugging info - -nowarn Generate no warnings - -verbose Output messages about what the compiler is doing - -deprecation Output source locations where deprecated APIs are used - -classpath Specify where to find user class files - -sourcepath Specify where to find input source files - -bootclasspath Override location of bootstrap class files - -extdirs Override location of installed extensions - -d Specify where to place generated class files - -encoding Specify character encoding used by source files - -source Provide source compatibility with specified release - -target Generate class files for specific VM version - -help Print a synopsis of standard options - diff --git a/test/attic/files/cli/test1/Main.check.javac5 b/test/attic/files/cli/test1/Main.check.javac5 deleted file mode 100644 index 0cb29d31ff..0000000000 --- a/test/attic/files/cli/test1/Main.check.javac5 +++ /dev/null @@ -1,24 +0,0 @@ -javac: invalid flag: -dd -Usage: javac -where possible options include: - -g Generate all debugging info - -g:none Generate no debugging info - -g:{lines,vars,source} Generate only some debugging info - -nowarn Generate no warnings - -verbose Output messages about what the compiler is doing - -deprecation Output source locations where deprecated APIs are used - -classpath Specify where to find user class files - -cp Specify where to find user class files - -sourcepath Specify where to find input source files - -bootclasspath Override location of bootstrap class files - -extdirs Override location of installed extensions - -endorseddirs Override location of endorsed standards path - -d Specify where to place generated class files - -encoding Specify character encoding used by source files - -source Provide source compatibility with specified release - -target Generate class files for specific VM version - -version Version information - -help Print a synopsis of standard options - -X Print a synopsis of nonstandard options - -J Pass directly to the runtime system - diff --git a/test/attic/files/cli/test1/Main.check.javac6 b/test/attic/files/cli/test1/Main.check.javac6 deleted file mode 100644 index 8f37a05bcb..0000000000 --- a/test/attic/files/cli/test1/Main.check.javac6 +++ /dev/null @@ -1,29 +0,0 @@ -javac: invalid flag: -dd -Usage: javac -where possible options include: - -g Generate all debugging info - -g:none Generate no debugging info - -g:{lines,vars,source} Generate only some debugging info - -nowarn Generate no warnings - -verbose Output messages about what the compiler is doing - -deprecation Output source locations where deprecated APIs are used - -classpath Specify where to find user class files and annotation processors - -cp Specify where to find user class files and annotation processors - -sourcepath Specify where to find input source files - -bootclasspath Override location of bootstrap class files - -extdirs Override location of installed extensions - -endorseddirs Override location of endorsed standards path - -proc:{none, only} Control whether annotation processing and/or compilation is done. - -processor Name of the annotation processor to run; bypasses default discovery process - -processorpath Specify where to find annotation processors - -d Specify where to place generated class files - -s Specify where to place generated source files - -encoding Specify character encoding used by source files - -source Provide source compatibility with specified release - -target Generate class files for specific VM version - -version Version information - -help Print a synopsis of standard options - -A[key[=value]] Options to pass to annotation processors - -X Print a synopsis of nonstandard options - -J Pass directly to the runtime system - diff --git a/test/attic/files/cli/test1/Main.check.jikes b/test/attic/files/cli/test1/Main.check.jikes deleted file mode 100644 index cd891689db..0000000000 --- a/test/attic/files/cli/test1/Main.check.jikes +++ /dev/null @@ -1,3 +0,0 @@ -Error: "-dd" is an invalid option. -use: jikes [options] [@files] file.java... -For more help, try -help or -version. diff --git a/test/attic/files/cli/test1/Main.check.jikes5 b/test/attic/files/cli/test1/Main.check.jikes5 deleted file mode 100644 index cd891689db..0000000000 --- a/test/attic/files/cli/test1/Main.check.jikes5 +++ /dev/null @@ -1,3 +0,0 @@ -Error: "-dd" is an invalid option. -use: jikes [options] [@files] file.java... -For more help, try -help or -version. diff --git a/test/attic/files/cli/test1/Main.check.scala b/test/attic/files/cli/test1/Main.check.scala deleted file mode 100644 index 43b200ae02..0000000000 --- a/test/attic/files/cli/test1/Main.check.scala +++ /dev/null @@ -1,24 +0,0 @@ -unknown option: '-cpp' -scala [