From 2307dedd17d10a7a32cd4180dc4b36f86a26dcc1 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Fri, 19 Apr 2013 16:41:33 +0200 Subject: testing server allowed from makefile * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) added stamps/netx-dist.stamp stamps/plugin.stamp dependence (stamps/test-extensions-compile.stamp) added stamps/netx-dist.stamp stamps/plugin.stamp dependence (stamps/compile-reproducers-testcases.stamp) added stamps/plugin.stamp dependence (run-test-server-on-44321) new target, starts server in deploy dir, on port 44321 (run-test-server-on-random-port) new target, starts server in deploy dir, on random port * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: (main) added better access to random port --- tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java index 6804faa..55ec17a 100644 --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java @@ -138,8 +138,10 @@ public class ServerAccess { System.exit(0); } else { int port = 44321; - if (args.length > 0) { - port=new Integer(args[0]); + if (args.length > 0 && args[0].equalsIgnoreCase("randomport")) { + port = findFreePort(); + } else if (args.length > 0) { + port = new Integer(args[0]); } getIndependentInstance(port); while (true) { -- cgit v1.2.3