<Swing Dev> <AWT Dev> [8] Review request for CR 7145406 - [macosx] Migrate Apple tests from macosx-port to 7u
Konstantin Shefov
konstantin.shefov at oracle.com
Mon Mar 11 20:45:14 UTC 2013
Phil,
12.03.2013 0:22, Phil Race wrote:
> On 3/11/2013 1:07 PM, Konstantin Shefov wrote:
>> All these tests compile and run under all OSs, not MacOS only.
>
> I find that very difficult to believe.
>
> \re\jdk\8\promoted\latest\binaries\windows-i586\bin\javac APIPresent.java
> APIPresent.java:31: error: package com.apple.eio does not exist
> import com.apple.eio.FileManager;
>
Yes, there are actually 6 tests with com.apple.* packages, but the total
number is about 150, I can send you a pass log on windows and linux later.
>> There are a lot of awt and swing tests that depend on
>> test.java.awt.regtesthelpers, they are in the openjdk repo.
>
> This is true although that is news to me, I presume this is guaranteed to
> be compiled automatically when you compile the main test.
>
No main test exists, JTREG tags like "@library DIRECTORY_PATH" "@build
CLASS_NAME" make this test.java.awt.regtesthelpers stuff to compile for
every single test.
>> Almost none of regression tests are ever run without JTREG.
>
> That's not true. I've been running and writing reg. tests for 12 years
> and I use jtreg less than 0.01% of the time .. as in I can't remember
> last time I needed to use it. That's the biggest plus we have here.
> You don't *need* a big horrible useless harness that obscures
> the real test. I object strongly to junit dependencies in any of the
> tests.
SQE teams run automated tests using JTREG rather often (if not always).
Even manual tests are run with JTREG.
So do you suggest to remove junit from all these tests? All these tests
depend on junit.
-Konstantin
>
> -phil.
>
>>
>> Konstantin
>>
>> 11.03.2013 23:53, Phil Race wrote:
>>> Konstantin,
>>>
>>> First I am puzzled by the decision to send this to AWT and Swing lists.
>>> There are a couple of Swing tests and a large number of AWT tests
>>> but it seems to be also a very large number of 2D/graphics tests PLUS
>>> a large scattering in other areas such as
>>> - hotspot/managment
>>> - jndi
>>> - java.io
>>> - java.nio
>>> - threading
>>> - reflection
>>> - networking.
>>>
>>> Next, I am surprised to see jtreg tests that depend on junit.
>>>
>>> I just searched our entire regression test suite (including ones that
>>> are still closed for various reasons) and I didn't find *any* client
>>> area
>>> tests that have this dependency.
>>>
>>> All I found are a few core java reflection tests.
>>> Nor should these tests depend on the harness in "package test.java.awt"
>>>
>>> So they should all be standalone tests that can be run without any
>>> harness.
>>>
>>> On top of that I seriously doubt that these all even *compile* on
>>> anything
>>> besides OS X, and may not pass elsewhere either
>>>
>>> cf : 31 import com.apple.eio.FileManager;
>>> As it is none of this appears appropriate to put into the test
>>> directory.
>>>
>>> So this
>>> 1) First needs to be rid of harness dependencies
>>> 2) Needs to be made to compile on all platforms or invoked by a script
>>> which builds only on OS X
>>> 3) All tests that build on all platforms must pass on all platforms
>>> 4) The review needs to be send to all affected lists - which is
>>> pretty much all of them!
>>> awt, 2d, swing, hotspot, core-libs .. maybe more
>>>
>>> -phil.
>>>
>>>
>>>
>>> On 3/11/2013 2:03 AM, Konstantin Shefov wrote:
>>>> Please, review the fix.
>>>>
>>>> On 06-Mar-13 15:14, Konstantin Shefov wrote:
>>>>> http://cr.openjdk.java.net/~kshefov/7145406/webrev.02/
>>>>>
>>>>> Changed tags to @run junit
>>>>>
>>>>> On 04-Mar-13 14:44, Sergey Bylokhov wrote:
>>>>>> A few options exists:
>>>>>> 1 Changes tag to @run junit + jtreg 4.1
>>>>>> 2 Remove usage of junit from these tests.
>>>>>>
>>>>>> 01.03.2013 14:26, Alexander Scherbatiy пишет:
>>>>>>> On 3/1/2013 1:29 PM, Konstantin Shefov wrote:
>>>>>>>>
>>>>>>>> On 01-Mar-13 13:24, Sergey Bylokhov wrote:
>>>>>>>>> 01.03.2013 12:24, Konstantin Shefov wrote:
>>>>>>>>>> I have already ran those tests on Windows before sending this
>>>>>>>>>> request, all is OK 95% pass.
>>>>>>>>>>
>>>>>>>>>> I should also note that we (STT regression team) use JTREG
>>>>>>>>>> 3.2 for testing with option
>>>>>>>>>> -cpa:$JEMMY_PATH/jemmy.jar,$JUNIT_PATH/junit.jar
>>>>>>>>> As far as I understand, jtreg 3 doesn't contain junit.jar.
>>>>>>>> There is no junit.jar in JTREG 3, but it could be taken elsewhere.
>>>>>>>> But if it is standard to use @run junit tag, we will replace
>>>>>>>> jtreg we use to version 4.1.
>>>>>>>
>>>>>>> The jtreg 3 does not have fix for the issue "7113599 jtreg
>>>>>>> should handle GNOME_DESKTOP_SESSION_ID" which affects some L&F
>>>>>>> Swing tests on Unix systems.
>>>>>>>
>>>>>>> I would suggest to use the JTreg 4.1. The standard is to use
>>>>>>> the @run junit tag for the JTReg 4.1 (in other case the junit
>>>>>>> lib is not put to the test JDK classpath).
>>>>>>> The junit.jar has been removed from the JTReg 4.1 lib
>>>>>>> directory because of the licensing reasons:
>>>>>>> https://blogs.oracle.com/jjg/entry/jtreg_update1
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Alexandr.
>>>>>>>
>>>>>>>>>> JTREG 3.2 is more stable than 4.1. We do not use JTREG 4.1.
>>>>>>>>>> So I suggest NOT to replace @run main to @run juint, and,
>>>>>>>>>> istead of that add jtreg option -cpa:$JUNIT_PATH/junit.jar
>>>>>>>>>>
>>>>>>>>>> On 28-Feb-13 18:35, Sergey Bylokhov wrote:
>>>>>>>>>>> Hi, Konstantin.
>>>>>>>>>>> I think yes. Please try to run these tests on windows as
>>>>>>>>>>> well. At least they should be compiled.
>>>>>>>>>>>
>>>>>>>>>>> 28.02.2013 17:55, Konstantin Shefov wrote:
>>>>>>>>>>>> I used JTREG 4.1 fcs b03, not b05. Indeed, if one uses b05,
>>>>>>>>>>>> one gets compilation errors. So should I replace @run main
>>>>>>>>>>>> to @run juint in all 150 tests?
>>>>>>>>>>>>
>>>>>>>>>>>> On 28-Feb-13 17:46, Konstantin Shefov wrote:
>>>>>>>>>>>>> Strange, but I used JTReg 4.1 b05 also and I had no
>>>>>>>>>>>>> compilation errors. JUnit is automatically added in the
>>>>>>>>>>>>> latest JTREG 4.1.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 28-Feb-13 17:02, Alexander Scherbatiy wrote:
>>>>>>>>>>>>>> On 2/27/2013 5:45 PM, Konstantin Shefov wrote:
>>>>>>>>>>>>>>> I replaced Thread.sleep() with toolkit.realSync() and
>>>>>>>>>>>>>>> made swing mwthod to run on EDT.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> New webrev:
>>>>>>>>>>>>>>> http://cr.openjdk.java.net/~kshefov/7145406/webrev.01
>>>>>>>>>>>>>>>> test/javax/swing/JComponent/DoublePaint/TestDoublePaint.java
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - Is it possible to run the test with jtreg or
>>>>>>>>>>>>>>>> JUnit is necessary for the test invocation?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I run the test and got the compilation error:
>>>>>>>>>>>>>> TestDoublePaint.java:34: error: package junit.framework
>>>>>>>>>>>>>> does not exist.
>>>>>>>>>>>>>> It seems it is because the '@run main
>>>>>>>>>>>>>> TestDoublePaint' jtreg task does not put the junit jar to
>>>>>>>>>>>>>> the test jdk class path.
>>>>>>>>>>>>>> The '@run junit TestDoublePaint' task passes the
>>>>>>>>>>>>>> test. (I use the JTReg 4.1 b05 from
>>>>>>>>>>>>>> http://download.java.net/openjdk/jtreg/)
>>>>>>>>>>>>>> It is also interesting is it necessary to have the
>>>>>>>>>>>>>> main method for the junit task?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> Alexandr.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> - line: 68 Thread.sleep(2000); // 2 seconds should
>>>>>>>>>>>>>>>> be plenty enough to catch 2 repaints
>>>>>>>>>>>>>>>> Is it possible to use the toolkit.realSync()
>>>>>>>>>>>>>>>> method here?
>>>>>>>>>>>>>>>> - Swing classes should be created and used on the EDT.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>> Alexandr.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>>> Konstantin
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
More information about the swing-dev
mailing list