Harmony
  1. Harmony
  2. HARMONY-984

[testing] collect module test directories to test jars

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0M11
    • Component/s: build - test - ci
    • Labels:
      None

      Description

      To run tests against HDK by simple users Harmony need to collect all tests in one archive.
      As the first step the modules/bin/tests directories should be archived to the one tests.jar.

      1. accessibility.build.patch
        3 kB
        Vladimir Ivanov
      2. awt_auth.patch
        11 kB
        Vladimir Ivanov
      3. awt_auth1.patch
        11 kB
        Vladimir Ivanov
      4. beans.build.patch
        4 kB
        Vladimir Ivanov
      5. build-test.xml.patch
        13 kB
        Vladimir Ivanov
      6. security.patch
        8 kB
        Vladimir Ivanov
      7. security.updated.patch
        10 kB
        Vladimir Ivanov
      8. security.updated1.patch
        10 kB
        Vladimir Ivanov

        Issue Links

          Activity

          Hide
          Vladimir Ivanov added a comment -

          patch

          Show
          Vladimir Ivanov added a comment - patch
          Hide
          Vladimir Ivanov added a comment -

          According to discussion on the dev-list it should be separated jars (up to 4) for each module.
          Could somebody review and integrate changes for accessibility module?
          If it is OK I prepare the similar updates for each module.

          Show
          Vladimir Ivanov added a comment - According to discussion on the dev-list it should be separated jars (up to 4) for each module. Could somebody review and integrate changes for accessibility module? If it is OK I prepare the similar updates for each module.
          Hide
          Mark Hindess added a comment -

          Thanks Vladimir.

          I've applied the accessibility patch in r453122. Please confirm it is okay.

          Assuming you are planning to carry on with this process, if not let me know and I'll add it to my todo list, my preference would be to do one of the difficult modules next - one with four jars. Then it should be fairly easy to apply the "pattern" to the remaining modules. After that we should think about MANIFEST files but that can wait until we've got all modules working this way.

          Show
          Mark Hindess added a comment - Thanks Vladimir. I've applied the accessibility patch in r453122. Please confirm it is okay. Assuming you are planning to carry on with this process, if not let me know and I'll add it to my todo list, my preference would be to do one of the difficult modules next - one with four jars. Then it should be fairly easy to apply the "pattern" to the remaining modules. After that we should think about MANIFEST files but that can wait until we've got all modules working this way.
          Hide
          Vladimir Ivanov added a comment -

          Patch is OK. I'm going to prepare similar patches for all modules. The next module will be 'security'.

          Show
          Vladimir Ivanov added a comment - Patch is OK. I'm going to prepare similar patches for all modules. The next module will be 'security'.
          Hide
          Vladimir Ivanov added a comment -

          tests are placed in 4 archives, resources are copied to the HDK dir while many tests refers to resources as a file on the disk (key storage, serialization data etc) and not for all of them data can be stored in the archive.
          If it is OK - I'll prepare patches for other modules.

          Show
          Vladimir Ivanov added a comment - tests are placed in 4 archives, resources are copied to the HDK dir while many tests refers to resources as a file on the disk (key storage, serialization data etc) and not for all of them data can be stored in the archive. If it is OK - I'll prepare patches for other modules.
          Hide
          Vladimir Ivanov added a comment -

          updated patch. The old one is obsolete due to fix of patterns.

          Show
          Vladimir Ivanov added a comment - updated patch. The old one is obsolete due to fix of patterns.
          Hide
          Mark Hindess added a comment -

          Vladimir,

          A few questions about the updated patch. The line:

          <property name="tests-HDK-dir" value="$

          {hy.jdk}/build/test" />

          should probably be ${hy.hdk} not ${hy.jdk}

          ?

          Also, previously most of the variables in the security build.xml used dots to separate the words in their names. Your patch introduces variables with both underscores and dashes. Is this intentional? (You've also introduced uppercase letters though I'm less confused about that.)

          Show
          Mark Hindess added a comment - Vladimir, A few questions about the updated patch. The line: <property name="tests-HDK-dir" value="$ {hy.jdk}/build/test" /> should probably be ${hy.hdk} not ${hy.jdk} ? Also, previously most of the variables in the security build.xml used dots to separate the words in their names. Your patch introduces variables with both underscores and dashes. Is this intentional? (You've also introduced uppercase letters though I'm less confused about that.)
          Hide
          Vladimir Ivanov added a comment -

          variable '$

          {hy.jdk}

          ' were defined early I just use it. But agreed, 'hdk' is more preferable here.
          I'll prepare the patch with dot-separated names and with small letters in some minutes.

          Show
          Vladimir Ivanov added a comment - variable '$ {hy.jdk} ' were defined early I just use it. But agreed, 'hdk' is more preferable here. I'll prepare the patch with dot-separated names and with small letters in some minutes.
          Hide
          Vladimir Ivanov added a comment -

          patch with dot-separated names.
          If it is OK I will use it as pattern for other modules

          Show
          Vladimir Ivanov added a comment - patch with dot-separated names. If it is OK I will use it as pattern for other modules
          Hide
          Vladimir Ivanov added a comment -

          patch for awt+auth+archive+accessibility modules.
          Note, awt+auth jared to impl_in arhives while have tests in the o.a.h package.

          Show
          Vladimir Ivanov added a comment - patch for awt+auth+archive+accessibility modules. Note, awt+auth jared to impl_in arhives while have tests in the o.a.h package.
          Hide
          Vladimir Ivanov added a comment -

          patch for awt+auth+archive+accessibility modules.
          (the last one is outdated)

          Mark, could your remove accessibility.build.patch (applied), awt_auth.patch (outdated)
          build-test.xml.patch (outdated), security.patch (outdated), security.updated.patch (outdated) files?

          Show
          Vladimir Ivanov added a comment - patch for awt+auth+archive+accessibility modules. (the last one is outdated) Mark, could your remove accessibility.build.patch (applied), awt_auth.patch (outdated) build-test.xml.patch (outdated), security.patch (outdated), security.updated.patch (outdated) files?
          Hide
          Mark Hindess added a comment -

          Thanks Vladimir.

          I've applied the security patch in r462825.

          I wonder if it might be tidier to put the resources in a jar as well? What do you think?

          (I prefer to leave all attachments - the manage attachments view makes it clear which is the latest version so it's not too confusing.)

          Show
          Mark Hindess added a comment - Thanks Vladimir. I've applied the security patch in r462825. I wonder if it might be tidier to put the resources in a jar as well? What do you think? (I prefer to leave all attachments - the manage attachments view makes it clear which is the latest version so it's not too confusing.)
          Hide
          Vladimir Ivanov added a comment -

          When I ran tests with security-resource.jar I saw about 30 tests failures. The first half was due to missed key-storage for some security algorithm the second one due to missed serialization data files. Access to serialization data may be easily fixed, but I don't know good solution to fix access problem for 'special' files. I considered two options here:

          • the test extract needed files from the archive through the some library function to the temporary location and then use it;
          • the resource files stored to separated directory in the HDK without compression.

          At present time the second option was selected just because it is:

          • easy to implement;
          • tests are still simple and more reliable.
          Show
          Vladimir Ivanov added a comment - When I ran tests with security-resource.jar I saw about 30 tests failures. The first half was due to missed key-storage for some security algorithm the second one due to missed serialization data files. Access to serialization data may be easily fixed, but I don't know good solution to fix access problem for 'special' files. I considered two options here: the test extract needed files from the archive through the some library function to the temporary location and then use it; the resource files stored to separated directory in the HDK without compression. At present time the second option was selected just because it is: easy to implement; tests are still simple and more reliable.
          Hide
          Vladimir Ivanov added a comment -

          beans patch

          Show
          Vladimir Ivanov added a comment - beans patch
          Hide
          Mark Hindess added a comment -

          Over the last few days , I've completed this work. I'm sure there will be a few issues and certainly there are test failures when the full test run is executed with just the hdk. Hopefully we can fix up any issues in the next few days.

          Show
          Mark Hindess added a comment - Over the last few days , I've completed this work. I'm sure there will be a few issues and certainly there are test failures when the full test run is executed with just the hdk. Hopefully we can fix up any issues in the next few days.

            People

            • Assignee:
              Mark Hindess
              Reporter:
              Vladimir Ivanov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development