harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject [classlib][build] exclude list impl issues
Date Thu, 18 Jan 2007 13:12:04 GMT
Vladimir,

As you have already mentioned your new solution does not simplify
things a lot. If we choose to use macros then I suggest to have more
fun and use something like the following (it reduces the amount of
copy-pasting):

in modules/archive/build.xml:
---
    <property name="archive.common.exclude.file"
location="./make/exclude.common" />
    <property name="archive.platform.exclude.file"
location="./make/exclude.${hy.platform}.${hy.test.vm.name}" />
    <property name="archive.interm.exclude.file"
location="./make/exclude.${hy.platform}.${hy.test.vm.name}.interm"/>

    <property name="archive.final.exclude.list"
location="${hy.hdk}/build/archive.exclude" />
...
    <target name="prepare-exclude">
        <prepare-exclude-list moduleName="archive"
                commonExcludes="${archive.common.exclude.file}"
                platformExcludes="${archive.platform.exclude.file}"
                intermExcludes="${archive.interm.exclude.file}"
                result="${archive.final.exclude.list}"/>
    </target>


in make/properties.xml:
---
    <macrodef name="prepare-exclude-list">
        <attribute name="moduleName"/>
        <attribute name="commonExcludes"/>
        <attribute name="platformExcludes"/>
        <attribute name="intermExcludes"/>
        <attribute name="result"/>
        <sequential>
            <condition property="@{moduleName}.fname1"
                       value="@{commonExcludes}">
                <and>
                    <available file="@{commonExcludes}"/>
                    <length file="@{commonExcludes}" when="greater" length="0"/>
                </and>
            </condition>
            <property name="@{moduleName}.fname1" value=""/>

            <condition property="@{moduleName}.fname2"
                       value="@{platformExcludes}">
                <and>
                    <available file="@{platformExcludes}"/>
                    <length file="@{platformExcludes}" when="greater"
length="0"/>
                </and>
            </condition>
            <property name="@{moduleName}.fname2" value=""/>

            <condition property="@{moduleName}.fname3"
                       value="@{intermExcludes}">
                <and>
                    <available file="@{intermExcludes}"/>
                    <length file="@{intermExcludes}" when="greater" length="0"/>
                </and>
            </condition>
            <property name="@{moduleName}.fname3" value=""/>

            <tempfile property="tmpfile" destdir="${hy.hdk}/build"/>
            <echo message="" file="${tmpfile}"/>
            <concat destfile="@{result}" force="yes">
                <filelist dir="/"
                    files="${@{moduleName}.fname1},
${@{moduleName}.fname2}, ${@{moduleName}.fname3}, ${tmpfile}"/>
            </concat>
        </sequential>
    </macrodef>


With Best Regards,

2007/1/18, Vladimir Ivanov (JIRA) <jira@apache.org>:
>
>     [ https://issues.apache.org/jira/browse/HARMONY-2970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465649
]
>
> Vladimir Ivanov commented on HARMONY-2970:
> ------------------------------------------
>
> Checks for the exclude files were added (as macro) to the archive2.patch.
> Actually we need 3 conditional tasks while the classlib build is not use the ant.contrib
library (with this lib it can be done in one macro task). So, this macro does not reduce the
number of internal tasks.
>
>
> > [classlib][build] add support of common parts for exclude lists
> > ---------------------------------------------------------------
> >
> >                 Key: HARMONY-2970
> >                 URL: https://issues.apache.org/jira/browse/HARMONY-2970
> >             Project: Harmony
> >          Issue Type: Improvement
> >          Components: Classlib
> >            Reporter: Vladimir Ivanov
> >         Assigned To: Alexei Zakharov
> >            Priority: Minor
> >         Attachments: acc_awt.patch, arch.build.patch, arch.build.patch, archive2.patch,
beans_misc.patch, l_manage.patch, nio_print.patch, regex_x.patch
> >
> >
> > According to the discussion on the dev@ list exclude lists should consists from
3 parts:
> > 1) common part
> > 2) platform specific part
> > 3) platform intermittent failures (to exclude tests from these lists only after
successful iterative run).
> > I implement it for archive module. If it is OK, I add similar code to other modules.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira


-- 
Alexei Zakharov,
Intel ESSD

Mime
View raw message