summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/util/SocketServer.scala
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-01-17 11:46:10 -0800
committerJames Iry <jamesiry@gmail.com>2013-01-22 12:27:12 -0800
commit1dab5bf91361b8d6073db05ba1dff1bc01a83220 (patch)
treeea048566662a8a572cad5f49da171dc902a2913e /src/compiler/scala/tools/util/SocketServer.scala
parente12a5b88acd80a41574d51c88a7776f99c3d2580 (diff)
downloadscala-1dab5bf91361b8d6073db05ba1dff1bc01a83220.tar.gz
scala-1dab5bf91361b8d6073db05ba1dff1bc01a83220.tar.bz2
scala-1dab5bf91361b8d6073db05ba1dff1bc01a83220.zip
SI-6987 Tests fsc verbose output
This commit includes a test of fsc's verbose output. In order for it to work, CompileServer's main method had to be modified to remove a sys exit 0 at the end. It was redundant and made testing a bit harder. In order to prevent a race condition between server and client start up, this commit also adds a server callback that decrements a CountDownLatch that the main testing thread waits for. Finally, the server had to be modified to use Console.withErr and Console.withOut instead of mutating the global System.err and System.out variables. Otherwise the test would be unreliable.
Diffstat (limited to 'src/compiler/scala/tools/util/SocketServer.scala')
-rw-r--r--src/compiler/scala/tools/util/SocketServer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/util/SocketServer.scala b/src/compiler/scala/tools/util/SocketServer.scala
index 21775a01d1..1b06ce2ff2 100644
--- a/src/compiler/scala/tools/util/SocketServer.scala
+++ b/src/compiler/scala/tools/util/SocketServer.scala
@@ -17,7 +17,7 @@ trait CompileOutputCommon {
def info(msg: String) = if (verbose) echo(msg)
def echo(msg: String) = {Console println msg; Console.flush}
- def warn(msg: String) = System.err println msg
+ def warn(msg: String) = {Console.err println msg; Console.flush}
def fatal(msg: String) = { warn(msg) ; sys.exit(1) }
}