|
From: David C. <dc...@us...> - 2005-09-05 16:44:32
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31762/src/org/rubypeople/rdt/testunit/launcher Modified Files: TestUnitRunnerConfiguration.java Log Message: Fixed how we find RemoteTestRunner.rb to use getOSString() Fixed getOSString so that we can find "plugin-ruby files" even when the current directory is NOT the Eclipse install directory (still a bit kludgy). Index: TestUnitRunnerConfiguration.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/testunit/launcher/TestUnitRunnerConfiguration.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestUnitRunnerConfiguration.java 5 Aug 2005 20:47:49 -0000 1.12 --- TestUnitRunnerConfiguration.java 5 Sep 2005 16:44:24 -0000 1.13 *************** *** 7,10 **** --- 7,11 ---- import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.ILaunchConfiguration; + import org.rubypeople.rdt.core.RubyCore; import org.rubypeople.rdt.internal.launching.InterpreterRunnerConfiguration; import org.rubypeople.rdt.internal.launching.RdtLaunchingPlugin; *************** *** 81,94 **** public static String getTestRunnerPath() { ! String location = TestunitPlugin.getDefault().getBundle().getLocation(); ! int prefixLength = location.indexOf('@'); ! if (prefixLength == -1) ! throw new RuntimeException("Location of launching bundle does not contain @: " + location); ! ! String pluginDir = location.substring(prefixLength + 1) + "ruby"; ! File pluginDirFile = new File(pluginDir); if (!pluginDirFile.exists()) ! throw new RuntimeException("Expected directory of RemoteTestRunner.rb does not exist: " + pluginDir); return pluginDirFile.getAbsolutePath() + File.separator + TestUnitLaunchShortcut.TEST_RUNNER_FILE; --- 82,90 ---- public static String getTestRunnerPath() { ! String directory = RubyCore.getOSDirectory(TestunitPlugin.getDefault()); ! File pluginDirFile = new File(directory, "ruby"); if (!pluginDirFile.exists()) ! throw new RuntimeException("Expected directory of RemoteTestRunner.rb does not exist: " + pluginDirFile.getAbsolutePath()); return pluginDirFile.getAbsolutePath() + File.separator + TestUnitLaunchShortcut.TEST_RUNNER_FILE; |