You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Popov (JIRA)" <ji...@apache.org> on 2007/02/22 11:41:05 UTC

[jira] Created: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

[jdktools][build] update build scripts to enable building and running tests
---------------------------------------------------------------------------

                 Key: HARMONY-3226
                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
             Project: Harmony
          Issue Type: Improvement
          Components: JDK
         Environment: Windows, Linux
            Reporter: Ivan Popov


Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov closed HARMONY-3226.
-------------------------------


Thank you, it appeared working as expected. 
I'm closing this issue and will submit further improvements in separate issues.

> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Assigned To: Stepan Mishura
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476840 ] 

Ivan Popov commented on HARMONY-3226:
-------------------------------------

It appeared not easy to set a different timeout for a separate module, because default value for property hy.test.timeout is set in a common properties.xml which is loaded at the very beginning of the build execution.

Instead, I'm going to put a few long running tests into a separate <batchtest> target, this should solve the problem with timed out tests. I'll provide a separate patch after initial patch is applied.


> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Assigned To: Stepan Mishura
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477933 ] 

Stepan Mishura commented on HARMONY-3226:
-----------------------------------------

Ivan, some tests failed for me (on Linux) and they failed not because of timeout. Do you expect any failures(except timeout)?

For example,
Class org.apache.harmony.jpda.tests.jdwp.ClassType.InvokeMethod002Test:
Invalid fieldsCount=9, must be > 9

junit.framework.AssertionFailedError: Invalid fieldsCount=9, must be > 9 at org.apache.harmony.jpda.tests.jdwp.ClassType.InvokeMethod002Test.testInvokeMethod004(InvokeMethod002Test.java:190) at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)

Thanks,
Stepan.

> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Assigned To: Stepan Mishura
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stepan Mishura resolved HARMONY-3226.
-------------------------------------

    Resolution: Fixed

Ivan, I reread your comment and found that some tests should fail, sorry about confusion. I've applied the pacth to JDKTOOLS at r514591.

Please check that patch was applied as you expected.

> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Assigned To: Stepan Mishura
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475876 ] 

Ivan Popov commented on HARMONY-3226:
-------------------------------------

I've found out what is problem with hung JPDA test. Actually, test does not hang, but junit task kills the tests run because timeout exceeds.

The default timeout (15 minutes) is specified in junit task in option 'timeout'. According to junit spec, it should be used for individual tests:

  "timeout - Cancel the individual tests if they don't finish in the given time (measured in milliseconds). Ignored if fork is disabled."

However, it appeared that junit task uses it for canceling run of the whole tests set specified with <batchtest> element. Running of ~100 JPDA tests in one <batchtest> exceeds default 15 minutes and junit cancels them.

A simple solution here is to increase default timeout for JPDA tests to 20 minutes and I'm going to prepare a patch. 
The other alternative is to use several <batchtest> elements, each contains shorter number of tests and satisfies to default 15 minutes timeout. This improvement can be addressed in a separate JIRA.

> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Assigned To: Stepan Mishura
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-3226:
--------------------------------

    Patch Info: [Patch Available]

> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Ivan Popov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Popov updated HARMONY-3226:
--------------------------------

    Attachment: tests_support_in_build_scripts.patch

I'm attaching  patch for jdktools build scripts which enables building and running tests from jdktools modules.

This patch is based on the '004.run-test.patch' from HARMONY-2180. But I've also made some refactoring of the build scripts to enable per-module support for building binaries and running tests. I also removed some redundant items copy-pasted from classlib builds.

This patch uses property "hy.deploy" to point to the existing Harmony deploy binaries. By default it points to "working_vm/build/deploy" directory unless property "hy.hdk" is specified in ant command line. Before tests are started, jre directory from "hy.deploy" is copied to the local deploy/jdk directory and then tests are run against this local JRE. However, if property "test.jre.home" is specified in ant command line, then copying is not performed and tests are just started against specified JRE.

This enables running tests with default binaries (built with federated build), against existing HDK, or against any random JRE, for example, RI JRE.

I've tested modified scripts on both Windows and Linux and they appeared working well.
To check this run federated build, go to jdktools directory, and run "ant test" command. You may also specify particular module to run tests, for example, -Dbuild.module=jpda .

Several JPDA tests fail and one test hangs because of problems in JPDA implementation. Hung test produces empty output, so junitreport task prints error message:

[junitreport] [Fatal Error] :-1:-1: Premature end of file.

That's OK for the scripts, because this problem does not affects other tests results. Particular test failures will be considered in a separate issues.

This update does not provide support for exclude lists, it can be added later. 
However, one of javah tests is not compiled on Linux because it uses non-ascii symbols in source file. I hardcoded exclusion of this test in the build script and submitted separate HARMONY-3230. Now this does not prevent running other tests.


> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-3226) [jdktools][build] update build scripts to enable building and running tests

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stepan Mishura reassigned HARMONY-3226:
---------------------------------------

    Assignee: Stepan Mishura

> [jdktools][build] update build scripts to enable building and running tests
> ---------------------------------------------------------------------------
>
>                 Key: HARMONY-3226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3226
>             Project: Harmony
>          Issue Type: Improvement
>          Components: JDK
>         Environment: Windows, Linux
>            Reporter: Ivan Popov
>         Assigned To: Stepan Mishura
>         Attachments: tests_support_in_build_scripts.patch
>
>
> Build scripts of jdktools module needs update to enable building and running tests provided in jdktools modules (especially JPDA tests).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.