summaryrefslogtreecommitdiff
path: root/js/test
diff options
context:
space:
mode:
Diffstat (limited to 'js/test')
-rw-r--r--js/test/Common/Controller.ice10
-rw-r--r--js/test/Common/TestRunner.js19
2 files changed, 21 insertions, 8 deletions
diff --git a/js/test/Common/Controller.ice b/js/test/Common/Controller.ice
index 0508b4826da..7e4c2b95eda 100644
--- a/js/test/Common/Controller.ice
+++ b/js/test/Common/Controller.ice
@@ -13,10 +13,15 @@ module Test
module Common
{
+exception ServerFailedException
+{
+ string reason;
+};
+
interface Server
{
void waitTestSuccess();
- void waitForServer();
+ void waitForServer() throws ServerFailedException;
void terminate();
};
@@ -24,8 +29,7 @@ sequence<string> StringSeq;
interface Controller
{
- Server* runServer(string lang, string name, string protocol, string host, bool winrt,
- StringSeq options);
+ Server* runServer(string lang, string name, string protocol, string host, bool winrt, StringSeq options);
};
};
diff --git a/js/test/Common/TestRunner.js b/js/test/Common/TestRunner.js
index 75a960644ed..a1f51d19440 100644
--- a/js/test/Common/TestRunner.js
+++ b/js/test/Common/TestRunner.js
@@ -21,7 +21,7 @@ function isSafari()
function isWorker()
{
- return typeof(WorkerGlobalScope) !== 'undefined' && this instanceof WorkerGlobalScope;
+ return typeof(WorkerGlobalScope) !== 'undefined' && this instanceof WorkerGlobalScope;
}
function runTest(name, language, defaultHost, protocol, configurations, out)
@@ -86,7 +86,8 @@ function runTest(name, language, defaultHost, protocol, configurations, out)
var initData = id.clone();
if(configuration.args !== undefined)
{
- initData.properties = Ice.createProperties(configuration.args, id.properties);
+ initData.properties =
+ Ice.createProperties(configuration.args, id.properties);
}
return __test__(out, initData);
});
@@ -154,10 +155,18 @@ function runTest(name, language, defaultHost, protocol, configurations, out)
{
out.writeLine("exception occurred in call to " + r.operation);
}
- out.writeLine(ex.toString());
- if(ex.stack)
+ if(ex instanceof Test.Common.ServerFailedException)
{
- out.writeLine(ex.stack);
+ out.writeLine("Server failed to start:\n");
+ out.writeLine(ex.reason);
+ }
+ else
+ {
+ out.writeLine(ex.toString());
+ if(ex.stack)
+ {
+ out.writeLine(ex.stack);
+ }
}
return false;
});