On Thu, 26 Nov 2020 16:04:40 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> This is a simple change to throw jtreg.SkippedException if no JavaScript 
>> engine is available to run the TestSearchScript test. In my previous attempt 
>> I tried to use the SkippedException class already present elsewhere in the 
>> test tree, not realizing I couuld just copy/create the exception in the 
>> javadoc test library.
>> 
>> Note that while the test is skipped correctly if no JS engine is available, 
>> the test will currently fail in the presence of a JS engine such as GraalJS. 
>> This is fixed by JDK-8244535.
>
>> @hns, why did you decide to duplicate that exception locally instead of 
>> using it as a dependency?
> 
> The exception class is available in test/lib but I couldn't make the test see 
> and use that class. I tried all combinations of paths (relative to the test 
> class, relative to the repository root, etc). I think it's the correct 
> solution to add the class to the lib folder of the javadoc tests. 
> 
> BTW jtreg doesn't provide this class, it is meant to be defined in test 
> library code as described here: 
> https://github.com/openjdk/jtreg/blob/master/src/share/doc/javatest/regtest/faq.md#what-if-a-test-does-not-apply-in-a-given-situation

I would have expected:

 * @library /test/lib

to do the trick.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1412

Reply via email to