From c2a7e52626b52b87b62563f40c204efac7a9b20b Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Sat, 10 May 2008 00:57:22 +0000 Subject: [PATCH] Updated the testslib target to use Main compiler, added the actual test client code, implemented the target to run the thane test client, tweaked the tester options to run thane and go nice and slow (one operation every 3 seconds and only one instance) git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5074 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- tests/build.xml | 46 +++++++++++-------- tests/src/as/Lib.as | 1 + .../bureau/client/TestClientMain.as | 27 ++++++----- 3 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 tests/src/as/Lib.as diff --git a/tests/build.xml b/tests/build.xml index dd8d33a07..d78e53bd5 100644 --- a/tests/build.xml +++ b/tests/build.xml @@ -103,11 +103,11 @@ - + - + @@ -119,12 +119,11 @@ - - - - + + @@ -230,13 +229,6 @@ - - - - - @@ -249,13 +241,14 @@ description="Run the bureau test server and tests the registry."> - - - + + + - - + + + @@ -271,4 +264,21 @@ + + + + + + + + + + + + + + + + diff --git a/tests/src/as/Lib.as b/tests/src/as/Lib.as new file mode 100644 index 000000000..99ec14ac0 --- /dev/null +++ b/tests/src/as/Lib.as @@ -0,0 +1 @@ +package {} diff --git a/tests/src/as/com/threerings/bureau/client/TestClientMain.as b/tests/src/as/com/threerings/bureau/client/TestClientMain.as index eb41b36da..c2cdeb422 100644 --- a/tests/src/as/com/threerings/bureau/client/TestClientMain.as +++ b/tests/src/as/com/threerings/bureau/client/TestClientMain.as @@ -8,21 +8,26 @@ */ import avmplus.System; +import com.threerings.bureau.client.TestClient; -for (var i :int = 0; i < System.argv.length; ++i) { - trace("Argv[" + i + "] = " + System.argv[i]); +if (System.argv.length != 4) { + trace("Expected 4 arguments: (token) (bureauId) (server) (port)"); } -/* +var token :String = System.argv[0]; +var bureauId :String = System.argv[1]; +var server :String = System.argv[2]; +var port :int = parseInt(System.argv[3]); + +trace("Token: " + token); +trace("BureauId: " + bureauId); +trace("Server: " + server); +trace("Port: " + port); + // create the client and log on -var client :TestClient = new TestClient( - System.getProperty("token"), - System.getProperty("bureauId")); -client.setServer( - System.getProperty("serverName"), - new int[] {Integer.parseInt(System.getProperty("serverPort"))}); +var client :TestClient = new TestClient(token, bureauId); +client.setServer(server, [port]); client.logon(); // run it -client.run(); -*/ +//client.run();