Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Configure an Ruby Interpreter for unit tests


All interpreter configuration management are done through ScriptRuntime
class. It has getInterpreterInstall* methods, that returns appropriate
interpreter installs. So, before they return IInterpreterInstall,
ScriptRuntime performs initialization (see
ScriptRuntime.initializeInterpreters() method). Except other stuff, this
method loads saved interpreter settings from
ScriptRuntime.PREF_INTERPRETER_XML key (launching plugin preferences).
If nothing are stored there, than interpreterConfiguration.xml from
launching plugin metadata are picked as settings. For reading and
writing XML presented preferences InterpreterDefinitionsContainer class
are used.

So, there are two ways to setup interpreter for unit-tests:
1. Create InterpreterDefinitionsContainer, store one IInterpreterInstall
inside, get xml and store it inside appropriate preference key.
2. Fetch xml as above but store it inside interpreterConfiguration.xml file.

I've not tested it in practice, but I see no problems with these
methods. Please say, if something doesn't work.

Mikhail Kalugin

Andrey Platov ?????:

Please help Mark (reposting

How can I configure a Ruby Interpreter when running unit tests. I'm extending AbstractModelTests and creating a new runtime workspace, copying a project from my test/workspace into the runtime workspace. All that works fine, any paths set up in the project are fine, but the interpreters are defined in the workspace so they don't show up for the unit test.

Thanks Mark

dltk-dev mailing list

Back to the top