Commits

Anonymous committed 2a59b1f

Added newer sbcl launcher to tests.

Comments (0)

Files changed (1)

src/org/lispdev/swank/SwankInterfaceTest.java

     super(null,null,null);
   }
 
+  private static SwankInterface startSBCL1Swank()
+  {
+    SwankInterface res = null;
+    try
+    {
+      ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
+      ILaunchConfigurationType cfgType =
+        manager.getLaunchConfigurationType(BaseLocalLispLaunchDelegate.ID);
+      ILaunchConfiguration cfg = cfgType.newInstance(null, "swank");
+      ILaunchConfigurationWorkingCopy wc = cfg.getWorkingCopy();
+      wc.setAttribute(BaseLocalLispLaunchDelegate.ATTR_EXE,
+          "D:\\projects\\lisp\\sbcl1.0.40-threads-1\\sbcl.exe");
+      wc.setAttribute(BaseLocalLispLaunchDelegate.ATTR_SWANK,
+          "D:\\projects\\lisp\\slime-2010-07-16\\");
+      wc.setAttribute(BaseLocalLispLaunchDelegate.ATTR_ENV,
+          new HashMap<String,String>()
+          {private static final long serialVersionUID = 1L;
+          {put("SBCL_HOME","D:\\projects\\lisp\\sbcl1.0.40-threads-1\\");}});
+      wc.setAttribute(BaseLocalLispLaunchDelegate.ATTR_EXT,
+          "D:\\projects\\lispdev\\ws\\org.lispdev.swank\\");
+      wc.setAttribute(BaseLocalLispLaunchDelegate.ATTR_PORT, 4005);
+      cfg = wc.doSave();
+      ILaunch launch = cfg.launch(ILaunchManager.PROFILE_MODE, null, false);
+      cfg.delete();
+      if( launch.getProcesses() != null && launch.getProcesses().length > 0
+          && launch.getProcesses()[0] instanceof LispProcess )
+      {
+        LispProcess lp = (LispProcess)launch.getProcesses()[0];
+        res = (SwankInterface)lp.getSwank();
+      }
+    }
+    catch ( CoreException e )
+    {
+      e.printStackTrace();
+    }
+    return res;
+  }
+
+
   private static SwankInterface startSBCLSwank()
   {
     SwankInterface res = null;