X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fbin%2FCommandLineOperations.java;h=59fc79d9ffd196e662ca7919e1011decd32c90f2;hb=2a8d711e20ae8777b73d0e44da8533cf7389ab06;hp=acc3444367f47217a90c69393cb6b02d731c8ee1;hpb=feab9576a4d6f5afe9265abc0b5f942b96d29b2f;p=jalview.git diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index acc3444..59fc79d 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -129,6 +129,8 @@ public class CommandLineOperations private static String modules = null; + private static String java_exe = null; + public synchronized static String getClassPath() { if (scanner == null) @@ -141,6 +143,9 @@ public class CommandLineOperations { modules.concat(mr.getName()); } + java_exe = System.getProperty("java.home") + File.separator + "bin" + + File.separator + "java"; + } while (classpath == null) { @@ -161,7 +166,8 @@ public class CommandLineOperations // Note: JAL-3065 - don't include quotes for lib/* because the arguments are // not expanded by the shell String classpath = getClassPath(); - String _cmd = "java " + (withAwt ? "-Djava.awt.headless=true" : "") + String _cmd = java_exe + " " + + (withAwt ? "-Djava.awt.headless=true" : "") + " -classpath " + classpath + (modules.length() > 2 ? "--add-modules=\"" + modules + "\"" : "") @@ -195,17 +201,21 @@ public class CommandLineOperations } return worker; } - @BeforeTest(alwaysRun=true) + + @Test(groups = { "Functional" }) public void reportCurrentWorkingDirectory() { - try { - Path currentRelativePath = Paths.get(""); - String s = currentRelativePath.toAbsolutePath().toString(); - System.out.println("Test CWD is "+s); - } catch (Exception q) { - q.printStackTrace(); - } + try + { + Path currentRelativePath = Paths.get(""); + String s = currentRelativePath.toAbsolutePath().toString(); + System.out.println("Test CWD is " + s); + } catch (Exception q) + { + q.printStackTrace(); + } } + @BeforeTest(alwaysRun = true) public void initialize() { @@ -243,7 +253,7 @@ public class CommandLineOperations { System.out.println(ln); successfulCMDs.add(ln); - if (++count > 5) + if (++count > 25) { break; }