[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Question ad creating a testcase that needs a jar on class- or module path
From:       Kevin Rushforth <kevin.rushforth () oracle ! com>
Date:       2020-01-31 15:38:35
Message-ID: 40571aa5-a667-d279-c410-ecb4648a9629 () oracle ! com
[Download RAW message or body]

And if you need a modular jar, you might look at ModuleLauncherTest instead.

-- Kevin


On 1/31/2020 7:35 AM, Kevin Rushforth wrote:
> Take a look at the JarLauncherTest in the tests/system dir. There is 
> some (ugly) build logic in build.gradle to support it.
>
> -- Kevin
>
> On 1/31/2020 7:28 AM, Rony G. Flatscher wrote:
>> How would one go about creating a testcase that needs a jar-file 
>> either on the class- or module path?
>>
>> Are there any test units that would demonstrate how to do it? If not, 
>> what approach would you
>> suggest (and if so, are there any samples already somewhere to study)?
>>
>> ---
>>
>> Background: for creating a testcase using a pseudo script engine 
>> ("RgfPseudoScriptEngine") that logs
>> its invocations with the script context Bindings for each invocation 
>> and which then will be analyzed
>> and used for the test assertions, there is a need to have the pseudo 
>> script engine made available
>> via the Java scripting framework.
>>
>> There is a jar-file (that includes the sources as well) with the 
>> necessary definitions:
>>
>>    * via class path: 
>> "META-INF/services/javax.script.ScriptEngineFactory" entry:
>>
>>      rgf.scriptEngine.RgfPseudoScriptEngineFactory
>>
>>    * via module path which will use the information in 
>> "module-info.java":
>>
>>      module rgf.scriptEngine {
>>          requires java.scripting;
>>          provides javax.script.ScriptEngineFactory with 
>> rgf.scriptEngine.RgfPseudoScriptEngineFactory;
>>          exports rgf.scriptEngine;
>>      }
>>
>> TIA,
>>
>> ---rony
>>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic