harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Harmony Wiki] Update of "HUT" by AlexeiZakharov
Date Tue, 13 May 2008 17:38:11 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Harmony Wiki" for change notification.

The following page has been changed by AlexeiZakharov:

The comment on the change is:
Brief description on how to run classlib tests

New page:
[wiki:Self:DRLVMTestTracking Back to Test Tracking]

=== Summary ===

  * [#Status Mission and Status][[BR]]
  * [#Run How to configure and run Harmony Unit Tests][[BR]]
  * [#Results Results][[BR]]

=== Mission and Status ===

Harmony Unit Tests (aka HUT) are one of Harmony's core test suites.
HUTs consist of unit tests for classes from all classlib modules and include API tests, implementation-specific
tests and regression
tests. API tests normally reside in ''<module root>/src/test/api'' folder, implementation-specific
in ''<module root>/src/test/impl''. Regression tests
are usually marked with comments that contain numbers of corresponding JIRA issues.[[BR]]
HUTs can be effectively used for regression testing.
All Harmony committers and contributors are strongly encouraged to run
these tests before creating patches or committing changes to Harmony repository.  

[#Summary Back to Summary]

=== How to configure and run Harmony Unit Tests ===

Make sure that PATH environment variable contains JDK 1.5 (use RI) and Apache
Ant (v1.6.5 or later), and that JAVA_HOME and ANT_HOME are properly set up.
If you use proxy server, specify proxy settings by setting ANT_OPTS environment variable:

Windows: {{{
    set ANT_OPTS="-Dhttp.proxyHost=<proxy host> -Dhttp.proxyPort=<proxy port>"
Linux: {{{
    export ANT_OPTS="-Dhttp.proxyHost=<proxy host> -Dhttp.proxyPort=<proxy port>"

Before running the tests you may need to download required dependencies and build classlib
itself. This can be achieved by doing the following: {{{
    cd <classlib trunk>
    ant fetch-depends

Let's assume you have compiled JRE you want to run the tests on at <JRE home>. 
The following command will run all non-excluded unit tests: {{{
    ant -Dtest.jre.home=<JRE home> test

NOTE: exclude lists for Harmony Unit Tests are plain text files that reside in ''<module
root>/make'' directory and contain names of java files with excluded tests. Excluded tests
won't be included into the test run under normal conditions.

To run tests from the selected classlib module only (i.e. beans, luni and etc.) you should
type: {{{
    ant -Dtest.jre.home=<JRE home> -Dbuild.module=<module> test

You may also specify a pattern for the test class name to run. Please see the examples below.
    # run IntrospectorExceptionTest
    ant -Dtest.jre.home=<JRE home> -Dbuild.module=beans -Dtest.case=org.apache.harmony.beans.tests.java.beans.IntrospectionExceptionTest
    # another form to run IntrospectorExceptionTest
    ant -Dtest.jre.home=<JRE home> -Dbuild.module=beans -Dtest.case=org/apache/harmony/beans/tests/java/beans/IntrospectionExceptionTest.java
    # run all tests those names start with Introspect 
    ant -Dtest.jre.home=<JRE home> -Dbuild.module=beans -Dtest.case=org/apache/harmony/beans/tests/java/beans/Introspect*.java

Pay attention to fact that if you specify a pattern then processing of exclude lists is not
performed. Thus the following command will run all BEANS tests regardless the exclude lists
(please be careful since this may crash the VM): {{{
    ant -Dtest.jre.home=<JRE home> -Dbuild.module=beans -Dtest.case=**/*.java test

You may also pass some parameters like JIT modes and heap size to JRE under test by utilizing
''hy.test.vmargs'' system property. For example: {{{
    # this defines the value for prop1 system property and runs DRLVM in interpreter mode
    ant -Dtest.jre.home=<JRE home> -Dhy.test.vmargs="-Dprop1=data1 -Xint" test

[#Summary Back to Summary]

==== Results ====

Test reports can be found at ''<classlib trunk>/build/test_report'' .

[#Summary Back to Summary]


[wiki:Self:DRLVMTestTracking Back to Test Tracking]

View raw message