You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Peter Firmstone (JIRA)" <ji...@apache.org> on 2009/09/27 03:33:16 UTC

[jira] Commented: (RIVER-319) Change River Build Dist structure to support jtreg test automation

    [ https://issues.apache.org/jira/browse/RIVER-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759972#action_12759972 ] 

Peter Firmstone commented on RIVER-319:
---------------------------------------

If I can restructure the Apache River build to package these jar's in another directory to avoid moving them into the jre/lib/ext directory without getting mixed up with the other River (jini) libraries, the whole jtreg test process can be run from an ant target, which would simplify running jtreg tests for new developers.

The (primary) difficulty is getting the security policies to grant AllPermission to those JARs (but not all code, in particular not to the test code) without that location being hard-coded.  Security policy files support system property expansion, so perhaps the location could be specified with a system property supplied to jtreg (along with a class path as you had been doing before), although this property might also need to be explicitly propagated to child processes of the tests, like for the tests that start phoenix (rmid).

I'm not sure if there are any other assumptions made by those tests that those JAR files are in the extensions directory, or more to the point, that their classes are defined by the extensions class loader instead of the system class loader-- the only case I can think of is if the dynamic security policy provider is set via a system property.  I doubt that there are much if anything issues like that, though-- easiest to discover by trying.

I was thinking something like the following directory structure for apache-river:

configentry             - unchanged
doc                          - unchanged
lib                             - platform libraries removed (jsk-lib.jar, jsk-platform.jar, jsk-resources.jar)
lib-dl                         - unchanged
lib-ext                       - unchanged contains jsk-policy.jar
lib-platform              - new directory containing all platform libraries except for jsk-dl.jar, this directory can be the basis for AllPermission
integration-tests-bin   - quality assurance integration tests binary release, currently called qa

Then change this in the policy files:

grant codeBase "file:${java.home}/lib/ext/*" {
   permission java.security.AllPermission;
};

To (only where required):

grant codeBase "file:${jsk.home}/lib-platform/*"{
   permission java.security.AllPermission:
};

grant codeBase "file:${jsk.home}/lib-ext/*"{
   permission java.security.AllPermission:
};

grant codeBase "file:${jsk.home}/lib/phoenix-init.jar"{
   permission java.security.AllPermission:
};

Then pass jsk.home in via jtreg eg:

$jtreg -verbose:all,nopass  -jdk /usr/jdk/jdk1.5.0_15 -Djsk.home="/opt/src/river/trunk" ./qa/jtreg/
Later when I get to ant script stage, jsk.home can be set using ant from an environment variable $JSK_HOME 

> Change River Build Dist structure to support jtreg test automation
> ------------------------------------------------------------------
>
>                 Key: RIVER-319
>                 URL: https://issues.apache.org/jira/browse/RIVER-319
>             Project: River
>          Issue Type: Sub-task
>            Reporter: Peter Firmstone
>


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