# HG changeset patch # User kelvzhu # Date 1284354679 -28800 # Node ID ac0bbc1e5d7930fb5a3099db97e3eb9efdbc6abb # Parent 0e65f93be3cb5a40714c9ca97f69ad3e64a7bbf3# Parent a4eca1f021ac447b718ca7e945166a200e147e91 Merge sysdeftools's addtion diff -r 0e65f93be3cb -r ac0bbc1e5d79 bintools/rcomp/group/RELEASE.TXT --- a/bintools/rcomp/group/RELEASE.TXT Mon Sep 06 09:57:24 2010 +0100 +++ b/bintools/rcomp/group/RELEASE.TXT Mon Sep 13 13:11:19 2010 +0800 @@ -1,3 +1,8 @@ +version 8.4.002 +=============== +Released by Marvin Shi, 10/08/2010 + 1) BUG2173 [RCOMP] - Linux : rcomp -o fails due to too long path + version 8.4.001 =============== Released by Lorence Wang, 26/04/2010 diff -r 0e65f93be3cb -r ac0bbc1e5d79 bintools/rcomp/inc/VERSION.H --- a/bintools/rcomp/inc/VERSION.H Mon Sep 06 09:57:24 2010 +0100 +++ b/bintools/rcomp/inc/VERSION.H Mon Sep 13 13:11:19 2010 +0800 @@ -18,6 +18,6 @@ const char version[]="8.4"; -const char build[]="001"; +const char build[]="002"; // end of version.h diff -r 0e65f93be3cb -r ac0bbc1e5d79 bintools/rcomp/src/main.cpp --- a/bintools/rcomp/src/main.cpp Mon Sep 06 09:57:24 2010 +0100 +++ b/bintools/rcomp/src/main.cpp Mon Sep 13 13:11:19 2010 +0800 @@ -576,9 +576,10 @@ MOFF; cout << uidcrcTool << " " << uidcrcUIDs[0] << " " << uidcrcUIDs[1] << " " << uidcrcUIDs[2] << " " << DataOutputFileName.GetAssertedNonEmptyBuffer(); cout << endl; MON; } - char uidcrc_params[512]; + int namelen = strlen(uidcrcTool) + strlen(uidcrcUIDs[0]) * 3 + DataOutputFileName.Length() + 10; + char *uidcrc_params = new char[namelen]; const int ret = snprintf(uidcrc_params, - sizeof(uidcrc_params), + namelen, "%s %s %s %s %s", uidcrcTool, uidcrcUIDs[0], @@ -596,6 +597,8 @@ cerr << "Failed to write UIDs to " << DataOutputFileName << endl; exit(error); } + delete[] uidcrc_params; + RCBinaryStream RSCStream; RSCStream.OpenForAppend(DataOutputFileName); if(! RSCStream.IsOpen()) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/build.xml --- a/buildframework/helium/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -1,329 +1,70 @@ - - - - - - - - - - - - - - + + + + + Helium targets to build helium itself. + + - A ${branch} property must be defined for the branch version, e.g. 0.9.x. - --> - - "branch" property not defined, e.g. 0.21.x - "version" property not defined, e.g. 0.21 - - - - - "reference_branch" property not defined, e.g. 0.21 - - - - - - - - -A svn branch will be made: -To: ${helium.svn.url}/helium/branches/helium-${branch} -Do you want to continue? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "branch" property not defined - "version" property not defined - - - - - - - -A svn tag will be made: -From: ${helium.svn.url}/helium/branches/helium-${branch} -To : ${helium.svn.url}/helium/tags/helium-${version} -Do you want to continue? - - - - - - - Creating release tag from ${helium.svn.url}/helium/branches/helium-${branch} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "milestone" property not defined (typically sprint name) - "release" property not defined - - - - - - - doc: xml(${helium.dir}/../release_notes_tickets_${milestone}.xml) - cfg: tdd(${helium.dir}/../release_notes_config.txt) - ant: antProperties(milestone, release) - - - - - doc: xml(${helium.dir}/../release_notes_tickets_${milestone}.xml) - cfg: tdd(${helium.dir}/../release_notes_config.txt) - ant: antProperties(milestone, release) - - - - - - - "milestone" property not defined (typically sprint name) - Story points per developer for ${milestone}: - - - - - - + + + - - - - - - - - - -== ${env.USERNAME} == - '''Done:''' ${done} - - '''Todo:''' ${todo} - - '''Blocking:''' ${blocking} - - - - - ${done} - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/bld --- a/buildframework/helium/builder/bld Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/bld Mon Sep 13 13:11:19 2010 +0800 @@ -16,22 +16,6 @@ # Description: # -# loading the system wide settings from ~/.bashrc -if [ -f ~/.bashrc ] ; then - . ~/.bashrc -fi -MODULE_VERSION="$(module --version 2>&1)" -if [ "$?" == "0" ] ; then - module load "java/1.6.0" - module load "tww/ant/1.7.0" - module load mercurial - module load tww/python/2.6.4 - module load "tww/p7zip/4.58" - module load ccm - module load tww/libxml - module load tww/libxslt -fi - export LANG="en_US.UTF-8" if [ ! $EPOCROOT ]; then @@ -40,30 +24,6 @@ BUILDER_HOME=$(cd ${0%/*} && pwd -P) -CWD=`pwd` - -if [ ! -e "$BUILDER_HOME/../sf/deps/amara/4Suite_XML/1.0.2/4Suite_XML-1.0.2.py2.6-unix.egg" ] ; then - cd $BUILDER_HOME/../sf/deps/amara/4Suite_XML/1.0.2 - tar xvfz 4Suite-XML-1.0.2.tar.gz > /dev/null - cd 4Suite-XML-1.0.2 - python setup.py bdist_egg > /dev/null - mv dist/*.egg ../4Suite_XML-1.0.2.py2.6-unix.egg -fi - -cd $CWD - -export PYTHONPATH=$BUILDER_HOME/python/lib/setuptools-0.6c11-py2.5.egg - -if [ ! -e "$BUILDER_HOME/../sf/deps/lxml/lxml/2.2.1/lxml-2.2.1.py2.6-unix.egg" ] ; then - cd $BUILDER_HOME/../sf/deps/lxml/lxml/2.2.1 - tar xvfz lxml-1.3.6.tgz > /dev/null - cd lxml-1.3.6 - python setup.py bdist_egg > /dev/null - mv dist/*.egg ../lxml-2.2.1.py2.6-unix.egg -fi - -cd $CWD - export JYTHONPATH=$BUILDER_HOME/antlibs/jython-2.5-py2.5.egg export USERNAME=$USER export PATH=$PATH:. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/build.xml --- a/buildframework/helium/builder/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -67,6 +67,8 @@ + + @@ -113,13 +115,27 @@ - Testing: @{file} - - - - + + + Start component test set: @{file} + + + + + End component test set: @{file} + + + + + + + + + + + @@ -146,27 +162,55 @@ Checking @{file} - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + @@ -190,31 +234,54 @@ + pattern="${source.root.dir}/external/antlibs2/[artifact]-[revision].[ext]" /> + + + - + pattern="${source.root.dir}/external/python/lib/auto/zipsafe/[artifact]-[revision].[ext]" /> + + + + + + + project: antProject() + ant: antProperties() - - - - + + + + + + + + + + + + project: antProject() + ant: antProperties() project: antProject() + ant: antProperties() @@ -300,8 +367,10 @@ - - + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/delivery.ant.xml --- a/buildframework/helium/builder/delivery.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/delivery.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -32,14 +32,32 @@ - + Deleting files before: ${before.date} - - + + - + + + + + + + + + + + + + + + + + + + @@ -55,6 +73,8 @@ + + try: if file.isDirectory(): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/java/config/java_checkstyle_config.xml --- a/buildframework/helium/builder/java/config/java_checkstyle_config.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/java/config/java_checkstyle_config.xml Mon Sep 13 13:11:19 2010 +0800 @@ -75,7 +75,6 @@ - @@ -105,7 +104,9 @@ - + + + @@ -113,7 +114,11 @@ - + + + + + @@ -125,11 +130,14 @@ - - --> + + + + + --> - + @@ -142,7 +150,7 @@ - + @@ -194,12 +202,8 @@ - - - - - - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/java/macros.ant.xml --- a/buildframework/helium/builder/java/macros.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/java/macros.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -40,12 +40,18 @@ - + + + + + - + + + @@ -191,6 +197,7 @@ + @@ -273,8 +280,9 @@ - - + + + @@ -329,7 +337,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/python/macros.ant.xml --- a/buildframework/helium/builder/python/macros.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/python/macros.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -30,11 +30,17 @@ + + + + - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/python/test-macros.ant.xml --- a/buildframework/helium/builder/python/test-macros.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/python/test-macros.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -28,11 +28,12 @@ - - - - - + + + + + + @@ -55,9 +56,10 @@ import sys import os import shutil + for p in project.getProperty('python.path').split(':'): - if 'amara' not in p: - sys.path.append(p) + sys.path.append(p) + os.chdir(project.getProperty('lib.dir')) if os.path.exists('build'): shutil.rmtree('build') @@ -68,9 +70,11 @@ result = True if ' ' in args: - result = nose.run(argv=['-v', testdir + 'tests']) + argv = ['-v', testdir + 'tests'] + result = nose.run(argv=argv) elif 'cpython' not in args: - result = nose.run(argv=['-v', args2]) + argv = ['-v', args2] + result = nose.run(argv=argv) print >> sys.stderr if not result: raise Exception('Jython unittest failure.') diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/template/configure_jython.bat.ftl --- a/buildframework/helium/builder/template/configure_jython.bat.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/template/configure_jython.bat.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -19,4 +19,10 @@ ============================================================================ --> -set ANT_OPTS=%ANT_OPTS% -Dpython.path=%HELIUM_HOME%\external\python\lib\2.5\jython-2.5-py2.5.egg;<#list project.getReference('egg.hlm.deps.fileset').toString().split(';') as file>%HELIUM_HOME%\${file};;%PYTHONPATH% + +<#list project.getReference('egg.hlm.deps.fileset').toString().split(ant['path.separator']) as file> +set JYTHONPATH=%JYTHONPATH%;%HELIUM_HOME%\${file?substring(ant['source.root.dir']?length + 1)?replace('/', '\\')}; + +set JYTHONPATH=%HELIUM_HOME%\external\python\lib\2.5\jython-2.5-py2.5.egg;%JYTHONPATH%;%PYTHONPATH% + +set ANT_OPTS=%ANT_OPTS% -Dpython.path="%JYTHONPATH%" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/template/configure_jython.sh.ftl --- a/buildframework/helium/builder/template/configure_jython.sh.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/template/configure_jython.sh.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -20,4 +20,4 @@ ============================================================================ --> #!/bin/sh -export HLM_EGG_JYTHONPATH=<#list project.getReference('egg.hlm.deps.fileset').toString().split(';') as file>${r'$'}HELIUM_HOME/${file}: +export HLM_EGG_JYTHONPATH=<#list project.getReference('egg.hlm.deps.fileset').toString().split(ant['path.separator']) as file>${r'$'}HELIUM_HOME/${file?substring(ant['source.root.dir']?length + 1)?replace('\\', '/')}: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/builder/template/easy-install.pth.ftl --- a/buildframework/helium/builder/template/easy-install.pth.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/builder/template/easy-install.pth.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,8 @@ ============================================================================ --> import sys; sys.__plen = len(sys.path) -<#list project.getReference('egg.deps.fileset').toString().split(';') as file> -./${file} +<#list project.getReference('egg.deps.fileset').toString()?split(ant['path.separator']) as file> +<#assign path = file?split("[\\\\/]", 'r')> +./${path[path?size-2]}/${path?last} import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/diamonds_config.xml.ftl --- a/buildframework/helium/config/diamonds_config.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <#if (ant?keys?seq_contains('validate.policy.log'))> - - - - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/diamonds_config_default.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/config/diamonds_config_default.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + + ant: antProperties() + doc: xml(${build.log.dir}/${build.id}_environment.xml) + + + + + + + + dbPath: ${metadata.dbfile} + ant: antProperties() + + + + + + + + dbPath: ${metadata.dbfile} + ant: antProperties() + + + + + + + + dbPath: ${metadata.dbfile} + ant: antProperties() + + + + + + + + ant: antProperties() + doc: xml(${ido.codescanner.output.dir}/problemIndex.xml) + + + + + + + + + + + + ant: antProperties() + doc: xml(${diamonds.coverity.report.file}) + + + + + + + + ant: antProperties() + doc: xml(${build.drive}/output/logs/post/${build.id}_validate_confml.xml) + + + + + + + + ant: antProperties() + doc: xml(${build.drive}/output/apidescr/apidescr.xml) + + + + + + + + ant: antProperties() + doc: xml(${validate.policy.log}) + + + + + + + + + + + + + dbPath: ${metadata.dbfile} + ant: antProperties() + + + + + + + + ant: antProperties() + doc: xml(${build.drive}/build/doc/ivy/tool-dependencies-${build.type}.xml) + + + + + + + + + + + + + + ant: antProperties() + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/ivy.xml --- a/buildframework/helium/config/ivy/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/config/ivy/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -35,35 +35,19 @@ - + - + - - - - - - - - - - - - - - - - - + @@ -144,12 +128,6 @@ - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/7zip-4.ivy.xml --- a/buildframework/helium/config/ivy/modules/7zip-4.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/ant-1.7.ivy.xml --- a/buildframework/helium/config/ivy/modules/ant-1.7.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - Apache Ant. Used for the core build process. - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/ccm-6.5_7.1.ivy.xml --- a/buildframework/helium/config/ivy/modules/ccm-6.5_7.1.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/codescanner-2.0.ivy.xml --- a/buildframework/helium/config/ivy/modules/codescanner-2.0.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/codescanner-2.1.ivy.xml --- a/buildframework/helium/config/ivy/modules/codescanner-2.1.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/ctc-6.5.ivy.xml --- a/buildframework/helium/config/ivy/modules/ctc-6.5.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/java-1.6.ivy.xml --- a/buildframework/helium/config/ivy/modules/java-1.6.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/java13-1.3.1.ivy.xml --- a/buildframework/helium/config/ivy/modules/java13-1.3.1.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/perl-5.6.1.ivy.xml --- a/buildframework/helium/config/ivy/modules/perl-5.6.1.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/python-2.5.ivy.xml --- a/buildframework/helium/config/ivy/modules/python-2.5.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/python-2.6.ivy.xml --- a/buildframework/helium/config/ivy/modules/python-2.6.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/sbs-2.12.ivy.xml --- a/buildframework/helium/config/ivy/modules/sbs-2.12.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/symsee-7.2.ivy.xml --- a/buildframework/helium/config/ivy/modules/symsee-7.2.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/modules/unzip-5.40.ivy.xml --- a/buildframework/helium/config/ivy/modules/unzip-5.40.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/ivy/tools_ivy_settings.xml --- a/buildframework/helium/config/ivy/tools_ivy_settings.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/config/ivy/tools_ivy_settings.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,7 +23,6 @@ - @@ -43,16 +42,6 @@ - - - - - - - - - - @@ -73,7 +62,6 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/metadata_filter_config_default.ant.xml --- a/buildframework/helium/config/metadata_filter_config_default.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/config/metadata_filter_config_default.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -55,16 +55,22 @@ + + + + + + @@ -83,7 +89,13 @@ - + + + + + + + @@ -125,7 +137,11 @@ - + + + + + @@ -135,4 +151,9 @@ + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/metadata_regex.csv --- a/buildframework/helium/config/metadata_regex.csv Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/config/metadata_regex.csv Mon Sep 13 13:11:19 2010 +0800 @@ -41,7 +41,7 @@ CRITICAL,.*[Ww]arning:?\s+(#111-D|#1166-D|#117-D|#128-D|#1293-D|#1441-D|#170-D|#174-D|#175-D|#185-D|#186-D|#223-D|#231-D|#257-D|#284-D|#368-D|#414-D|#430-D|#47-D|#514-D|#546-D|#68-D|#69-D|#830-D|#940-D|#836-D|A1495E|L6318W|C2874W|C4127|C4355|C4530|C4702|C4786|LNK4049).*, REMARK,.*Command line warning D4025 : .*, REMARK,".*:\d+: warning: cannot find matching deallocation function.*", -WARNING,.*\\\\(?)\(\d+\)\s:\sWarning:\s\(\d+\).*, +WARNING,.*\\\\(.*?)\(\d+\)\s:\sWarning:\s\(\d+\).*, WARNING,(\d+\))?\s.*WARNING:.*, WARNING,(BLDMAKE |MAKEDEF )?WARNING:.*, WARNING,.*\(\d+\) : warning C.*, diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/signaling_config_default.ant.xml --- a/buildframework/helium/config/signaling_config_default.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/config/signaling_config_default.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -27,7 +27,7 @@ - @@ -57,7 +57,7 @@ - @@ -144,6 +144,10 @@ + + + + @@ -167,7 +171,7 @@ - + @@ -197,7 +201,7 @@ - + @@ -226,7 +230,7 @@ - + @@ -240,7 +244,7 @@ - + @@ -258,7 +262,7 @@ - + @@ -272,7 +276,7 @@ - + @@ -286,7 +290,7 @@ - + @@ -316,7 +320,7 @@ - + @@ -342,7 +346,7 @@ - + @@ -364,7 +368,7 @@ - + @@ -386,7 +390,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/config/version.txt --- a/buildframework/helium/config/version.txt Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/config/version.txt Mon Sep 13 13:11:19 2010 +0800 @@ -1,5 +1,5 @@ #Helium version - DO NOT EDIT #Fri Dec 18 15:07:03 EET 2009 -last.major.helium.version=9.0 -second.last.major.helium.version=8.0 -helium.version=10.0.0 +last.major.helium.version=10.0.0 +second.last.major.helium.version=9.0 +helium.version=11.0.0 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/api_rst/project.rst.ftl --- a/buildframework/helium/doc/api_rst/project.rst.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/api_rst/project.rst.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -71,6 +71,9 @@ :Location: <@helium_api_location_path location="${target.location}"/> :Scope: ${target.scope} +<#if target.since?length > 0> +:Since: ${target.since} + <#if target.ifDependency?length > 0> :Condition: Target **is** run if property defined: :hlm-p:`${target.ifDependency}` @@ -78,6 +81,7 @@ :Condition: Target **is not** run if property defined: ``${target.unlessDependency}`` + <#recurse target.documentation> <#assign propertyList=target.propertyDependency?sort> @@ -90,6 +94,16 @@ +<#assign signalsList=target.signal?sort> +<#if signalsList?size > 0> +**Signals** + +<#list signalsList as signal> +- ``${signal}`` + + + + **Target dependencies** .. raw:: html @@ -139,6 +153,9 @@ :Location: <@helium_api_location_path location="${property.location}"/> :Type: ${property.type} :Scope: ${property.scope} +<#if property.scope?length > 0> +:Since: ${property.since} + :Editable: ${property.editable} <#if property.defaultValue?size > 1> :Default value: ``${property.defaultValue}`` @@ -180,6 +197,9 @@ :Location: <@helium_api_location_path location="${macro.location}"/> :Scope: ${macro.scope} +<#if macro.scope?length > 0> +:Since: ${macro.since} + <#recurse macro.documentation> diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/api_rst/properties_list.rst.ftl --- a/buildframework/helium/doc/api_rst/properties_list.rst.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/api_rst/properties_list.rst.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -30,11 +30,11 @@ .. csv-table:: Helium properties - :header: "Property", "Project", "Summary" + :header: "Property", "Project", "Summary", "Default Value" <#list propertyCache?keys?sort as name> <#assign property=propertyCache[name]> - ":hlm-t:`${name}`", "${property?parent.name}", "${property.summary?replace("^", " ", "rm")?replace("\"", "\"\"", "rm")?trim}" + ":hlm-t:`${name}`", "${property?parent.name}", "${property.summary?replace("^", " ", "rm")?replace("\"", "\"\"", "rm")?trim}", "<#if property.defaultValue?length < 25>${property.defaultValue}" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/default/.templates/sidebar.html --- a/buildframework/helium/doc/default/.templates/sidebar.html Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/default/.templates/sidebar.html Mon Sep 13 13:11:19 2010 +0800 @@ -1,7 +1,8 @@ - + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/default/conf.py --- a/buildframework/helium/doc/default/conf.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/default/conf.py Mon Sep 13 13:11:19 2010 +0800 @@ -122,9 +122,9 @@ #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'index': 'sidebar.html' -} +#html_sidebars = { +# 'index': 'sidebar.html' +#} # Additional templates that should be rendered to pages, maps page names to # template names. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/.templates/indexcontent.html.ftl --- a/buildframework/helium/doc/src/.templates/indexcontent.html.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/.templates/indexcontent.html.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -24,14 +24,12 @@

Parts of the documentation:

+<#if !ant?keys?seq_contains("sf")> + -<#if !(ant?keys?seq_contains("sf"))> - -
+<#if !ant?keys?seq_contains("sf")>

Customer documentation:

@@ -60,5 +59,5 @@ development teams

- + {% endblock %} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/development/coding_conventions.rst --- a/buildframework/helium/doc/src/development/coding_conventions.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/development/coding_conventions.rst Mon Sep 13 13:11:19 2010 +0800 @@ -73,6 +73,7 @@ "``hlm-p``", "Properties" "``hlm-m``", "Macros" + It is **not** possible to link to the task or anything in the Java documentation. Creating Index References ````````````````````````` diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/development/developer_guide.rst --- a/buildframework/helium/doc/src/development/developer_guide.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/development/developer_guide.rst Mon Sep 13 13:11:19 2010 +0800 @@ -63,6 +63,37 @@ ``/tools/common`` Common libraries for Java, Perl and Python and XML schemas. +Anatomy of a library project +---------------------------- + +:: + + + builder + - build.xml + - bld.bat + - bld + + antlibs + Ant specific dependencies needed to execute ant properly + e.g: Java checkstyle, Code coverage tools + The jar in that folder will not be used as compilation dependencies + + + + doc + General documentation of the project + + settings + + ivysettings.xml + + deps + + + + + + + - -.jar + + ... + + java + + component1 + + componentn ... + + python + + component1 + + componentn ... + + ... Ant script structure -------------------- @@ -71,7 +102,7 @@ .. index:: - single: Custom Ant library + single: Custom Ant libraries Custom Ant libraries ==================== @@ -85,6 +116,242 @@ The component also need an Ivy file (``ivy.xml``) in order to be detected and built. The file must define the correct list of dependencies for the component so it get built in the correct order. +Structure +--------- + +A component is a self contained structure which implements a set of feature related to a specific domain (e.g: Diamonds, SCM). The following diagram shows +the physical structure of a component. + +:: + + + + - build.xml + - ivy.xml + + src + + com + + nokia + + helium + + + + ant + + taskdefs + source of the Ant tasks + + types + source of the Ant DataType + + listeners + source of the Ant Listener + + conditions + source of the Ant Conditions + + tests + - build.xml + - bld.bat + - bld.sh + + antunits + - test_xxx.ant.xml* - Unittest implemented using AntUnit + + data + data used for the the unittests. + + src + + com + + nokia + + helium + + + + tests + source of junit unittests. + +build.xml file +-------------- + +This is the simplest file you must have at component level, ```` is really important +as it defines the future name of the JAR file. +:: + + + Component build file. + + + +ivy.xml file +------------ + +The ``ivy.xml`` file is used to gather the relevant dependencies to build your component and to order +the build of the components correctly:: + + + + + + + + + + + +More info about Ivy can be found from: http://ant.apache.org/ivy/ + +AntUnit files +------------- + +The builder will automatically test all the AntUnit files from ``/tests/antunit``. +Test must be written by keeping in mind that source tree must remain unmodified after the testing (please use the ``test.temp.dir``). + +Test file example:: + + + Helium unittests. + + + + + + + + + + + + + + + + + +Source code license +------------------- + +Each file should include the following license header:: + + /* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +Documentation +------------- + +All classes and methods must be documented. +Ant facade classes like task or type must be doclet documented. This implies the javadoc +to be user and not developer oriented, for instance examples of the task/type usage are really appreciated. +Also all setter methods visible through Ant must be documented properly using *@ant.required* +or *@ant.not-required* javadoc style attributes. + +You can find more information on how to document Ant tasks using the doclet plugin on http://doclet.neuroning.com/. + +General coding guidelines +------------------------- + + * Java components must not use ``getProperty()`` with a hardcoded name coming from helium (e.g.: ``getProject().getProperty("helium.dir"))`` The only exceptions to this are: + * Ant listeners (the name of the property must be linked to the listener not to Helium!) + * Code under the legacy component. + * It is forbidden to share unittest data between components (else it breaks the "self-contained" principle). + + +Ant type and task guidelines +---------------------------- + +In order to match as must as configurability concepts, Helium custom types and tasks must follow development guidelines as +much as possible. You can find then on http://.apache.org/_task_guidelines.html. + +Logging +------- + +Developer must preferably use standard Ant logging for any user log output. +Internal debug logging must be implemented using the log4j framework. + + * ANT Listeners must use log4j logging framework - using Ant logging system might cause some looping issues. + * Ant ``Type`` and ``Task`` classes must use the Ant logging mechanism to report to the user. + * Generic framework code (that which doesn't link to Ant directly) must use log4j. + * Usage of ``System.out.println()`` should be avoided. + * All the unhandled exceptions should be considered as errors and should be reported as such: + * use ``log("message", Project.MSG_ERR)`` under Ant. + * ``log.error()`` otherwise. + * Exceptions to this rule must be clearly commented under the code. + * Debug information: + * log4j framework (``log.debug()``) must be used to push information to the Helium debug log - so debug information is not + directly visible by the user. + * The Ant logging framework can also be used to log Type/Task debug info (but log4j is preferred). + * The ``printStackTrace()`` method should be used on below scenarios: + * At the time of an unknown exception. + * Should be used with exceptions other than ``BuildException``. + * In case it is difficult to debug the issue with ``Exception.getMessage()``. + * Use when debugging complex issues (this doesn't mean the line should remain in the code after development). + * When it is required to print the all the information about the occurring ``Exception``. + + +This is an example on how to use logging:: + + import org.apache.log4j.Logger; + + class MyClass extends Task { + private static Logger log = Logger.getLogger(MyClass.class); + + public void execute() { + log("Executing..."); + log.debug("some useful debug information."); + } + } + +Please find more information on log4j from the online manual: http://logging.apache.org/log4j/1.2/manual.html. + +Debug log +`````````` + +The log4j debug output is written to ``hlm_debug.log`` that is stored under ``HELIUM_CACHE_DIR``. This may be set one of these two values:: + + %TEMP%\helium\%USERNAME%\%JOB_ID% + %TEMP%\helium\%USERNAME% + +Ensure ``TEMP`` is set to a location that is visible to all so the file can be accessed from all accounts. + +Exceptions +---------- + +Exceptional event reporting and handling is crutial in software development. Developer must make sure it is done accordingly +to the framework it is currently using: + + * To report a build failure under Ant a ``BuildException`` must be used. + But we have to keep in mind that a ``BuildException`` is not tracked because it derives from ``RuntimeException``. + So we have to be careful with those and try to limit their puprose to the original usage: Ant build failure. + * It is preferable to use a meaningful exception type like ``FileNotFoundException``. + * Throwing or catching raw exceptions like ``Exception``, ``RuntimeException`` should be avoided. + +Deprecation +----------- + +Deprecation is an inevitable in involving software. The usage of deprecation implies most of the time the replacement of a feature +by an newer. To make sure it has the minimum impact on the user, we need to provide both features for at least one major release, so +the customer has time to do the relevant modification to migrate. In order to ease as much as possible the deployment and the migration +to a newer version of any Ant object please follow this guidelines: + + * Ant attributes replacement + * Use the @Deprecated annotation on the Java code to make sure this method is not in use anymore under our code. + * Log a warning message to the user using Ant logging. Please use the following template: + * The usage of the '' attribute is deprecated, please consider using the '' attribute. + * Try to keep the functionality by adapting the code inside the deprecated setter to use the newer API. + +Example of Ant attribute deprecation for a Java task:: + + @Deprecated + public void setDb(File database) { + log("The usage of the 'db' attribute is deprecated, please consider using the 'database' attribute.", Project.MSG_WARN); + this.database = database; + } + + .. index:: single: How to build the delivery? @@ -196,3 +463,80 @@ A new Ivy config file can be added for a non-jar or egg type file. + +Feature enable Configuration +============================ + +If we are adding new features (which are similar to diamonds, coverage toosl), then those feature needs to enabled in the build sequence using 'feature.enabled' property. + +Using feature.enabled property we need to set intermediate property and that intermidiate property should have the name pattern as internal.feature.enabled. + +Intermidiate properties should be set using ant task. Do not use antcontrib task (avoid as much as possible). + +We need to trigger the targets using intermidiate property. + +Target based feature testing +---------------------------- + +And depending target should be called using intermediate property. + +Ex:: + + feature.enabled = true + + + + + + + +If any property is deprecated then that should be documented in the respective .ant.xml. + +Ex:: + + + + + feature.enabled = true + old.feature = false + + + + + + + + + + + +Task base feature testing +------------------------- + +If the if task is used inside a target it is then preferable to use the feature.enabled property directly: + +:: + + + ... + + + + + + + ... + + ... + + ... + + + +Of course the 'old.feature' will be kept for one major release and removed in the next one. + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/feature_list.rst --- a/buildframework/helium/doc/src/feature_list.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/feature_list.rst Mon Sep 13 13:11:19 2010 +0800 @@ -87,6 +87,7 @@ * Can upload distribution policy file related errors like missing, invalid encoding and error type A, B, C. * Can upload List of Illegal APIs names if disable.analysis.tool is not set. * Can upload custom build tags. +* Can upload confml problems. * Logging can be skipped if desired. @@ -206,6 +207,7 @@ * Build duplicates detection. * Internal exports detection. * Codescanner task. +* Validate the confml files using ConE tool. .. index:: single: feature - Publishing diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/configuring_features.rst.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/doc/src/manual/configuring_features.rst.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,69 @@ +.. ============================================================================ + Name : configuring_features.rst + Part of : Helium + + Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + All rights reserved. + This component and the accompanying materials are made available + under the terms of the License "Eclipse Public License v1.0" + which accompanies this distribution, and is available + at the URL "http://www.eclipse.org/legal/epl-v10.html". + + Initial Contributors: + Nokia Corporation - initial contribution. + + Contributors: + + Description: + + ============================================================================ + +#################### +Configuring Helium Features +#################### + +Introduction +------------------------------- + +This describes how to configure the Helium features. + +Helium supports a number of features and this sections gives information on how to configure/enable those features. + +We could configure features by enabing/disabling repective properties:: + + publishing build results into diamonds. + Publishing build artificats. + Enabling blocks features. + Enabling to use dragonfly and many more. + +Properties need to be defined for enabling/disabling the features. +------------------------------------------------------------- +<#assign propertyCache = {}> +<#list doc.antDatabase.project.property as property> + <#assign propertyCache = propertyCache + {property.name: property}> + + +.. csv-table:: Feature properties + :header: "Property name", "Description", "Allowed value", "Deprecated property" + +<#list propertyCache?keys?sort as name> +<#assign property=propertyCache[name]> +<#if name?ends_with(".enabled")> + <#assign deprecatedProperty=""> + <#assign deprecatedMessage=""> + <#list propertyCache?keys?sort as propName> + <#assign deprecatedName=propertyCache[propName]> + <#if deprecatedName.summary?contains(name) && deprecatedName.summary?contains("deprecated")> + <#assign deprecatedProperty=":hlm-p:`${propName}`,"> + <#assign deprecatedMessage="${deprecatedName.deprecated}"> + + + ":hlm-p:`${name}`", "${property.summary?replace("^", " ", "rm")?replace("\"", "\"\"", "rm")?trim}", "true/false", "${deprecatedProperty}${deprecatedMessage}" + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/coverity.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/doc/src/manual/coverity.rst Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,237 @@ +.. index:: + module: Coverity Prevent Tool + +======================== +Coverity Prevent Tool +======================== + +.. contents:: + +This document describes requirements and how to run Coverity Prevent tool with sbs builds using Helium. + +Introduction +------------------------- + +- Coverity Prevent analyzes source code to find defects early in the development cycle, reducing the risks associated with coding. Included with Prevent are workflow tools that track and manage defects from initial discovery through final resolution. +- With high precision, Coverity Prevent analyzes source code and detects critical software defects in the following categories: + + **Quality** + Coverity Prevent detects bugs at compile-time that can cause run-time crashes. For example: memory leaks, use-after-free errors, and illegal pointer accesses. + + **Security** + Early during development, Coverity Prevent can detect the security vulnerabilities that hackers can exploit and help you eliminate serious problems, such as denial of service, data or memory corruption, and privilege escalation. Vulnerabilities detected can include buffer overruns, integer overflows, format string errors, and SQL injection attacks. + + **Concurrency** + Coverity Prevent can detect errors in multi-threaded programs that, given the complexity of concurrent programming, can be extremely difficult to track down or reproduce. Detected defects include potential deadlocks or misuse of locks. + +Description +------------------------- + +- Coverity Prevent tool is integrated with Helium to measure C++ code coverage. +- Helium does measure C++ code coverage and gives output results in the format of HTML and errors could be submitted to remote database server. +- Helium runs coverity prevet tool commands, in sequential using targets. Those targets are defined below.. +- Helium runs Coverity Prevent tool targets if ``coverity.enabled`` is set to ``true`` +- Coverity command can be run using the ```` task. +- Coverity task will validate is the command passed to task is starts with ``cov-`` and then it will run the command. +- Coverity command options can passed through the datatypes ```` or ````. +- Below example shows how parameters can be passed to coverity command: + +.. code-block:: xml + + + + + + + +.. code-block:: xml + + + + + + + + + + + + + +Helium Targets +-------------------------- + +Coverity configure +:::::::::::::::::::::::: + + The ``cov-configure`` command configures a compiler or family of compilers. By default, if no other configuration file or directory is specified, + the configuration is created at /config/coverity_config.xml. Each invocation of cov-configure adds a compiler configuration + in its own subdirectory of the directory containing the coverity_config.xml file, and coverity_config.xml contains an include directive for + that compiler-specific configuration. + +- These configuration files are generated by ``run-coverity-configure`` target. +- If the configuration options need to be changed, then define a ``coverity.config.options`` reference in the respective configuration file. + +Ex: + +.. code-block:: xml + + + + + + + + +Coverity build +:::::::::::::::::::::::: + + The cov-build command intercepts all calls to the compiler invoked by the build system. + + Usually the cov-build command name and option can prefix the original build command. However, if the build command depends on features + of the command shell that usually invokes it, such as certain shell variables or non-alphanumeric arguments, you can invoke it using a + wrapper script. This preserves the original behavior because the build command is again invoked directly by the kind of shell on which + it depends. + +- Coverity Prevent tool build command integrated with SBS task. +- Coverity task extends the "sbstask", so what ever the arguments we pass for sbstask will remain same for coverity tool also. +- For example + +.. code-block:: xml + + + + + +- In above example Coverity Prevent tool is integrated with sbs using task "coveritybuild". +- This task is slightly difference from sbstask as it accepts the coverity tool parameters required while running coverity tool. +- In the above example we have mentioned "coverity.build.options" which are required for cov-build command. +- coverityoptions datatype will follow below syntax. + +.. code-block:: xml + + + + + + + + + +- Internally "coveritybuild" task will run the "cov-build" with parameters passed with "" datatype and sbs commands. +- Above arguments are passed by default in helium. If it is required to remove/change the default parameters (by helium)into cov-build, + we need to override the datatype "coverityoptions". + +- Command resulted for above example is shown below with "@{sbs.input} = dfs_build_input_armv5". + + | cov-build.exe --auto-diff --record-only --config Y:/output/coverity/config/coverity_config.xml + | --preprocess-first --dir Y:/output/coverity/intermediate sbs -s Y:/output/build/canonical_system_definition_dfs_build.xml + | -c armv5 -k --logfile Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build.log + | --makefile=Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build + +Coverity emit +:::::::::::::::::::::::: + + The ``cov-emit`` command parses a source file and outputs it into a directory (emit repository) that can later be analyzed with ``cov-analyze``. + The ``cov-emit`` command is typically called by ``cov-translate``, which is in turn typically called by ``cov-build`` (``cov-emit`` is a low-level command + and is not normally called directly). + + Re-running the cov-build with replay option will reduce the build time by ~ 20% + + - Coverity emit command run by target ``run-coverity-emit``. + +Coverity analyze +:::::::::::::::::::::::: + + Sometimes the same file is compiled several times with different command-line options. Due to the inherent difficulty of tracking linkage + information, the ``cov-analyze`` command cannot automatically determine which files are linked together. To avoid errors in function call + resolution (especially in C code, which doesn't have any name mangling), use the ``cov-link`` command to get this information. + + and also + + working with link files is faster than collecting data from the intermediate directory multiple times + + So run the ``cov-link`` commands and analyze the database using ``cov-analyze`` command. + +- Coverity code analysis is done by target ``run-coverity-analyze``. +- Analysis is done in 2 stages. First runs ``cov-link`` and then ``cov-analyze`` command. + +**cov-link command** + + 1. Run cov-link with the --collect and -of options to collect linkage information on all files compiled in an emit directory. + + 2. Create one or more additional link files by filtering information using either an argument or a portion of the pathname that + was used during command-line compilation. Compiled files are identified based on: + * A portion of the pathname to the file when it was compiled. Use the -s option to specify a Perl regular expression to use when looking + at the pathname. + + * The options given on the command line when it was compiled. Use the -a, -r, -na, and -nr options to group by command-line options. + + 3. Use the link files created in the previous steps, and the emit repository in the original intermediate directory, to create a new intermediate directory with an emit repository with resolved function calls. Then use cov-analyze on the new intermediate directory. + +**cov-analyze** + command analyzes the code previously parsed and emitted into an intermediate directory. The result is a set of XML files + in the /c/output directory that contain a description of the defects. The cov-analyze command also stores analysis + information in the intermediate directory, which speeds up future runs. + + A log file with information about the checkers used in the analysis, including notices of crashes, is created at + /c/output/analysis-log.txt.gz. + + Note that behind the scenes, cov-analyze actually calls cov-internal-analyze-c to run the analysis. If you look at running processes, + both cov-analyze and cov-internal-analyze-c are listed. During an analysis, cov-analyze monitors cov-internal-analyze-c, and can + seamlessly restart the analysis in case of failure. + + - ``coverity.analyze.options`` could be set if it required to disable/enable the checkers. + + .. code-block:: xml + + + + + + + + + + +Coverity defect manager +::::::::::::::::::::::: + + The ``cov-commit-defects`` command takes defects stored as *.errors.xml files in the //output directory and + commits them to the Defect Manager database as a new product run. Once committed, you can view the defects in the Defect Manager alongside + the source code that generated them. The defect XML files are created by the ``cov-analyze``command, which scan and evaluate the + preprocessed source files in the //emit directory. + +- Coverity defects can be submitted to a remote coverity defect database using the ``run-commit-defects`` target. +- To enable the target user should set ``coverity.commit.defects.enabled`` to ``true`` and ``coverity.enabled`` to ``true``. +- Username and Password for the Coverity Defect Manager should be set in the `.netrc file`_:: + + machine coverity login password + +.. csv-table:: Coverity feature flags + :header: "Flags to set", "Action performed", "Allowed value" + + ":hlm-t:`coverity.commit.defects.enabled`", "If user wants to commit the defects using existing intermediate folder and run target + ``run-commit-defects``", "true/false" + ":hlm-t:`coverity.commit.defects.enabled` and `coverity.enabled`", "If user want to generate the intermididate folder and then commit + defects, first intermediate folders will get generated and defects will commited into database. By default this build sequence will + happen.", "true/false" + +- Below properties must be set for defects to be committed to the database: + +.. csv-table:: Coverity defect manager properties + :header: "Property name", "Description" + + ":hlm-t:`coverity.defect.manager.server`", "Coverity defect manager server/IP address. Ex: server.domain.extension or 100.220.530.101" + ":hlm-t:`coverity.defect.manager.port`", "Coverity defect manager HTTP port number" + ":hlm-t:`coverity.defect.manager.product`", "Coverity defect manager product/platform to submit the coverity errors." + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/debugging.rst --- a/buildframework/helium/doc/src/manual/debugging.rst Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -.. ============================================================================ - Name : debugging.rst - Part of : Helium - - Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - All rights reserved. - This component and the accompanying materials are made available - under the terms of the License "Eclipse Public License v1.0" - which accompanies this distribution, and is available - at the URL "http://www.eclipse.org/legal/epl-v10.html". - - Initial Contributors: - Nokia Corporation - initial contribution. - - Contributors: - - Description: - - ============================================================================ - -.. index:: - module: Debugging - -######### -Debugging -######### - - -.. contents:: - - -.. _Troubleshooting-label: - -Troubleshooting -=============== - -This section contains details on how to find errors and problems within helium itself (for helium contributors) and within the configuration files -and ANT tasks etc. for the build managers and subcons. - -.. index:: - single: Output Logs - -.. index:: - single: Logs - -Output Logs ------------ - -When running Helium there are a large number of output logs created to assist with debugging and determining what has been performed and what has not. All of the log files are generated in the build area, usually under the ``output\logs`` folder. Many of the logs are created in different formats, e.g. the Bill Of Materials log file exists as .html, .xml and .txt (all the same information). Some of the logs exist as different file formats giving different information at various stages of the activity, e.g. the cenrep logs in which case generally the .html files are a summary of the whole activity. -For mc product builds the following log files are created -where xx is the name of the build + build id e.g. 12.030_ant_env.log -where nn is the variant number(s): - -.. csv-table:: build logs - :header: "Log name", "File type", "Purpose" - - "xx_ant_env.log", "Ant environment Log", "Lists all the environment varaibles" - "xx_ant_build.log", "Ant build Log", "Lists all the ANT tasks that have been executed" - "xx_BOM.html", "BOM listing", "lists all the projects and tasks included in the build" - "xx_bom_delta.html", "BOM delta listing", "lists all the delta projects and tasks included in the build" - "xx.roms.log", "ROM creation log", "lists all the .iby, .txt, etc. files included in the ROM creation, including missing files" - "xx_scan2.html", "Compilation summary", "Lists all the components built with their errors (0 if no errors)" - "xx_zips_scan2.html", "zips creation log", "lists all the zip files created and whether there are any errors" - "hlm_listener.log", "Helium debug log", "Helium debug log for internal data [Helium runtime information] and it can be found inside HELIUM_CACHE_DIR folder" - "hlm_debug.log", "Helium debug log", "Helium debug log for all other debug log (all java logs) and it can be found inside HELIUM_CACHE_DIR folder" - -Targets and their logs -;;;;;;;;;;;;;;;;;;;;;; - -.. image:: dependencies_log.grph.png - -.. index:: - single: Troubleshooting - - -Troubleshooting - Helium ------------------------- - -Use the :hlm-t:`diagnostics` command provide debugging information when reporting problems. It lists all the environment variables and all the Ant -properties and all the Ant targets within Helium so you might find it useful to pipe it to a log file so that you can read all of the output at your leisure:: - - hlm diagnostics > diag.log - -.. index:: - single: Failing early in the build - -Failing early in the build -;;;;;;;;;;;;;;;;;;;;;;;;;;; - -The :hlm-p:`failonerror` property is defined in ``helium.ant.xml`` and has the default value ``false``. It is used to control whether the ```` -tasks fail when errors occur or the build execution just continues. The build can be configured to "fail fast" if this is set to ``true``, -either on the command line or in a build configuration before importing ``helium.ant.xml``. Given that many ``exec`` tasks will return an -error code due to build errors, it is not recommended to set this to true for regular builds. - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/index.rst.ftl --- a/buildframework/helium/doc/src/manual/index.rst.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/index.rst.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -33,8 +33,8 @@ retrieving configuring + configuring_features running - debugging stages stage_matti <#if !ant?keys?seq_contains("sf")> @@ -43,10 +43,11 @@ iad documentation - quality cruisecontrol sysdef3 + messaging metrics + coverity diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/messaging.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/doc/src/manual/messaging.rst Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,92 @@ +Messaging +========= + +Currently the communication to external services (diamonds, ats, internal logging framework) +are done within helium as REST / SOAP client, which is not scalable and had limitations +and lot of overheads in terms communication with those external services. + + + +Overview +-------- + +The messaging framework is aimed to address this issue by defining +the input using which the data is exchanged to the external system. Currently the +main focus is to define the input format for the messaging framework and to work with +existing framework. In the future directly interact with the messaging system to exchange +data to the external system. + +Currently there are three types of messages could be defined, which works with +existing system to send data to diamonds. + +Text Message +~~~~~~~~~~~~ + +Any text message to be sent to the diamonds could be possible with the message type +definition. Example to use it as below, + + +.. code-block:: xml + + + +File Message +~~~~~~~~~~~~ + +Any file which needs to be sent using messaging framework could be defined +using file message. Example to use it as below, + +.. code-block:: xml + + + +Here the the attribute value for file attribute pointing to the file to be sent is forwarded +to the destination. + + +FMPP Message +~~~~~~~~~~~~ + +Any message generated by processing the fmpp template data could be defined using +the fmpp message. Example is, + +.. code-block:: xml + + + + +The above definition format is similar to fmpp conversion task, except that it has +limitation to convert one file using the template. Before sending data, the input template +is converted and an internal file message is created with the converted file path and +sent to the diamonds. + +TargetMessage Trigger +~~~~~~~~~~~~~~~~~~~~~ + +TargetMessageTrigger type maps a message to a particular target and could be used to +send the input message for the target execution. Example is as below, + + +.. code-block:: xml + + + + + + ant: antProperties() + doc: xml(${ido.codescanner.output.dir}/problemIndex.xml) + + + + + +In the above example, the target ido-codescanner contains an fmpp message. When +the target executes the target ido-codescanner at the end of execution which converts +the input file using template and the output file is sent to diamonds. \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/metrics.rst --- a/buildframework/helium/doc/src/manual/metrics.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/metrics.rst Mon Sep 13 13:11:19 2010 +0800 @@ -61,7 +61,7 @@ * * -* If you define the property :hlm-p:`skip.diamonds` to ``true`` Diamonds is disabled. +* If you define the property :hlm-p:`diamonds.enabled` to ``false`` Diamonds is disabled. .. index:: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/running.rst --- a/buildframework/helium/doc/src/manual/running.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/running.rst Mon Sep 13 13:11:19 2010 +0800 @@ -98,25 +98,12 @@ .. index:: - single: Tools version checking - -Tools version checking -====================== - -Tool version checking can be performed to ensure that all tools have correct versions present. At the same time, a path setting file will be created. Calling this file will add tools into path, so hard coding paths is no longer needed. - -To perform checking run the command:: - - hlm check-tool-versions - - -.. index:: single: Build output Build output ================ -When a build is running the targets being executed are listed on the screen there is no need to pipe this to a file as the ant targets are logged in the ``\*_main.ant.log`` for product and IDO builds. Once the build is complete it will say on the screen whether the build was successful or failed. If it has failed it should give an indication of where and why it failed on the screen but for more information you must examine the output logs. If the build says it was successfult this does not necessarily mean that the build compiled all components successfully, you must examine the logs to check that all is compiled and linked correctly. See :ref:`Troubleshooting-label` for information on logs and where they kept. +When a build is running the targets being executed are listed on the screen there is no need to pipe this to a file as the ant targets are logged in the ``\*_main.ant.log`` for product and IDO builds. Once the build is complete it will say on the screen whether the build was successful or failed. If it has failed it should give an indication of where and why it failed on the screen but for more information you must examine the output logs. If the build says it was successfult this does not necessarily mean that the build compiled all components successfully, you must examine the logs to check that all is compiled and linked correctly. The result of the build (compiled files, linked (flash) files etc.) are stored in the usual folders and directories under the ``\epoc32`` directory. @@ -156,9 +143,9 @@ Diamonds -------- -Logging to the Diamonds metrics database can be disabled by setting the property:: +Logging to the Diamonds metrics database could be disabled by setting the property:: - skip.diamonds=true + diamonds.enabled=false Internal data ------------- @@ -166,9 +153,33 @@ Helium can collect internal data about builds for the purpose of improving support. This can be disabled by setting an environment variable:: set HLM_DISABLE_INTERNAL_DATA=1 + +Output logs +----------- + +There are a large number of output logs created to assist with understanding the build and determining what has been performed and what has not. All of the log files are generated in the build area, usually under the ``output/logs`` folder. Many of the logs are created in different formats, e.g. the Bill Of Materials log file exists as HTML, XML and text (all the same information). Some of the logs exist as different file formats giving different information at various stages of the activity, e.g. the cenrep logs in which case generally the HTML files are a summary of the whole activity. + +.. image:: dependencies_log.grph.png Troubleshooting ================ -See :ref:`Troubleshooting-label` for information on how to find faults with Helium. \ No newline at end of file +This section contains details on how to find errors and problems within Helium itself (for helium contributors) and within the configuration files +and Ant tasks etc. for build managers and subcons. + +Diagnostics +------------ + +Use the :hlm-t:`diagnostics` command provide debugging information when reporting problems. It lists all the environment variables and all the Ant +properties and all the Ant targets within Helium:: + + hlm diagnostics > diag.log + +Failing early in the build +--------------------------- + +The :hlm-p:`failonerror` property is defined in ``helium.ant.xml`` and has the default value ``false``. It is used to control whether the ```` +tasks fail when errors occur or the build execution just continues. The build can be configured to "fail fast" if this is set to ``true``, +either on the command line or in a build configuration before importing ``helium.ant.xml``. Given that many ``exec`` tasks will return an +error code due to build errors, it is not recommended to set this to true for regular builds. \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/stage_ats.rst.inc.ftl --- a/buildframework/helium/doc/src/manual/stage_ats.rst.inc.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/stage_ats.rst.inc.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -63,20 +63,23 @@ The test generation code expects ``.pkg`` file in the ``group`` directory of test component to be compiled, to get the paths of the files (can be data, configuration, initialization, etc files) to be installed and where to install on the phone. + Three STEPS to setup ATS with Helium -------------------------------------- **Step 1: Configure System Definition Files** If the tsrc directory structure meets the criteria defined in the `new API test automation guidelines`_, then test components - should be included in the System Definition files; **layers** in ``layers.sysdef.xml`` file and **configuration** in ``build.sysdef.xml`` - file (`Structure of System Definition files`_). + should be included in the System Definition files. + +**System Definition Files supporting layers.sysdef.xml** + **layers** in ``layers.sysdef.xml`` file and **configuration** in ``build.sysdef.xml`` file (`Structure of System Definition files version 1.4`_). <#if !(ant?keys?seq_contains("sf"))> .. _`new API test automation guidelines`: http://s60wiki.nokia.com/S60Wiki/Test_Asset_Guidelines -.. _`Structure of System Definition files`: http://delivery.nmp.nokia.com/trac/helium/wiki/SystemDefinitionFiles +.. _`Structure of System Definition files version 1.4`: http://delivery.nmp.nokia.com/trac/helium/wiki/SystemDefinitionFiles -A template of layer in layers.sysdef.xml +A template of layer in layers.sysdef.xml for system definition files .. code-block:: xml @@ -96,6 +99,47 @@ * In the above, two modules means two drop files will be created; ``module`` may have one or more ``unit`` * By using property ``exclude.test.layers``, complete layers can be excluded and the components inside that layer will not be included in the AtsDrop. This property is a comma (,) separated list +**System Definition Files version 3.0 (SysDefs3)** (new Helium v.10.79) + The `structure of System Definition files version 3.0`_ is different than previous versions of system definition files. In SysDefs3, package definition files are used for components specification. Instead of layers naming conventions, filters are used to identify test components and test types, for example: "test, unit_test, !api_test" etc. + +<#if !(ant?keys?seq_contains("sf"))> +.. _`structure of System Definition files version 3.0`: http://wikis.in.nokia.com/view/SWManageabilityTeamWiki/PkgdefUse +<#else> +.. _`structure of System Definition files version 3.0`: sysdef3.rst + + +An example template for defining test components in a package definition file. + +.. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + + + +* Filter "test" must be specified for every test component. If it is not specified, the component will not be considered as a test component. +* / are now used to group test components, it work in the same way as ... in sysdef v1.4 works. The components having same group name are grouped together. + Separate drop files are created for different groups. In the above example, if only 'test' is selected, then two drop files will be created, one with tc1 and the other one with tc2 and tc3. + **Step 2: Configure ATS properties in build.xml** @@ -114,35 +158,37 @@ .. csv-table:: ATS Ant properties :header: "Property name", "Edit status", "Description" - ":hlm-p:`ats.server`", "[must]", "For example: ``4fix012345`` or ``catstresrv001.cats.noklab.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as 80. The host can be different depending on site and/or product." + ":hlm-p:`ats.server`", "[must]", "For example: ``4fix012345`` or ``catstresrv001.company.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as 80. The host can be different depending on site and/or product." ":hlm-p:`ats.drop.location`", "[allowed]", "Server location (UNC path) to save the ATSDrop file, before sending to the ATS Server. For example: ``\\\\trwsem00\\some_folder\\``. In case, :hlm-p:`ats.script.type` is set to ``import``, ATS doesn't need to have access to :hlm-p:`ats.drop.location`, its value can be any local folder on build machine, for example ``c:/temp`` (no network share needed)." ":hlm-p:`ats.product.name`", "[must]", "Name of the product to be tested." ":hlm-p:`eunit.test.package`", "[allowed]", "The EUnit package name to be unzipped on the environment, for executing EUnit tests." ":hlm-p:`eunitexerunner.flags`", "[allowed]", "Flags for EUnit exerunner can be set by setting the value of this variable. The default flags are set to ``/E S60AppEnv /R Off``." ":hlm-p:`ats.email.list`", "[allowed]", "The property is needed if you want to get an email from ATS server after the tests are executed. There can be one to many semicolon-separated email addresses." - ":hlm-p:`ats.report.type`", "[allowed]", "Value of the ats email report" - ":hlm-p:`ats.flashfiles.minlimit`", "[recommended]", "Limit of minimum number of flash files to execute :hlm-t:`ats-test` target, otherwise ``ATSDrop.zip`` will not be generated. Default value is 2 files." + ":hlm-p:`ats.report.type`", "[allowed]", "Value of the ats email report, for ATS4 set to 'no_attachment' so email size is reduced" + ":hlm-p:`ats.flashfiles.minlimit`", "[allowed]", "Limit of minimum number of flash files to execute :hlm-t:`ats-test` target, otherwise ``ATSDrop.zip`` will not be generated. Default value is 2 files." ":hlm-p:`ats.plan.name`", "[allowed]", "Modify the plan name if you have understanding of ``test.xml`` file or leave it as it is. Default value is ``plan``." ":hlm-p:`ats.product.hwid`", "[allowed]", "Product HardWare ID (HWID) attached to ATS. By default the value of HWID is not set." ":hlm-p:`ats.script.type`", "[allowed]", "There are two types of ats script files to send drop to ATS server, ``runx`` and ``import``; only difference is that with ``import`` ATS doesn't have to have access rights to ``testdrop.zip`` file, as it is sent to the system over http and import doesn't need network shares. If that is not needed ``import`` should not be used. Default value is ``runx`` as ``import`` involves heavy processing on ATS server." ":hlm-p:`ats.target.platform`", "[allowed]", "Sets target platform for compiling test components. Default value is ``armv5 urel``." ":hlm-p:`ats.test.timeout`", "[allowed]", "To set test commands execution time limit on ATS server, in seconds. Default value is ``60``." ":hlm-p:`ats.testrun.name`", "[allowed]", "Modify the test-run name if you have understanding of ``test.xml`` file or leave it as it is. Default value is a string consist of build id, product name, major and minor versions." - ":hlm-p:`ats.trace.enabled`", "[allowed]", "Should be ``True`` if tracing is needed during the tests running on ATS. Default value is ``False``, the values are case-sensitive. See http://s60wiki.nokia.com/S60Wiki/CATS/TraceTools." - ":hlm-p:`ats.ctc.enabled`", "[allowed]", "Should be ``True`` if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is ``False``. The values are case-sensitive." + ":hlm-p:`ats.trace.enabled`", "[allowed]", "Should be ``true`` if tracing is needed during the tests running on ATS. Default value is ``false``, the values are case-sensitive. See http://s60wiki.nokia.com/S60Wiki/CATS/TraceTools." + ":hlm-p:`ats.ctc.enabled`", "[allowed]", "Should be ``true`` if coverage measurement and dynamic analysis (CTC) tool support is to be used by ATS. Default value is ``false``. The values are case-sensitive." ":hlm-p:`ats.ctc.host`", "[allowed]", "CTC host, provided by CATS used to create coverage measurement reports. MON.sym files are copied to this location, for example ``10.0.0.1``. If not given, code coverage reports are not created" - ":hlm-p:`ats.obey.pkgfiles.rule`", "[allowed]", "If the property is set to ``True``, then the only test components which will have PKG files, will be included into the ``test.xml`` as a test-set. Which means, even if there's a test component (executable) but there's no PKG file, it should not be considered as a test component and hence not included into the test.xml as a separate test. By default the property value is ``False``." + ":hlm-p:`ats.obey.pkgfiles.rule`", "[allowed]", "If the property is set to ``true``, then the only test components which will have PKG files, will be included into the ``test.xml`` as a test-set. Which means, even if there's a test component (executable) but there's no PKG file, it should not be considered as a test component and hence not included into the test.xml as a separate test. By default the property value is ``false``." "``reference.ats.flash.images``", "[allowed]", "Fileset for list of flash images (can be .fpsx, .C00, .V01 etc) It is recommended to set the fileset, default filset is given below which can be overwritten. set *dir=""* attribute of the filset to ``${r'$'}{build.output.dir}/variant_images`` if hlm-t:`variant-image-creation` target is being used." ":hlm-p:`tsrc.data.dir`", "[allowed]", "The default value is ``data`` and refers to the 'data' directory under 'tsrc' directory." ":hlm-p:`tsrc.path.list`", "[allowed]", "Contains list of the tsrc directories. Gets the list from system definition layer files. Assuming that the test components are defined already in te ``layers.sysdef.xml`` files to get compiled. Not recommended, but the property value can be set if there are no System Definition file(s), and tsrc directories paths to set manually." ":hlm-p:`ats.report.location`", "[allowed]", "Sets ATS reports store location. Default location is ``${r'$'}{publish.dir}/${r'$'}{publish.subdir}``." - ":hlm-p:`ats.multiset.enabled`", "[allowed]", "Should be ``True`` so a set is used for each pkg file in a component, this allows tests to run in parallel on several devices." + ":hlm-p:`ats.multiset.enabled`", "[allowed]", "Should be ``true`` so a set is used for each pkg file in a component, this allows tests to run in parallel on several devices." ":hlm-p:`ats.diamonds.signal`", "[allowed]", "Should be ``true`` so at end of the build diamonds is checked for test results and Helium fails if tests failed." ":hlm-p:`ats.delta.enabled`", "[allowed]", "Should be ``true`` so only ADOs changed during :hlm-t:`do-prep-work-area` are tested by ATS." ":hlm-p:`ats4.enabled`", "[allowed]", "Should be ``true`` if ATS4 is to be used." ":hlm-p:`ats.emulator.enable`", "[allowed]", "Should be ``true`` if ``WINSCW`` emulator is to be used." ":hlm-p:`ats.specific.pkg`", "[allowed]", "Text in name of PKG files to use eg. 'sanity' would only use xxxsanity.pkg files from components." - ":hlm-p:`ats.create.singledrop.file`", "[recommended]", "If present and set to 'true', it will create one drop file, if set to any other value or not present it will create multiple drop files (defined by the sysdef file). This is to save traffic to the server." + ":hlm-p:`ats.singledrop.enabled`", "[allowed]", "If present and set to 'true', it will create one drop file, if set to any other value or not present it will create multiple drop files (defined by the sysdef file). This is to save traffic to the server." + ":hlm-p:`ats.java.importer.enabled`", "[allowed]", "If set to 'true', for older uploader is used for ats3 which shows improved error message." + ":hlm-p:`ats.test.filterset`", "[allowed]", "(new Helium v.10.79)Contains a name of test filterset (see example below). A filterset is used to select/unselect test components. The filter(s) is/are effective when the same filters are defined in the package definition file for component(s)." An example of setting up properties: @@ -159,12 +205,19 @@ - - - + + + + + + + + + + ... @@ -183,7 +236,7 @@ **STEP 3: Call target ats-test** -To execute the target, a property should be set(````). +To execute the target, a property should be set(````). Then call :hlm-t:`ats-test`, which will create the ATSDrop.zip (test package). @@ -221,7 +274,7 @@ Skip Sending AtsDrop to ATS ---------------------------- -By setting property of ``skip.ats.sending``, ``ats-test`` target only creates a drop file, and does not send the drop (or package) to ATS server. +By setting property of ``ats.upload.enabled`` to ``false``, ``ats-test`` target only creates a drop file, and does not send the drop (or package) to ATS server. Customizing the test.xml in ATS -------------------------------- @@ -239,11 +292,11 @@ * **prepostaction.xml** goes before first postaction * **postpostaction.xml** goes after last postaction -The files must be in the directory custom under the tsrc folder processed. +The files must be in the directory 'custom' under the 'tsrc' or 'group' folder to be processed. The files need to be proper XML snippets that fit to their place. In case of an error an error is logged and a comment inserted to the generated XML file. -A postaction section customization file ( prepostaction.xml or postpostaction.xml) could look like this +A postaction section customization file (prepostaction.xml or postpostaction.xml) could look like this .. code-block:: xml @@ -376,7 +429,7 @@ .. csv-table:: ATS Ant properties :header: "Property name", "Edit status", "Description" - ":hlm-p:`ats.server`", "[must]", "For example: ``4fio00105`` or ``catstresrv001.cats.noklab.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as ``80``. The host can be different depending on site and/or product." + ":hlm-p:`ats.server`", "[must]", "For example: ``4fio00105`` or ``catstresrv001.company.net:80``. Default server port is ``8080``, but it is not allowed between intra and Noklab. Because of this we need to define server port as ``80``. The host can be different depending on site and/or product." ":hlm-p:`ats.drop.location`", "[must]", "Server location (UNC path) to save the ATSDrop file, before sending to the ATS. For example: ``\\\\trwsem00\\some_folder\\``. In case, ``ats.script.type`` is set to ``import``, ATS doesn't need to have access to :hlm-p:`ats.drop.location`, its value can be any local folder on build machine, for example ``c:/temp`` (no network share needed)." ":hlm-p:`ats.product.name`", "[must]", "Name of the product to be tested." ":hlm-p:`ats.aste.testasset.location`", "[must]", "Location of SW Test Assets, if the TestAsset is not packaged then it is first compressed to a ``.zip`` file. It should be a UNC path." diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/stage_compilation.rst.inc.ftl --- a/buildframework/helium/doc/src/manual/stage_compilation.rst.inc.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/stage_compilation.rst.inc.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -105,9 +105,7 @@ ------------------ Enabling CTC integration - It is possible to enable CTC instrumenting while building with SBSv2. To proceed you need to define the **sbs.build.ctc** to true. - If default options are not satisfying (default command line arguments: "-i m"), you can override the **ctc.instrument.type** property to - define an another instrumentation type. Or if you need to define additional arguments you can then override - the argSet referenced by **ctc.build.options**. + + It is possible to enable CTC instrumenting while building with SBSv2. To proceed you need to define the ``ctc.enabled`` to true. If default options are not satisfying (default command line arguments: "-i m"), you can override the ``ctc.instrument.type`` property to define an another instrumentation type. Or if you need to define additional arguments you can then override the argSet referenced by ``ctc.build.options``. \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/stage_final.rst.inc.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/doc/src/manual/stage_final.rst.inc.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,64 @@ +<#-- +============================================================================ +Name : stage_final.rst.inc.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> + +.. index:: + single: Stage - Final operations + +Stage: Final operations +======================= + +Final operation are steps which could happen at the workflow completion. + + +Running a target at build completion +------------------------------------ + +Helium offers the possibility to run a final target despite any error which could occur during the build. +The configuration of the target is done using the **hlm.final.target** property. + +e.g: +:: + + + + +Running action on failure +------------------------- + +The signaling framework will automatically run all signalExceptionConfig in case of Ant failure at the +end of the build. + +This example shows how simple task can be run in case of failure: +:: + + + + + Signal: ${r'$'}{signal.name} + Message: ${r'$'}{signal.message} + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/stage_matti.rst.inc.ftl --- a/buildframework/helium/doc/src/manual/stage_matti.rst.inc.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/stage_matti.rst.inc.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -32,9 +32,9 @@ .. _`and the matti website`: http://trmatti1.nmp.nokia.com/help/ -The set up of parameters is very similar (a few less parameters and it mostly uses ATS values). The main difference is that once the drop file has been uploaded to the ATS server it uses MATTI to perform the tests and not ATS, this is achieved by calling the MATTIDrop.py script instead of the ATSE or ATS scripts when creating the drop file (the drop file contains the flash files and the ruby tests to be performed). +The set up of parameters is very similar (a few less parameters and it mostly uses ATS values). The main difference is that once the drop file has been uploaded to the ATS server it uses MATTI to perform the tests (the drop file contains the flash files, the ruby tests/sip profiles, data files, sis files and/or parameters file in xml format). -The following parameters are the ones that are not listed in the ATS parameters, all other parameters required are as listed in the ATS section above. +The following parameters are the ones that are not listed in the ATS parameters, all other parameters required are as listed in the ATS section above, which include :hlm-p:`ats.server`, :hlm-p:`ats.email.list`, :hlm-p:`ats.email.format`, :hlm-p:`ats.email.subject`, :hlm-p:`ats.testrun.name`, :hlm-p:`ats.product.name`, :hlm-p:`ats.flashfiles.minlimit`, :hlm-p:`ats.flash.images` and :hlm-p:`ats.upload.enabled`. * [must] - must be set by user * [recommended] - should be set by user but not mandatory @@ -43,34 +43,32 @@ .. csv-table:: ATS Ant properties :header: "Property name", "Edit status", "Description" - ":hlm-p:`matti.scripts`", "[must]", "The location of the test scrips as ruby test files i.e. .rb files." - ":hlm-p:`enabled.matti`", "[must]", "Enable MATTI testing to occur, if not present the target :hlm-t:`matti-test` will not run." - ":hlm-p:`template.file`", "[must]", "Location of the matti template file." - ":hlm-p:`ats.sis.images.dir`", "[recommended]", "Location of the the SIS installation files needed to flash to the phone (if required and present)." - ":hlm-p:`ats.script.type`", "[must]", "Always set to import, this means the MATTI server will retrieve the tests." - ":hlm-p:`ats.image.type`", "[must]", "Image type whether Engineering English or localised." - ":hlm-p:`ats.flashfiles.minlimit`", "[must]", "Minimum number of flash files required in to add to the drop file." - ":hlm-p:`tsrc.data.dir`", "[recommended]", "Test source code data directory. only required for testing the Ant MATTI code." - ":hlm-p:`ta.flag.list`", "[recommended]", "TA flag list." + ":hlm-p:`matti.enabled`", "[must]", "Enable MATTI testing to occur, if not present the target :hlm-t:`matti-test` will not run." + ":hlm-p:`matti.asset.location`", "[must]", "The location of the test asset where ruby test files, sip profiles, hardware data etc are located." + ":hlm-p:`matti.test.profiles`", "[must]", "Test profiles to be executed should be mentioned in this comma separated list e.g., 'bat, fute'." + ":hlm-p:`matti.sierra.enabled`", "[must]", "Mustbe set to 'true' if sierra is engine is to be used. If true .sip files are used otherwise .rb (ruby) files are used to execute tests-" + ":hlm-p:`matti.test.timeout`", "[must]", "Separate but similar property to ats.test.timeout for matti tests." + ":hlm-p:`matti.parameters`", "[must]", "Matti test parameters can be given through Matti parameters xml file." + ":hlm-p:`matti.sis.files`", "[must]", "There are special sis files required to execute with test execution. This is a comma separated list in which several sis files can be deifned in a certain format like '##' e.g. " + ":hlm-p:`matti.sierra.parameters`", "[must]", "Sierra parameters are set using this property. e.g. '--teardown --ordered'" + ":hlm-p:`matti.template.file`", "[allowed]", "Location of the matti template file." All you need to do is setup the following parameters: .. code-block:: xml - - - - - - + + + + + + + + + + - - - - - - In order to upload and view the test run you need to have a valid user ID and password that matches that in your ``.netrc`` file. To create the account open a web browser window and enter the name of the ats.server with /ATS at the end e.g. http://123456:80/ATS. Click on the link in the top right hand corner to create the account. To view the test run once your account is active you need to click on the 'test runs' tab. @@ -79,4 +77,4 @@ hlm -Dbuild.number=001 -Dbuild.drive=z: -Dcore.build.version=001 matti-test -If it displays the message 'Testdrop created!' with the file name then the ``MATTIDrops.py`` script has done what it needs to do. The next thing to check is that the drop file has been uploaded to the ATS server OK. If that is performed successfully then the rest of the testing needs to be performed by the ATS server. There is also a ``test.xml`` file created that contains details needed for debugging any problems that might occur. To determine if the tests have run correctly you need to read the test run details from the server. +If it displays the message 'Matti testdrop created successfully!', script has done what it needs to do. The next thing to check is that the drop file has been uploaded to the ATS server OK. If that is performed successfully then the rest of the testing needs to be performed by the ATS server. There is also a ``test.xml`` file created that contains details needed for debugging any problems that might occur. To determine if the tests have run correctly you need to read the test run details from the server. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/stage_preparation.rst.inc.ftl --- a/buildframework/helium/doc/src/manual/stage_preparation.rst.inc.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/stage_preparation.rst.inc.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -29,9 +29,31 @@ At the start of preparation a new directory is created for the build and subst'ed to ``build.drive``. If a directory with this name already exists, it is renamed to have a current timestamp on the end. .. index:: - single: How to prepare the build area? + single: How to prepare the build area + +How to prepare the build area +----------------------------- + +Helium supports the creation of an environment based on a release store in a network drive. The main requirement from that release is to publish release metadata with the content. + +.. csv-table:: Ant properties to modify + :header: "Property", "Description", "Values" -How to prepare the build area? ------------------------------- + ":hlm-p:`s60.grace.server`", "UNC path to network drive.", "" + ":hlm-p:`s60.grace.service`", "Service name.", "" + ":hlm-p:`s60.grace.product`", "Product name.", "" + ":hlm-p:`s60.grace.release`", "Regular expression to match release under the product directory.", "" + ":hlm-p:`s60.grace.revision`", "Regular expresion to match a new build revision", "e.g: (_\d+)?" + ":hlm-p:`s60.grace.cache`", + ":hlm-p:`s60.grace.checkmd5.enabled`", + ":hlm-p:`s60.grace.usetickler`", "Validate the release based on the tickler.", "true, false(default)" -TODO +Once configured you can invoke Helium: + + > hlm -Dbuild.number=1 -Dbuild.drive=X: ido-update-build-area-grace + + > dir X: + ... + ... + +You should then have the latest/mentioned release un-archived under the X: drive. \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/stages.rst.ftl --- a/buildframework/helium/doc/src/manual/stages.rst.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/stages.rst.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -1,6 +1,6 @@ <#-- ============================================================================ -Name : +Name : stages.rst.ftl Part of : Helium Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). @@ -46,7 +46,7 @@ .. include:: stage_releasing.rst.inc -Cenrep creation (S60 3.2.3 - 5.x) +Stage: Cenrep creation (S60 3.2.3 - 5.x) ================================= <#if !(ant?keys?seq_contains("sf"))> See: http://configurationtools.nmp.nokia.com/builds/cone/docs/cli/generate.html?highlight=generate @@ -109,10 +109,57 @@ .. include:: stage_matti.rst.inc -Check EPL License header. +Stage: Check EPL License header. ================================= The target ``check-sf-source-header`` could be used to run to validate the source files for EPL license header. * Include the target ``check-sf-source-header`` in the target sequence. -* This will validate source files present on the build area to contain EPL license. \ No newline at end of file +* This will validate source files present on the build area to contain EPL license. + +.. index:: + single: Compatibility Analyser (CA) + +Stage: Compatibility Analyser +============================= + +The Compatibility Analyser is a tool used to compare **binary** header and library files to ensure that the version being checked has not made any changes to the interfaces which may cause the code to not work correctly. Helium supplies a target that calls this Compatibility Analyser. Users who wish to use this tool first need to read the CA user guide found under SW DOcMan at: http://bhlns002.apac.nokia.com/symbian/symbiandevdm.nsf/WebAllByID2/DSX05526-EN/s60_compatibility_analyser_users_guide.doc. + +The Compatibility Analyser is supplied as part of SymSEE, there is a wiki page for the tool found at http://s60wiki.nokia.com/S60Wiki/Compatibility_Analyser. As part of the configuration a default BC template file has been provided at Helium\tools\quality\CompatibilityAnalyser\config_template.txt make the necessary changes to this file (as described in the user guide). The supplied example file works with CA versions 2.0.0 and above which is available in SymSEE version 12.1.0 and above. The configurations that will need changing are: + * BASELINE_SDK_DIR + * BASELINE_SDK_S60_VERSION + * CURRENT_SDK_DIR + * REPORT_FILE_HEADERS + * REPORT_FILE_LIBRARIES + +The default configuration is supplied as part of tools\quality\CompatibilityAnalyser\compatibilty.ant.xml where there are a few properties that need to be set (overriding of these is recommended in your own config file): + + +.. csv-table:: Compatibility Analyser Ant properties + :header: "Property name", "Edit status", "Description" + + ":hlm-p:`ca.enabled`", "[must]", "Enables the bc-check and ca-generate-diamond-summary targets to be executed, when set to true." + ":hlm-p:`bctools.root`", "[must]", "Place where the CheckBC and FilterBC tools are e.g. C:/APPS/carbide/plugins/com.nokia.s60tools.compatibilityanalyser.corecomponents_2.0.0/BCTools" + ":hlm-p:`default.bc.config`", "[must]", "Place where the CheckBC default configuration file is, it is copied from this location to the output folder for use by checkBC.py e.g. helium/tools/quality/compatibility_analyser/ca_config_template.txt" + ":hlm-p:`bc.config.dir`", "[must]", "The bc_config_template.txt file (default configuration file) will be copied from the folder it is saved in within helium to the location named in this property where it will be used ( in conjunction with the bc.config.file property). e.g. build.log.dir/bc" + ":hlm-p:`bc.config.file`", "[must]", "The bc_config_template.txt file (default configuration file) will be copied from the folder it is saved in within helium to the location named and named as defined in this property where it will be used. You need to make sure this is not the same name as any other IDO or person using the build area. e.g. bc.config.dir/bc.config" + ":hlm-p:`bc.check.libraries.enabled`", "[must]", "Enables the Binary Comparison for libraries when set to 'true'." + ":hlm-p:`lib.param.val`", "[must]", "Defines the parameter that checkBC.py is called with -la (all libraries checked) or -ls lib (single library checked) (lib = the name of library to check) or -lm file.name (multiple libraries checked) the file.name is a file that contains the names of the library(ies) to be checked." + ":hlm-p:`bc.check.headers.enabled`", "[must]", "Enables the Binary Comparison for headers when set to 'true'." + ":hlm-p:`head.param.val`", "[must]", "Defines the parameter that checkBC.py is called with -ha (all headers checked) or -hs file (single header checked) (file= name of header file to check) or -hm file.name (multiple headers checked) the file.name is a file that contains the names of the header(s) to be checked" + ":hlm-p:`bc.check.report.id`", "[must]", "Adds this to the CA output file name to give it a unique name." + ":hlm-p:`ido.ca.html.output.dir`", "[must]", "Defines the location of CA output and the input for the diamonds creation target. e.g. build.log.dir/build.id_ca" + +and then run the target: + +:: + + hlm -Dbuild.number=nnn -Dbuild.drive=n: bc_check + +where nnn is the build number and n: is the substed drive letter. + +The results of the output from the analysis are placed in the \output\logs\BC folder under the substed build drive and are called libraries_report_?.xml and headers_report_?.xml, the reports can be viewed in Web-formatted layout, based on the BBCResults.xsl stylesheet which is copied to the \output\logs\BC folder on the build drive. + + +.. include:: stage_final.rst.inc + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/manual/sysdef3.rst --- a/buildframework/helium/doc/src/manual/sysdef3.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/manual/sysdef3.rst Mon Sep 13 13:11:19 2010 +0800 @@ -8,7 +8,7 @@ How to configure the feature? ----------------------------- -In order to enable the support you first need to define the **schema.new** property to true. Then define a resource ant element to either +In order to enable the support you first need to define the **sysdef3.enabled** property to true. Then define a resource ant element to either point to root definition file or package_definition.xml file. e.g: @@ -40,8 +40,8 @@ The package_map.xml must be placed under the root directory of the package. **package_definition.xml** without package_map.xml are considered -as invalid by the copying step and the automatic root system definition file generation. Only exception to that rule is for the virtual package -which must be placed exactly two level under the root of the package. +as invalid by the copying step and the automatic root system definition file generation. Only exception to that rule is for the vendor +package_definition.xml which must be placed exactly two level under the root of the package. Example of package structure: :: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/doc/src/quick_start_guide.rst.ftl --- a/buildframework/helium/doc/src/quick_start_guide.rst.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/doc/src/quick_start_guide.rst.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -56,7 +56,7 @@ <#if ant?keys?seq_contains("sf")> -.. include:: sf.html +.. include:: sf.rst diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.5/4Suite_XML-1.0.2-py2.5-win32.egg Binary file buildframework/helium/external/python/lib/2.5/4Suite_XML-1.0.2-py2.5-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.5/PyXML-0.8.4-py2.5-win32.egg Binary file buildframework/helium/external/python/lib/2.5/PyXML-0.8.4-py2.5-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.5/lxml-1.3.5-py2.5-win32.egg Binary file buildframework/helium/external/python/lib/2.5/lxml-1.3.5-py2.5-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.6/4Suite_XML-1.0.2-py2.6-win32.egg Binary file buildframework/helium/external/python/lib/2.6/4Suite_XML-1.0.2-py2.6-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.6/PyXML-0.8.4-py2.6-win32.egg Binary file buildframework/helium/external/python/lib/2.6/PyXML-0.8.4-py2.6-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.6/easy-install.pth --- a/buildframework/helium/external/python/lib/2.6/easy-install.pth Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -import sys; sys.__plen = len(sys.path) -./PyXML-0.8.4-py2.6-win32.egg -./4Suite_XML-1.0.2-py2.6-win32.egg -./lxml-2.2.1-py2.6-win32.egg -import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/2.6/lxml-2.2.1-py2.6-win32.egg Binary file buildframework/helium/external/python/lib/2.6/lxml-2.2.1-py2.6-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/common/Amara-1.2.0.1-py2.5.egg Binary file buildframework/helium/external/python/lib/common/Amara-1.2.0.1-py2.5.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/common/Jinja2-2.2.1-py2.5.egg Binary file buildframework/helium/external/python/lib/common/Jinja2-2.2.1-py2.5.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/common/easy-install.pth --- a/buildframework/helium/external/python/lib/common/easy-install.pth Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/external/python/lib/common/easy-install.pth Mon Sep 13 13:11:19 2010 +0800 @@ -1,14 +1,11 @@ import sys; sys.__plen = len(sys.path) ./setuptools-0.6c5-py2.5.egg -./Amara-1.2.0.1-py2.5.egg ./coverage-2.85-py2.5.egg ./docutils-0.5-py2.5.egg ./epydoc-3.0beta1-py2.5.egg ./Jinja-1.2-py2.5-win32.egg -./Jinja2-2.2.1-py2.5.egg ./nose-0.11.1-py2.6.egg ./mocker-0.10.1-py2.5.egg -./path-2.2-py2.5.egg ./pygments-0.10-py2.5.egg ./simplejson-1.9.1-py2.5-win32.egg ./sphinx-0.5.1-py2.5.egg diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/common/path-2.2-py2.5.egg Binary file buildframework/helium/external/python/lib/common/path-2.2-py2.5.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/common/threadpool.py --- a/buildframework/helium/external/python/lib/common/threadpool.py Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,337 +0,0 @@ - -# -*- coding: UTF-8 -*- -"""Easy to use object-oriented thread pool framework. - -A thread pool is an object that maintains a pool of worker threads to perform -time consuming operations in parallel. It assigns jobs to the threads -by putting them in a work request queue, where they are picked up by the -next available thread. This then performs the requested operation in the -background and puts the results in a another queue. - -The thread pool object can then collect the results from all threads from -this queue as soon as they become available or after all threads have -finished their work. It's also possible, to define callbacks to handle -each result as it comes in. - -The basic concept and some code was taken from the book "Python in a Nutshell" -by Alex Martelli, copyright 2003, ISBN 0-596-00188-6, from section 14.5 -"Threaded Program Architecture". I wrapped the main program logic in the -ThreadPool class, added the WorkRequest class and the callback system and -tweaked the code here and there. Kudos also to Florent Aide for the exception -handling mechanism. - -Basic usage: - ->>> pool = TreadPool(poolsize) ->>> requests = makeRequests(some_callable, list_of_args, callback) ->>> [pool.putRequest(req) for req in requests] ->>> pool.wait() - -See the end of the module code for a brief, annotated usage example. - -Website : http://chrisarndt.de/en/software/python/threadpool/ -""" - -__all__ = [ - 'makeRequests', - 'NoResultsPending', - 'NoWorkersAvailable', - 'ThreadPool', - 'WorkRequest', - 'WorkerThread' -] - -__author__ = "Christopher Arndt" -__version__ = "1.2.3" -__revision__ = "$Revision: 1.5 $" -__date__ = "$Date: 2006/06/23 12:32:25 $" -__license__ = 'Python license' - -# standard library modules -import sys -import threading -import Queue - -# exceptions -class NoResultsPending(Exception): - """All work requests have been processed.""" - pass - -class NoWorkersAvailable(Exception): - """No worker threads available to process remaining requests.""" - pass - -# classes -class WorkerThread(threading.Thread): - """Background thread connected to the requests/results queues. - - A worker thread sits in the background and picks up work requests from - one queue and puts the results in another until it is dismissed. - """ - - def __init__(self, requestsQueue, resultsQueue, **kwds): - """Set up thread in daemonic mode and start it immediatedly. - - requestsQueue and resultQueue are instances of Queue.Queue passed - by the ThreadPool class when it creates a new worker thread. - """ - - threading.Thread.__init__(self, **kwds) - self.setDaemon(1) - self.workRequestQueue = requestsQueue - self.resultQueue = resultsQueue - self._dismissed = threading.Event() - self.start() - - def run(self): - """Repeatedly process the job queue until told to exit.""" - - while not self._dismissed.isSet(): - # thread blocks here, if queue empty - request = self.workRequestQueue.get() - if self._dismissed.isSet(): - # if told to exit, return the work request we just picked up - self.workRequestQueue.put(request) - break # and exit - try: - self.resultQueue.put( - (request, request.callable(*request.args, **request.kwds)) - ) - except: - request.exception = True - self.resultQueue.put((request, sys.exc_info())) - - def dismiss(self): - """Sets a flag to tell the thread to exit when done with current job. - """ - - self._dismissed.set() - - -class WorkRequest: - """A request to execute a callable for putting in the request queue later. - - See the module function makeRequests() for the common case - where you want to build several WorkRequests for the same callable - but with different arguments for each call. - """ - - def __init__(self, callable, args=None, kwds=None, requestID=None, - callback=None, exc_callback=None): - """Create a work request for a callable and attach callbacks. - - A work request consists of the a callable to be executed by a - worker thread, a list of positional arguments, a dictionary - of keyword arguments. - - A callback function can be specified, that is called when the results - of the request are picked up from the result queue. It must accept - two arguments, the request object and the results of the callable, - in that order. If you want to pass additional information to the - callback, just stick it on the request object. - - You can also give a callback for when an exception occurs. It should - also accept two arguments, the work request and a tuple with the - exception details as returned by sys.exc_info(). - - requestID, if given, must be hashable since it is used by the - ThreadPool object to store the results of that work request in a - dictionary. It defaults to the return value of id(self). - """ - - if requestID is None: - self.requestID = id(self) - else: - try: - hash(requestID) - except TypeError: - raise TypeError("requestID must be hashable.") - self.requestID = requestID - self.exception = False - self.callback = callback - self.exc_callback = exc_callback - self.callable = callable - self.args = args or [] - self.kwds = kwds or {} - - -class ThreadPool: - """A thread pool, distributing work requests and collecting results. - - See the module doctring for more information. - """ - - def __init__(self, num_workers, q_size=0): - """Set up the thread pool and start num_workers worker threads. - - num_workers is the number of worker threads to start initialy. - If q_size > 0 the size of the work request queue is limited and - the thread pool blocks when the queue is full and it tries to put - more work requests in it (see putRequest method). - """ - - self.requestsQueue = Queue.Queue(q_size) - self.resultsQueue = Queue.Queue() - self.workers = [] - self.workRequests = {} - self.createWorkers(num_workers) - - def createWorkers(self, num_workers): - """Add num_workers worker threads to the pool.""" - - for i in range(num_workers): - self.workers.append(WorkerThread(self.requestsQueue, - self.resultsQueue)) - - def dismissWorkers(self, num_workers): - """Tell num_workers worker threads to quit after their current task. - """ - - for i in range(min(num_workers, len(self.workers))): - worker = self.workers.pop() - worker.dismiss() - - def addWork(self, callable, args=None, kwds=None, requestID=None, callback=None, exc_callback=None, block=True, timeout=0): - request = WorkRequest(callable, args, kwds, requestID, callback, exc_callback) - self.putRequest(request, block, timeout) - - def putRequest(self, request, block=True, timeout=0): - """Put work request into work queue and save its id for later.""" - - assert isinstance(request, WorkRequest) - self.requestsQueue.put(request, block, timeout) - self.workRequests[request.requestID] = request - - def poll(self, block=False): - """Process any new results in the queue.""" - - while True: - # still results pending? - if not self.workRequests: - raise NoResultsPending - # are there still workers to process remaining requests? - elif block and not self.workers: - raise NoWorkersAvailable - try: - # get back next results - request, result = self.resultsQueue.get(block=block) - # has an exception occured? - if request.exception and request.exc_callback: - request.exc_callback(request, result) - # hand results to callback, if any - if request.callback and not \ - (request.exception and request.exc_callback): - request.callback(request, result) - del self.workRequests[request.requestID] - except Queue.Empty: - break - - def wait(self): - """Wait for results, blocking until all have arrived.""" - - while 1: - try: - self.poll(True) - except NoResultsPending: - break - -# helper functions -def makeRequests(callable, args_list, callback=None, exc_callback=None): - """Create several work requests for same callable with different arguments. - - Convenience function for creating several work requests for the same - callable where each invocation of the callable receives different values - for its arguments. - - args_list contains the parameters for each invocation of callable. - Each item in 'args_list' should be either a 2-item tuple of the list of - positional arguments and a dictionary of keyword arguments or a single, - non-tuple argument. - - See docstring for WorkRequest for info on callback and exc_callback. - """ - - requests = [] - for item in args_list: - if isinstance(item, tuple): - requests.append( - WorkRequest(callable, item[0], item[1], callback=callback, - exc_callback=exc_callback) - ) - else: - requests.append( - WorkRequest(callable, [item], None, callback=callback, - exc_callback=exc_callback) - ) - return requests - -################ -# USAGE EXAMPLE -################ - -if __name__ == '__main__': - import random - import time - - # the work the threads will have to do (rather trivial in our example) - def do_something(data): - time.sleep(random.randint(1, 5)) - result = round(random.random() * data, 5) - # just to show off, we throw an exception once in a while - if result > 3: - raise RuntimeError("Something extraordinary happened!") - return result - - # this will be called each time a result is available - def print_result(request, result): - print "**Result: %s from request #%s" % (result, request.requestID) - - # this will be called when an exception occurs within a thread - def handle_exception(request, exc_info): - print "Exception occured in request #%s: %s" % \ - (request.requestID, exc_info[1]) - - # assemble the arguments for each job to a list... - data = [random.randint(1, 10) for i in range(20)] - # ... and build a WorkRequest object for each item in data - requests = makeRequests(do_something, data, print_result, handle_exception) - - # or the other form of args_lists accepted by makeRequests: ((,), {}) - data = [((random.randint(1, 10), ), {}) for i in range(20)] - requests.extend( - makeRequests(do_something, data, print_result, handle_exception) - ) - - # we create a pool of 3 worker threads - main = ThreadPool(3) - - # then we put the work requests in the queue... - for req in requests: - main.putRequest(req) - print "Work request #%s added." % req.requestID - # or shorter: - # [main.putRequest(req) for req in requests] - - # ...and wait for the results to arrive in the result queue - # by using ThreadPool.wait(). This would block until results for - # all work requests have arrived: - # main.wait() - - # instead we can poll for results while doing something else: - i = 0 - while 1: - try: - main.poll() - print "Main thread working..." - time.sleep(0.5) - if i == 10: - print "Adding 3 more worker threads..." - main.createWorkers(3) - i += 1 - except KeyboardInterrupt: - print "Interrupted!" - break - except NoResultsPending: - print "All results collected." - break - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/linux/4Suite-XML-1.0.2.tar.gz Binary file buildframework/helium/external/python/lib/linux/4Suite-XML-1.0.2.tar.gz has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/linux/PyXML-0.8.4.tar.gz Binary file buildframework/helium/external/python/lib/linux/PyXML-0.8.4.tar.gz has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/linux/easy-install.pth --- a/buildframework/helium/external/python/lib/linux/easy-install.pth Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -import sys; sys.__plen = len(sys.path) -./PyXML-0.8.4.egg -./4Suite_XML-1.0.2.egg -./lxml-1.3.6.egg -import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/external/python/lib/linux/lxml-1.3.6.tgz Binary file buildframework/helium/external/python/lib/linux/lxml-1.3.6.tgz has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/helium.ant.xml --- a/buildframework/helium/helium.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/helium.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -24,9 +24,9 @@ Main full build targets and properties + - - + - - - - - - - - - - ant: antProperties() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Using build drive ${build.drive} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Reading from existing build number property file. - - Build int = ${build.int} - - - - - - - - - - - History comments: -${build.int.db.file.comments} - - - Writing incremented build int back to file. - - - - - - - -${build.int.db.file.comments} -# history: ${env.COMPUTERNAME};${env.USERNAME};${build.int.db.file.tstamp};${build.int} - - - - Build number property file not found. Creating a new one. - - - - Build number = ${build.number} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -643,28 +71,8 @@ + - - - - - - - - + - - - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/helium_preinclude.ant.xml --- a/buildframework/helium/helium_preinclude.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/helium_preinclude.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -24,19 +24,9 @@ - Helium task definations. User can import this file and use helium and helium-antlib tasks. + Users can import this file and use Helium and external tasks. - - - - - - - - - - - + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/hlm --- a/buildframework/helium/hlm Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/hlm Mon Sep 13 13:11:19 2010 +0800 @@ -16,13 +16,13 @@ # Description: # if [ ! $HELIUM_HOME ] ; then - export HELIUM_HOME=$(dirname $(readlink /proc/$$/fd/255)) + export HELIUM_HOME=$(dirname $(readlink -f $0)) fi export LANG="en_US.UTF-8" -export ANT_ARGS="-lib $HELIUM_HOME/extensions/nokia/external/antlibs2 -lib $HELIUM_HOME/external/antlibs2 -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.diamonds.ant.HeliumListener -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener" +export ANT_ARGS="-lib $HELIUM_HOME/external/antlibs2 -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener" -TEMP_PYTHONPATH="$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/external/python/lib/auto:$HELIUM_HOME/tools/common/python/scripts:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib" +TEMP_PYTHONPATH="$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/external/python/lib/auto:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib" TEMP_PERL5LIB="$HELIUM_HOME/tools/common/packages" if [ ! $PERL5LIB ] ; then @@ -74,14 +74,14 @@ fi if [ ! -f "$HELIUM_HOME/external/antlibs2/helium-checktools-1.0.jar" ] ; then - echo A required jar '$HELIUM_HOME/external/antlibs2/helium-checktools-1.0.jar' is missing. Verification of basic tools used by Helium cannot be done. Contact Helium support. + echo "Please build helium from nokia_builder or builder dir run 'bld && bld get-deps'" exit 1 else java -cp "$HELIUM_HOME/external/antlibs2/helium-checktools-1.0.jar" com.nokia.helium.checktools.HeliumToolsCheckerMain -config "$HELIUM_HOME/config/helium.basic.tools.config" if [ $? -eq 0 ] ; then - exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$PYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $* + exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$JYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $* else - echo Build aborted with error + exit 1 fi fi diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/hlm.bat --- a/buildframework/helium/hlm.bat Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/hlm.bat Mon Sep 13 13:11:19 2010 +0800 @@ -4,3 +4,92 @@ helium\hlm.bat %* +perl "%HELIUM_HOME%\tools\common\bin\getppid.pl" > %TEMP%\%USERNAME%pid.txt +set /p PID=< %TEMP%\%USERNAME%pid.txt + +if not defined HLM_DISABLE_INTERNAL_DATA ( +set INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener +) + + +REM Configure listener to generate target times csv file. +REM **Note: Comment below line if you want to skip the target times csv file generation +set TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener + + +if not defined ANT_ARGS ( +set ANT_ARGS=-lib "%HELIUM_HOME%\external\antlibs2" -logger com.nokia.ant.HeliumLogger %INTERNAL_DATA_ANT_ARGS% %SIGNALING_ANT_ARGS% %LOGGING_ANT_ARGS% %TARGET_TIMES_GENERATOR% -listener com.nokia.helium.environment.ant.listener.ExecListener +) + +REM Shall we impose the EPOCROOT? +if not defined EPOCROOT ( +set EPOCROOT=\ +) + +REM Symbian Build area path related settings +set PATH=%PATH%;%EPOCROOT%epoc32\tools;%EPOCROOT%epoc32\gcc\bin;%EPOCROOT%epoc32\tools\build;%EPOCROOT%epoc32\rombuild + +set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\unxutils +set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\Subversion\bin +set PATH=%PATH%;%HELIUM_HOME%\extensions\nokia\external\graphviz\bin + +for /f "tokens=2" %%a in ('"python -V 2>&1"') do (set pythonversion=%%a) +for /f "tokens=1-2 delims=." %%a in ("%pythonversion%") do (set pythonversion=%%a.%%b) + +set PYTHONPATH=%HELIUM_HOME%\external\python\lib\auto;%HELIUM_HOME%\external\python\lib\%pythonversion% +set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\external\python\lib\common +set PYTHONPATH=%PYTHONPATH%;%HELIUM_HOME%\extensions\nokia\external\python\lib\%pythonversion% +set PYTHONPATH=%PYTHONPATH%;%SBS_HOME%\python +set PERL5LIB=%HELIUM_HOME%\tools\common\packages +set COPYCMD=/y + +REM Should be done that SYMSEE? +set PATH=%PATH%;C:\APPS\ctc + +REM Nokia specific +set HOME=h:\ +set ARMROOT=\ + + +REM Manage RVCT switching. +if defined HLM_RVCT_VERSION ( +if not exist "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" ( echo *** "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" cannot be found & goto :errorstop ) +call "C:\APPS\rvct%HLM_RVCT_VERSION%\rvctcmdprompt.bat" > nul +) +TITLE Helium + +if not exist "%HELIUM_HOME%\external\antlibs2\helium-checktools-1.0.jar" ( +echo *** Error: Please build helium from nokia_builder or builder dir run "bld && bld get-deps" +goto errorstop +) + +call "%JAVA_HOME%\bin\java" -cp "%HELIUM_HOME%\external\antlibs2\helium-checktools-1.0.jar" com.nokia.helium.checktools.HeliumToolsCheckerMain -config "%HELIUM_HOME%\config\helium.basic.tools.config" +if not defined HLM_DISABLE_TOOL_CHECK ( +if "%ERRORLEVEL%" neq "0" (goto errorstop) +) + +REM Call the Helium generated batch file if it exists +if defined JOB_ID ( + set HELIUM_CACHE_DIR="%TEMP%\helium\%USERNAME%\%JOB_ID%" +)ELSE set HELIUM_CACHE_DIR="%TEMP%\helium\%USERNAME%" + +if not exist %HELIUM_CACHE_DIR% ( +md %HELIUM_CACHE_DIR% +) + +REM pass cache dir to a property for log4j log file +if not defined ANT_OPTS ( + set ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=%HELIUM_CACHE_DIR% -Dpython.verbose=warning + call "%HELIUM_HOME%\external\python\configure_jython.bat" +) + +call ant -Dhelium.dir="%HELIUM_HOME%" -Dcache.dir=%HELIUM_CACHE_DIR% %* + +endlocal +goto :eof + +:errorstop +@echo *** Build aborted with error +exit /b 1 + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/4Suite-XML-1.0.2.tar.gz Binary file buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/4Suite-XML-1.0.2.tar.gz has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/4Suite_XML-1.0.2.py2.6-win32.egg Binary file buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/4Suite_XML-1.0.2.py2.6-win32.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/ivy.xml --- a/buildframework/helium/sf/deps/amara/4Suite_XML/1.0.2/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/amara/amara/1.2.0.1/amara-1.2.0.1.egg Binary file buildframework/helium/sf/deps/amara/amara/1.2.0.1/amara-1.2.0.1.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/amara/amara/1.2.0.1/ivy.xml --- a/buildframework/helium/sf/deps/amara/amara/1.2.0.1/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/com.nokia.helium.config/helium-sf-config/1.0/ivy.xml --- a/buildframework/helium/sf/deps/com.nokia.helium.config/helium-sf-config/1.0/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/deps/com.nokia.helium.config/helium-sf-config/1.0/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -41,6 +41,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/org.apache.xml/serializer/1.0/serializer-1.0.jar Binary file buildframework/helium/sf/deps/org.apache.xml/serializer/1.0/serializer-1.0.jar has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/org.apache.xml/serializer/2.7.0/serializer-2.7.0.jar Binary file buildframework/helium/sf/deps/org.apache.xml/serializer/2.7.0/serializer-2.7.0.jar has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/org.apache.xml/xalan/1.0/xalan-1.0.jar Binary file buildframework/helium/sf/deps/org.apache.xml/xalan/1.0/xalan-1.0.jar has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/org.apache.xml/xalan/2.7.0/xalan-2.7.0.jar Binary file buildframework/helium/sf/deps/org.apache.xml/xalan/2.7.0/xalan-2.7.0.jar has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/py_dom_xpath/py_dom_xpath/0.1/ivy.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/deps/py_dom_xpath/py_dom_xpath/0.1/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,33 @@ + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/py_dom_xpath/py_dom_xpath/0.1/py_dom_xpath-0.1.py2.6.egg Binary file buildframework/helium/sf/deps/py_dom_xpath/py_dom_xpath/0.1/py_dom_xpath-0.1.py2.6.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/pyxml/pyxml/0.8.4/ivy.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/deps/pyxml/pyxml/0.8.4/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,33 @@ + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/pyxml/pyxml/0.8.4/pyxml-0.8.4.py2.6.egg Binary file buildframework/helium/sf/deps/pyxml/pyxml/0.8.4/pyxml-0.8.4.py2.6.egg has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/deps/xpath-task/xpath-task/0.1/xpath-task-0.1.jar Binary file buildframework/helium/sf/deps/xpath-task/xpath-task/0.1/xpath-task-0.1.jar has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/doc/src/structure.rst --- a/buildframework/helium/sf/doc/src/structure.rst Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -============================== -Project Development guidelines -============================== - - -Helium now contains its Java and Python components into its structure. Its main requirements to build the delivery are: - * Ant 1.7.0 - * JDK 1.6 or newer - * Python 2.6 - -The project is split in several sub-modules which cover specific features. - -Anatomy of the project -====================== - -:: - - + builder - - build.xml - - bld.bat - - bld - + antlibs - Ant specific dependencies needed to execute ant properly - e.g: Java checkstyle, Code coverage tools - The jar in that folder will not be used as compilation dependencies - + - + doc - General documentation of the project - + settings - + ivysettings.xml - + deps - + - + - + - - -.jar - + ... - + java - + component1 - + componentn ... - + python - + component1 - + componentn ... - + ... - - -Anatomy of a Component -====================== - -A component is a self contained structure which implements a set of feature related to a specific domain (e.g: Diamonds, SCM). The following diagram shows -the physical structure of a component. - -:: - - + - - build.xml - - ivy.xml - + src - + com - + nokia - + helium - + - + ant - + taskdefs - source of the Ant tasks - + types - source of the Ant DataType - + listeners - source of the Ant Listener - + conditions - source of the Ant Conditions - + tests - - build.xml - - bld.bat - - bld.sh - + antunits - - test_xxx.ant.xml* - Unittest implemented using AntUnit - + data - data used for the the unittests. - + src - + com - + nokia - + helium - + - + tests - source of junit unittests. - -The build.xml -------------- - -This is simplest file you must have at component level, **** is really important -as it defines the future name of the jar file. -:: - - - Component build file. - - - -The ivy.xml ------------ - -The ivy.xml is used to gather the relevant dependencies to build your component, and to order -the build of the components correctly: - -:: - - - - - - - - - - - -More info about Ivy can be found from: http://ant.apache.org/ivy/ - -Antunit files -------------- - -The builder will automatically test all the antunit files from /tests/antunits. -Test must be written by keeping in mind that src tree must remain unmodified after the testing (please use the test.temp.dir). - -Example of test file: -:: - - - Helium unittests. - - - - - - - - - - - - - - - - - - - -General guidelines -================== - -Source code license -------------------- -Each file added to the project should include the following license header. -:: - - /* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -Documentation -------------- - -All classes and methods must be documented. Ant facade classes (like Task or DataType) -must be Antdoclet documented (preferably with usage example). - -You can find more information on how to document Ant task using the Antdoclet plugin on http://antdoclet.neuroning.com/. - -General coding guidelines -------------------------- - - * Java components must not use getProperty() with hardcoded name coming from helium (e.g: getProject().getProperty("helium.dir")), only exceptions: - * Ant Listeners (name of the property must be link to the listener not to helium!) - * Code under the legacy component. - * It is forbidden to share unittest data between components (else it breaks the self-contained principle). - -Logging -------- - -Developer must preferably use standard Ant logging for any user log output. -Internal debug logging must be implemented using Log4J framework. - - * ANT Listeners must use log4j logging framework - using Ant logging system might cause some looping issues. - * Ant Type and Task must use the Ant logging mechanism to report to the user. - * Generic framework (part of the code which doesn't links to Ant directly) must use Log4J. - * Usage of System.out.println should be avoided. - * All the non-handled exceptions should be considered as errors and should be reported as such: - * use log("message", Project.MSG_ERR) under Ant - * log.error() otherwise. - * Exception to this rule must be clearly commented under the code. - * Debug information: - * Log4J framework (log.debug()) must be used to push information to the Helium debug log - so debug information are not - directly visible by the user. - * Ant logging framework can also be use to log Type/Task debug info (but log4j is preferred). - * PrintStackTrace method should be used on below scenario's: - * At the time of unknown exception. - * Should be used with exceptions other than BuildException. - * In case it is difficult to debug the issue with Exception.getMessage(). - * use this method during debugging complex issue (this doesn't mean the line should remain in the code after development). - * When it is required to print the all the information about the occurring Exception. - - -This is an example on how to use logging: -:: - - import org.apache.log4j.Logger; - - class MyClass extends Task { - private static Logger log = Logger.getLogger(MyClass.class); - - public void execute() { - log("Executing..."); - log.debug("some useful debug information."); - } - } - - -Please find more information on Log4J from the online manual: http://logging.apache.org/log4j/1.2/manual.html. - - -Exception ---------- - -Exceptional event reporting and handling is crutial in software development. Developer must make sure it is done accordingly -to the framework it is currently using: - - * To report a build failure under Ant the BuildException must be used. - But we have to keep in mind that a BuildException is not tracked because it derives from the RuntimeError type. - So we have to be careful with those and try to limit their puprose to the original usage: Ant build failure. - * It is preferable to have meaningful exception type like: FileNotFoundException. - * Developer should try to avoid as much as possible the throw or catch raw type of exception like Exception, RuntimeError. - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/AntMacros.java --- a/buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/AntMacros.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/AntMacros.java Mon Sep 13 13:11:19 2010 +0800 @@ -31,8 +31,9 @@ */ public void add(String macro) { for (MacroHolder mh : antMacros) { - if (mh.equals(macro)) + if (mh.equals(macro)) { return; + } } this.antMacros.add(new MacroHolder(macro)); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/AntScriptDefs.java --- a/buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/AntScriptDefs.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/AntScriptDefs.java Mon Sep 13 13:11:19 2010 +0800 @@ -31,8 +31,9 @@ */ public void add(String scriptDef) { for (ScriptDefHolder sh : antScriptdefs) { - if (sh.equals(scriptDef)) + if (sh.equals(scriptDef)) { return; + } } this.antScriptdefs.add(new ScriptDefHolder(scriptDef)); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/listener/HlmAntUnitListener.java --- a/buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/listener/HlmAntUnitListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antcoverage/src/com/nokia/helium/ant/coverage/listener/HlmAntUnitListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -206,8 +206,7 @@ Hashtable projectTargets = project.getTargets(); Enumeration targetEnum = projectTargets.keys(); while (targetEnum.hasMoreElements()) { - String key = targetEnum.nextElement(); - System.out.println(key + ": " + projectTargets.get(key)); + String key = targetEnum.nextElement(); if (!isAntUnitTestTarget(key) && key.length() > 0) { antTargets.add((Target) projectTargets.get(key)); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/ivy.xml --- a/buildframework/helium/sf/java/antdata/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -30,6 +30,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntComment.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntComment.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntComment.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,12 +17,11 @@ package com.nokia.helium.ant.data; -import java.io.IOException; import java.text.BreakIterator; import java.util.HashMap; import java.util.StringTokenizer; -import org.apache.tools.ant.Project; +import org.apache.log4j.Logger; import org.dom4j.Comment; import org.dom4j.Node; @@ -31,17 +30,19 @@ * fileset, etc. It should preceed the object. */ public class AntComment { + private static Logger log = Logger.getLogger(AntComment.class); + private String summary = ""; private String parsedDocText = ""; private HashMap tags; private String objectName = ""; private boolean isMarkedComment; - public AntComment() throws IOException { + public AntComment() { this(null); } - public AntComment(Comment comment) throws IOException { + public AntComment(Comment comment) { tags = new HashMap(); if (comment != null) { @@ -60,7 +61,7 @@ String[] splitStrings = text.split("\\s", 3); objectName = splitStrings[1]; if (objectName == null) { - log("Comment block: object name is not defined.", Project.MSG_WARN); + log.warn("Comment block: object name is not defined."); objectName = ""; } if (splitStrings.length > 2) { @@ -74,7 +75,7 @@ } } - private void parseCommentText(String text) throws IOException { + private void parseCommentText(String text) { if (text.length() > 0) { StringTokenizer tokenizer = new StringTokenizer(text, "@"); @@ -96,8 +97,9 @@ while (tokenizer.hasMoreElements()) { String tagText = (String) tokenizer.nextElement(); String[] tagParts = tagText.split("\\s", 2); - if (tagParts.length > 1) + if (tagParts.length > 1) { tags.put(tagParts[0], tagParts[1].trim()); + } } } } @@ -161,10 +163,6 @@ public boolean isMarkedComment() { return isMarkedComment; } - - private void log(String string, int msgWarn) { - System.out.println(string); - } /** * Clean the whitespace of the doc text. @@ -173,7 +171,6 @@ */ static String getCleanedDocNodeText(Node docNode) { Node preceedingWhitespaceNode = docNode.selectSingleNode("preceding-sibling::text()"); - // System.out.println(whitespace); int indent = 0; if (preceedingWhitespaceNode != null) { String text = preceedingWhitespaceNode.getText(); @@ -181,8 +178,6 @@ if (lines.length > 0) { indent = lines[lines.length - 1].length(); } - // System.out.println("indent: " + lines[lines.length - - // 1].length()); } String text = docNode.getText(); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntFile.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntFile.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntFile.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,16 +18,19 @@ package com.nokia.helium.ant.data; import java.io.File; +import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.tools.ant.Project; import org.dom4j.Document; -import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.Node; -import org.dom4j.io.SAXReader; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.XMLReader; +import org.xml.sax.helpers.XMLReaderFactory; /** * An Ant build file. It could be a project file or an antlib file. @@ -46,22 +49,33 @@ public AntFile(Database database, String path, String scope) throws IOException { this.database = database; this.path = new File(path); - SAXReader xmlReader = new SAXReader(); - try { - doc = xmlReader.read(path); + + readDoc(); + Element node = doc.getRootElement(); + if (node.getName().equals("project")) { + fileObjectMeta = new ProjectMeta(this, node); + } + else { + fileObjectMeta = new AntlibMeta(this, node); + } + + fileObjectMeta.setScopeFilter(scope); + fileObjectMeta.setRuntimeProject(rootProject); - Element node = doc.getRootElement(); - if (node.getName().equals("project")) { - fileObjectMeta = new ProjectMeta(this, node); - } - else { - fileObjectMeta = new AntlibMeta(this, node); - } + } - fileObjectMeta.setScopeFilter(scope); - fileObjectMeta.setRuntimeProject(rootProject); + private void readDoc() throws IOException { + try { + DocumentFactoryWithLocator documentFactory = new DocumentFactoryWithLocator(); + SAXContentHandlerExt contentHandler = new SAXContentHandlerExt(documentFactory); + documentFactory.setContentHandler(contentHandler); + XMLReader xmlReader = XMLReaderFactory.createXMLReader(); + xmlReader.setContentHandler(contentHandler); + xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", contentHandler); + xmlReader.parse(new InputSource(new FileReader(path))); + doc = contentHandler.getDocument(); } - catch (DocumentException e) { + catch (SAXException e) { throw new IOException(e.getMessage()); } } @@ -83,9 +97,8 @@ * Get the meta object for the Ant project in this build file. * * @return The project meta object. - * @throws DocumentException */ - public RootAntObjectMeta getRootObjectMeta() throws IOException { + public RootAntObjectMeta getRootObjectMeta() { return fileObjectMeta; } @@ -107,8 +120,7 @@ Element node = doc.getRootElement(); List antlibFiles = new ArrayList(); if (node.getName().equals("project")) { - List typedefs = node - .selectNodes("//*[namespace-uri()='http://www.nokia.com/helium' and local-name()='typedef']"); + List typedefs = node.selectNodes("//*[namespace-uri()='http://www.nokia.com/helium' and local-name()='typedef']"); for (Node typedefNode : typedefs) { String filePath = ((Element) typedefNode).attributeValue("file"); filePath = getProject().replaceProperties(filePath); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntObjectMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntObjectMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntObjectMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,7 +17,7 @@ package com.nokia.helium.ant.data; -import java.io.IOException; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,19 +33,22 @@ */ public class AntObjectMeta { - public static final Map SCOPES = new HashMap() { - { - put("public", new Integer(1)); - put("protected", new Integer(2)); - put("private", new Integer(3)); - } - }; + public static final Map SCOPES; + + static { + Map tempMap = new HashMap(); + tempMap.put("public", new Integer(1)); + tempMap.put("protected", new Integer(2)); + tempMap.put("private", new Integer(3)); + SCOPES = Collections.unmodifiableMap(tempMap); + } + /** The default scope if an element does not have a defined scope. */ public static final String DEFAULT_SCOPE = "public"; private static AntComment emptyComment; - private Project rootProject; + private Project runtimeProject; /** The parent meta object. */ private AntObjectMeta parent; @@ -55,12 +58,7 @@ private AntComment comment = emptyComment; static { - try { - emptyComment = new AntComment(); - } - catch (IOException e) { - e.printStackTrace(); - } + emptyComment = new AntComment(); } /** @@ -68,20 +66,19 @@ * * @param parent The parent meta object. * @param node The XML node of the Ant object. - * @throws IOException */ - public AntObjectMeta(AntObjectMeta parent, Node node) throws IOException { + public AntObjectMeta(AntObjectMeta parent, Node node) { this.parent = parent; this.node = node; processComment(); } public Project getRuntimeProject() { - return rootProject; + return runtimeProject; } public void setRuntimeProject(Project project) { - this.rootProject = project; + this.runtimeProject = project; } /** @@ -142,15 +139,6 @@ String name = getAttr("name"); if (name.length() == 0) { name = getComment().getObjectName(); -// if (name.length() == 0) { -// try { -// System.out.println("name is 0 length: " + getLocation()); -// // System.out.println(node.toString()); -// } -// catch (IOException e) { -// e.printStackTrace(); -// } -// } } return name; } @@ -159,11 +147,14 @@ * Returns the location path of the object. * * @return Location path string. - * @throws IOException */ - public String getLocation() throws IOException { + public String getLocation() { RootAntObjectMeta rootMeta = getRootMeta(); - return rootMeta.getFile().getCanonicalPath(); + String location = rootMeta.getFilePath(); + if (node instanceof ElementWithLocation) { + location += ":" + ((ElementWithLocation)node).getLineNumber(); + } + return location; } /** @@ -203,7 +194,7 @@ throw new IllegalArgumentException("Invalid scope filter: " + scopeFilter); } String scope = getScope(); - if (!SCOPES.containsKey(scope)) { + if (scope.length() > 0 && !SCOPES.containsKey(scope)) { log("Invalid scope: " + scope + ", " + toString(), Project.MSG_WARN); return false; } @@ -219,6 +210,16 @@ public String getDeprecated() { return comment.getTagValue("deprecated"); } + + /** + * Returns the content of the "since" tag that should indicate which release this feature + * was first added. + * + * @return Since release number. + */ + public String getSince() { + return comment.getTagValue("since"); + } /** * Returns the source XML of the object. @@ -246,7 +247,7 @@ this.comment = comment; } - private void processComment() throws IOException { + private void processComment() { Comment commentNode = getCommentNode(); if (commentNode != null) { comment = new AntComment(commentNode); @@ -289,4 +290,8 @@ project.log(text, level); } } + + public String toString() { + return getName(); + } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntlibMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntlibMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/AntlibMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ package com.nokia.helium.ant.data; import java.io.IOException; -import org.dom4j.DocumentException; + import org.dom4j.Element; /** @@ -26,7 +26,7 @@ */ public class AntlibMeta extends RootAntObjectMeta { - public AntlibMeta(AntFile antFile, Element node) throws DocumentException, IOException { + public AntlibMeta(AntFile antFile, Element node) throws IOException { super(antFile, node); // Only parse a project comment if it is marked diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/CommentMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/CommentMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/CommentMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,8 +16,6 @@ package com.nokia.helium.ant.data; -import java.io.IOException; - import org.dom4j.Comment; /** @@ -25,7 +23,7 @@ */ public class CommentMeta extends AntObjectMeta { - public CommentMeta(AntObjectMeta parent, Comment comment) throws IOException { + public CommentMeta(AntObjectMeta parent, Comment comment) { super(parent, comment); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/Database.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/Database.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/Database.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,6 +16,22 @@ package com.nokia.helium.ant.data; +import java.io.File; +import java.io.IOException; +import java.io.Writer; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Target; + +import com.nokia.helium.freemarker.WikiMethod; + import freemarker.cache.ClassTemplateLoader; import freemarker.cache.FileTemplateLoader; import freemarker.cache.MultiTemplateLoader; @@ -24,44 +40,26 @@ import freemarker.template.DefaultObjectWrapper; import freemarker.template.Template; import freemarker.template.TemplateException; -import java.io.File; -import java.io.IOException; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Target; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.DocumentHelper; -import org.dom4j.Element; -import org.dom4j.Node; -import org.dom4j.XPath; -import org.dom4j.io.SAXReader; - -import com.nokia.helium.freemarker.WikiMethod; /** - * Reads the current ant project and a fileset and generates a xml file with a - * summary of targets, macros and properties. + * Reads the current ant project and a fileset and generates a xml file with a summary of targets, + * macros and properties. */ public class Database { /** The default scope filter if no scope filter is defined. */ public static final String DEFAULT_SCOPE = "public"; + public static final Map NAMESPACE_MAP; private Project rootProject; private Map antfilesMap; private Map packagesMap; private String scopeFilter; - private HashMap namespaceMap = new HashMap(); - private HashMap> globalSignalList = new HashMap>(); - private Document signaldoc; + static { + Map tempMap = new HashMap(); + tempMap.put("hlm", "http://www.nokia.com/helium"); + NAMESPACE_MAP = Collections.unmodifiableMap(tempMap); + } public Database(Project project) throws IOException { this(project, DEFAULT_SCOPE); @@ -73,7 +71,6 @@ this.scopeFilter = scopeFilter; antfilesMap = new HashMap(); packagesMap = new HashMap(); - namespaceMap.put("hlm", "http://www.nokia.com/helium"); if (project != null) { Map targets = project.getTargets(); @@ -88,13 +85,6 @@ } } } - - Collection antFiles = getAntFiles(); - Iterator antFilesIter = antFiles.iterator(); - while (antFilesIter.hasNext()) { - AntFile antFile = (AntFile) antFilesIter.next(); - readSignals(antFile.getFile().getCanonicalPath()); - } } private void log(String string, int level) { @@ -118,7 +108,6 @@ // See if project is part of a package checkPackageMembership(antfile); - readSignals(antFilePath); // See if any antlibs are defined List antlibFiles = antfile.getAntlibs(); @@ -141,61 +130,6 @@ packageMeta.addObject(rootObjectMeta); } - @SuppressWarnings("unchecked") - private void readSignals(String antFile) throws IOException { - SAXReader xmlReader = new SAXReader(); - Document antDoc; - try { - antDoc = xmlReader.read(new File(antFile)); - } - catch (DocumentException e) { - throw new IOException(e.getMessage()); - } - - XPath xpath = DocumentHelper.createXPath("//hlm:signalListenerConfig"); - xpath.setNamespaceURIs(namespaceMap); - List signalNodes = xpath.selectNodes(antDoc); - for (Iterator iterator = signalNodes.iterator(); iterator.hasNext();) { - signaldoc = antDoc; - Element propertyNode = (Element) iterator.next(); - String signalid = propertyNode.attributeValue("id"); - String signaltarget = propertyNode.attributeValue("target"); - List existinglist = globalSignalList.get(signaltarget); - String failbuild = findSignalFailMode(signalid, signaldoc); - if (existinglist == null) { - existinglist = new ArrayList(); - } - existinglist.add(signalid + "," + failbuild); - globalSignalList.put(signaltarget, existinglist); - } - } - - public List getSignals(String target) { - return globalSignalList.get(target); - } - - @SuppressWarnings("unchecked") - private String findSignalFailMode(String signalid, Document antDoc) { - XPath xpath2 = DocumentHelper.createXPath("//hlm:signalListenerConfig[@id='" + signalid - + "']/signalNotifierInput/signalInput"); - xpath2.setNamespaceURIs(namespaceMap); - List signalNodes3 = xpath2.selectNodes(antDoc); - - for (Iterator iterator3 = signalNodes3.iterator(); iterator3.hasNext();) { - Element propertyNode3 = (Element) iterator3.next(); - String signalinputid = propertyNode3.attributeValue("refid"); - - XPath xpath3 = DocumentHelper.createXPath("//hlm:signalInput[@id='" + signalinputid + "']"); - xpath3.setNamespaceURIs(namespaceMap); - List signalNodes4 = xpath3.selectNodes(antDoc); - for (Iterator iterator4 = signalNodes4.iterator(); iterator4.hasNext();) { - Element propertyNode4 = (Element) iterator4.next(); - return propertyNode4.attributeValue("failbuild"); - } - } - return null; - } - public void setScopeFilter(String scopeFilter) { if (!(scopeFilter.equals("public") || scopeFilter.equals("protected") || scopeFilter.equals("private"))) { throw new IllegalArgumentException("Invalid scope value"); @@ -233,7 +167,6 @@ antlibs.add((AntlibMeta) rootObject); } } - // antfiles.addAll(antfilesMap.values()); Map root = new HashMap(); root.put("projects", projects); root.put("antlibs", antlibs); @@ -259,7 +192,7 @@ return antfilesMap.values(); } - public List getProperties() throws IOException { + public List getProperties() { List propertiesList = new ArrayList(); for (AntFile antfile : antfilesMap.values()) { RootAntObjectMeta rootMeta = antfile.getRootObjectMeta(); @@ -269,6 +202,17 @@ } return propertiesList; } + + public List getCommentProperties() { + List propertiesList = new ArrayList(); + for (AntFile antfile : antfilesMap.values()) { + RootAntObjectMeta rootMeta = antfile.getRootObjectMeta(); + if (rootMeta instanceof ProjectMeta) { + propertiesList.addAll(((ProjectMeta) rootMeta).getPropertyCommentBlocks()); + } + } + return propertiesList; + } public List getPackages() throws IOException { List packages = new ArrayList(); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/DocumentFactoryWithLocator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/DocumentFactoryWithLocator.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.ant.data; + +import org.dom4j.DocumentFactory; +import org.dom4j.Element; +import org.dom4j.QName; +import org.xml.sax.Locator; + +/** + * A dom4j DocumentFactory that supports adding location information into Element objects. + */ +@SuppressWarnings("serial") +public class DocumentFactoryWithLocator extends DocumentFactory { + + private SAXContentHandlerExt contentHandler; + + public Element createElement(QName qname) { + ElementWithLocation element = new ElementWithLocation(qname); + Locator locator = contentHandler.getDocumentLocator(); + element.setLocation(locator.getLineNumber(), locator.getColumnNumber()); + return element; + } + + public void setContentHandler(SAXContentHandlerExt contentHandler) { + this.contentHandler = contentHandler; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ElementWithLocation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ElementWithLocation.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.ant.data; + +import org.dom4j.QName; +import org.dom4j.dom.DOMElement; + +/** + * An Element that additionally stores location information about the element. + */ +@SuppressWarnings("serial") +public class ElementWithLocation extends DOMElement { + + private int lineNumber; + private int columnNumber; + + public ElementWithLocation(QName qname) { + super(qname); + } + void setLocation(int lineNumber, int columnNumber) { + this.lineNumber = lineNumber; + this.columnNumber = columnNumber; + } + + int getLineNumber() { + return lineNumber; + } + + int getColumnNumber() { + return columnNumber; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/MacroMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/MacroMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/MacroMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,7 +17,6 @@ package com.nokia.helium.ant.data; -import java.io.IOException; import java.util.List; import org.dom4j.Element; @@ -28,7 +27,7 @@ */ public class MacroMeta extends TaskContainerMeta { - public MacroMeta(AntObjectMeta parent, Element objNode) throws IOException { + public MacroMeta(AntObjectMeta parent, Element objNode) { super(parent, objNode); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ProjectMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ProjectMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/ProjectMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -21,12 +21,15 @@ import java.io.IOException; import java.text.BreakIterator; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import org.dom4j.Comment; -import org.dom4j.DocumentException; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.Node; +import org.dom4j.XPath; /** * Meta object for an Ant project. @@ -36,7 +39,7 @@ private String description = ""; - public ProjectMeta(AntFile antFile, Element node) throws DocumentException, IOException { + public ProjectMeta(AntFile antFile, Element node) throws IOException { super(antFile, node); // Only parse a project comment if it is marked @@ -45,7 +48,6 @@ } Element descriptionNode = ((Element) getNode()).element("description"); - // System.out.println(descriptionNode); if (descriptionNode != null) { description = AntComment.getCleanedDocNodeText(descriptionNode); } @@ -73,7 +75,6 @@ text = getDocumentation(); } BreakIterator iterator = BreakIterator.getSentenceInstance(); - // BreakIterator iterator = BreakIterator.getLineInstance(); iterator.setText(text); String summary = ""; if (iterator.next() > 0) { @@ -83,7 +84,7 @@ } @SuppressWarnings("unchecked") - public List getTargets() throws IOException { + public List getTargets() { ArrayList objects = new ArrayList(); List nodes = getNode().selectNodes("target"); for (Node targetNode : nodes) { @@ -97,7 +98,7 @@ } @SuppressWarnings("unchecked") - public List getProperties() throws IOException { + public List getProperties() { List properties = new ArrayList(); List propertyNodes = getNode().selectNodes("//property[string-length(@name)>0]"); for (Node propNode : propertyNodes) { @@ -111,7 +112,7 @@ } @SuppressWarnings("unchecked") - public List getMacros() throws IOException { + public List getMacros() { ArrayList objects = new ArrayList(); List nodes = getNode().selectNodes("//macrodef | //scriptdef"); for (Element node : nodes) { @@ -150,7 +151,7 @@ } @SuppressWarnings("unchecked") - public List getPropertyCommentBlocks() throws IOException { + public List getPropertyCommentBlocks() { ArrayList objects = new ArrayList(); List nodes = getNode().selectNodes("//comment()"); for (Node node : nodes) { @@ -158,9 +159,48 @@ if (text.startsWith(DOC_COMMENT_MARKER + " @property")) { PropertyCommentMeta propertyCommentMeta = new PropertyCommentMeta(this, (Comment) node); propertyCommentMeta.setRuntimeProject(getRuntimeProject()); - objects.add(propertyCommentMeta); + if (propertyCommentMeta.matchesScope(getScopeFilter())) { + objects.add(propertyCommentMeta); + } } } return objects; } + + @SuppressWarnings("unchecked") + public void getConfigSignals(String targetName, List signals) { + XPath xpath = DocumentHelper.createXPath("//hlm:signalListenerConfig[@target='" + + targetName + "']"); + xpath.setNamespaceURIs(Database.NAMESPACE_MAP); + List signalNodes = xpath.selectNodes(getNode()); + for (Iterator iterator = signalNodes.iterator(); iterator.hasNext();) { + Element propertyNode = (Element) iterator.next(); + String signalid = propertyNode.attributeValue("id"); + String failbuild = findSignalFailMode(signalid, getNode().getDocument()); + signals.add(signalid + "(" + failbuild + ")"); + } + } + + @SuppressWarnings("unchecked") + private String findSignalFailMode(String signalid, Document antDoc) { + XPath xpath2 = DocumentHelper.createXPath("//hlm:signalListenerConfig[@id='" + signalid + + "']/signalNotifierInput/signalInput"); + xpath2.setNamespaceURIs(Database.NAMESPACE_MAP); + List signalNodes3 = xpath2.selectNodes(antDoc); + + for (Iterator iterator3 = signalNodes3.iterator(); iterator3.hasNext();) { + Element propertyNode3 = (Element) iterator3.next(); + String signalinputid = propertyNode3.attributeValue("refid"); + + XPath xpath3 = DocumentHelper.createXPath("//hlm:signalInput[@id='" + signalinputid + + "']"); + xpath3.setNamespaceURIs(Database.NAMESPACE_MAP); + List signalNodes4 = xpath3.selectNodes(antDoc); + for (Iterator iterator4 = signalNodes4.iterator(); iterator4.hasNext();) { + Element propertyNode4 = (Element) iterator4.next(); + return propertyNode4.attributeValue("failbuild"); + } + } + return null; + } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyCommentMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyCommentMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyCommentMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,6 @@ package com.nokia.helium.ant.data; -import java.io.IOException; - import org.dom4j.Comment; /** @@ -31,9 +29,8 @@ * * @param parent The parent meta object. * @param propertyNode XML node representing the comment. - * @throws IOException */ - public PropertyCommentMeta(AntObjectMeta parent, Comment comment) throws IOException { + public PropertyCommentMeta(AntObjectMeta parent, Comment comment) { super(parent, comment); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/PropertyMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,6 @@ package com.nokia.helium.ant.data; -import java.io.IOException; - import org.apache.tools.ant.Project; import org.dom4j.Element; import org.dom4j.Node; @@ -33,7 +31,7 @@ public static final String BOOLEAN_TYPE = "boolean"; public static final String DEFAULT_TYPE = STRING_TYPE; - public PropertyMeta(AntObjectMeta parent, Node propNode) throws IOException { + public PropertyMeta(AntObjectMeta parent, Node propNode) { super(parent, propNode); } @@ -80,21 +78,10 @@ */ @Override public String getScope() { - String scope = getComment().getTagValue("scope"); - if (scope.equals("")) { - Element parent = getNode().getParent(); - if (parent.getName().equals("project")) { - scope = "public"; - //if (getComment().getDocumentation().equals("")) { - // System.out.println(getName() + " no comment"); - //} - } - else { - scope = "private"; - //if (!getComment().getDocumentation().equals("")) { - // System.out.println(getName() + " no scope"); - //} - } + String scope = super.getScope(); + Element parent = getNode().getParent(); + if (getComment().getTagValue("scope").length() == 0 && !parent.getName().equals("project")) { + scope = "private"; } return scope; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/RootAntObjectMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/RootAntObjectMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/RootAntObjectMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -31,11 +31,13 @@ static final String DEFAULT_PACKAGE = "(default)"; private AntFile antFile; + private String filepath; private String scopeFilter; public RootAntObjectMeta(AntFile antFile, Element node) throws IOException { super(null, node); this.antFile = antFile; + this.filepath = antFile.getFile().getCanonicalPath(); } public String getPackage() { @@ -49,6 +51,15 @@ public AntFile getAntFile() { return antFile; } + + /** + * Returns the location path of the object. + * + * @return Location path string. + */ + public String getFilePath() { + return filepath; + } public void setScopeFilter(String scopeFilter) { this.scopeFilter = scopeFilter; @@ -76,3 +87,5 @@ return objects; } } + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/SAXContentHandlerExt.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/SAXContentHandlerExt.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.ant.data; + +import org.dom4j.DocumentFactory; +import org.dom4j.io.SAXContentHandler; +import org.xml.sax.Locator; + +/** + * An extension of SAXContentHandler that allows the Locator to be accessed. + */ +public class SAXContentHandlerExt extends SAXContentHandler { + private Locator locator; + + public SAXContentHandlerExt(DocumentFactory documentFactory) { + super(documentFactory, null); + } + + public void setDocumentLocator(Locator documentLocator) { + super.setDocumentLocator(documentLocator); + this.locator = documentLocator; + } + + public Locator getDocumentLocator() { + return locator; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TargetMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TargetMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TargetMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,9 @@ package com.nokia.helium.ant.data; -import java.io.IOException; import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import java.util.regex.Matcher; @@ -38,9 +39,8 @@ */ public class TargetMeta extends TaskContainerMeta { - public TargetMeta(AntObjectMeta parent, Node node) throws IOException { + public TargetMeta(AntObjectMeta parent, Node node) { super(parent, node); - // callAntTargetVisitor(); } public String getIf() { @@ -79,9 +79,14 @@ public List getSignals() { List signals = super.getSignals(); - List additionalSignals = getDatabase().getSignals(getName()); - if (additionalSignals != null) { - signals.addAll(additionalSignals); + Collection antFiles = getDatabase().getAntFiles(); + for (Iterator iterator = antFiles.iterator(); iterator.hasNext();) { + AntFile antFile = (AntFile) iterator.next(); + RootAntObjectMeta rootObjectMeta = antFile.getRootObjectMeta(); + if (rootObjectMeta instanceof ProjectMeta) { + ProjectMeta projectMeta = (ProjectMeta)rootObjectMeta; + projectMeta.getConfigSignals(getName(), signals); + } } return signals; } @@ -120,7 +125,6 @@ String propertyName = node.attributeValue("name"); if (propertyName != null && !propertyList.contains(propertyName)) { propertyList.add(propertyName); - // System.out.println("prop "+propertyName); log("property matches :" + propertyName, Project.MSG_DEBUG); } } @@ -129,24 +133,20 @@ private void extractUsedProperties(String text) { Pattern p1 = Pattern.compile("\\$\\{([^@$}]*)\\}"); Matcher m1 = p1.matcher(text); - log(text, Project.MSG_DEBUG); while (m1.find()) { String group = m1.group(1); if (!propertyList.contains(group)) { propertyList.add(group); - // System.out.println("m1 "+group + " "+ text); } log("property matches: " + group, Project.MSG_DEBUG); } Pattern p2 = Pattern.compile("\\$\\{([^\n]*\\})\\}"); Matcher m2 = p2.matcher(text); - log(text, Project.MSG_DEBUG); while (m2.find()) { String group = m2.group(1); if (!propertyList.contains(group)) { propertyList.add(group); - // System.out.println("m2 "+group + " "+ text); } log("property matches: " + group, Project.MSG_DEBUG); } @@ -158,7 +158,6 @@ String group = m3.group(1); if (!propertyList.contains(group)) { propertyList.add(group); - // System.out.println("m3 "+group + " "+ text); } log("property matches: " + group, Project.MSG_DEBUG); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TaskContainerMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TaskContainerMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TaskContainerMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,7 +16,6 @@ */ package com.nokia.helium.ant.data; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -35,7 +34,7 @@ private ArrayList signals; private ArrayList executables; - public TaskContainerMeta(AntObjectMeta parent, Node node) throws IOException { + public TaskContainerMeta(AntObjectMeta parent, Node node) { super(parent, node); callAntTargetVisitor(); } @@ -56,7 +55,7 @@ return executables; } - private void callAntTargetVisitor() throws IOException { + private void callAntTargetVisitor() { // Add antcall/runtarget dependencies antcallTargets = new ArrayList(); logs = new ArrayList(); @@ -84,7 +83,6 @@ @Override public void visit(Element node) { String name = node.getName(); - // System.out.println(name); if (name.equals("antcall") || name.equals("runtarget")) { String text = node.attributeValue("target"); targetList.add(text); @@ -106,17 +104,10 @@ } if (name.endsWith("signal") || name.endsWith("execSignal")) { - // System.out.println(name); - String signalid = node.attributeValue("name"); // getProject().replaceProperties(node.attributeValue("name")); - // String failbuild = signalType(signalid, node.getDocument()); + String signalid = node.attributeValue("name"); if (signalList != null) { - // if (failbuild != null) { - // signalList.add(signalid + "," + failbuild); - // } - // else { signalList.add(signalid); - // } } } @@ -130,8 +121,7 @@ private void addLog(String text) { if (text != null && logList != null) { for (String log : text.split(" ")) { - // TODO - String fulllogname = log; // getProject().replaceProperties(log); + String fulllogname = log; if (!logList.contains(log) && (fulllogname.endsWith(".log") || fulllogname.endsWith(".html"))) { log = log.replace("--log=", ""); logList.add(log); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TypeMeta.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TypeMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/TypeMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,6 @@ package com.nokia.helium.ant.data; -import java.io.IOException; - import org.dom4j.Element; /** @@ -26,7 +24,7 @@ */ public class TypeMeta extends AntObjectMeta { - public TypeMeta(AntObjectMeta parent, Element node) throws IOException { + public TypeMeta(AntObjectMeta parent, Element node) { super(parent, node); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/database.xml.ftl --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/database.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/database.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -25,6 +25,7 @@ ${macro.description} ${macro.scope} ${macro.deprecated} + ${macro.since} ${macro.location} ${macro.summary} ${wiki(macro.documentation)} @@ -46,6 +47,7 @@ ${wiki(project.description)} ${project.scope} ${project.deprecated} + ${project.since} ${project.location} ${project.summary} ${wiki(project.documentation)} @@ -68,6 +70,7 @@ ${target.description} ${target.scope} ${target.deprecated} + ${target.since} ${target.location} ${target.summary} ${wiki(target.documentation)} @@ -109,6 +112,7 @@ ${property.editable} ${property.scope} ${property.deprecated} + ${property.since} ${property.location} ${property.summary} ${wiki(property.documentation)} @@ -118,13 +122,14 @@ <#list project.propertyCommentBlocks as property> - + ${property.name} No default value. ${property.type} ${property.editable} ${property.scope} ${property.deprecated} + ${property.since} ${property.location} ${property.summary} ${wiki(property.documentation)} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/AntConfigLintTask.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/AntConfigLintTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/AntConfigLintTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -83,7 +83,6 @@ public void execute() { errorsTotal = 0; try { - System.out.println(getProject()); db = new Database(getProject()); if (checks.size() == 0) { throw new BuildException("No checks defined."); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/DatabaseTask.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/DatabaseTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/taskdefs/DatabaseTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -29,18 +29,20 @@ import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.ResourceCollection; + import com.nokia.helium.ant.data.Database; /** - * Reads the current Ant project and any additional filesets and generates a xml - * file with a summary of targets, macros and properties. + * Reads the current Ant project and/or Ant files and generates a XML file with a summary + * of targets, macros and properties. * - * @ant.task name="database" + * @ant.task name="database" category="Database" */ public class DatabaseTask extends Task { + private static final String DEFAULT_SCOPE = "public"; + private File outputFile; - // private boolean excludeParsedFiles - private String scope = "public"; + private String scope = DEFAULT_SCOPE; private boolean filesetonly; private List rcs = new ArrayList(); @@ -70,14 +72,13 @@ public void setOutput(File outputFile) { this.outputFile = outputFile; } - - public void setFilesetOnly(boolean f) - { - filesetonly = f; + + public void setFilesetOnly(boolean filesetonly) { + this.filesetonly = filesetonly; } /** - * Defines what level of visibility to display Ant objects at. + * Defines what level of visibility to display Ant objects at. Default value is "public". * * @param scope The visibility level, either public, protected or private. */ @@ -110,10 +111,12 @@ // Output the database file Database db; - if (filesetonly) + if (filesetonly) { db = new Database(null); - else + } + else { db = new Database(getProject()); + } db.setScopeFilter(scope); db.addAntFilePaths(antFilePaths); FileWriter out = new FileWriter(outputFile); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/WrongTypePropertyCheck.java --- a/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/WrongTypePropertyCheck.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/src/com/nokia/helium/ant/data/types/WrongTypePropertyCheck.java Mon Sep 13 13:11:19 2010 +0800 @@ -30,9 +30,6 @@ public class WrongTypePropertyCheck extends AntLintCheck { public static final String DESCRIPTION = "Property value does not match type"; - public WrongTypePropertyCheck() { - } - @Override public void run() throws IOException { List properties = getDb().getProperties(); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/tests/data/test_project.ant.xml --- a/buildframework/helium/sf/java/antdata/tests/data/test_project.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/tests/data/test_project.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -1,6 +1,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antdata/tests/src/com/nokia/helium/ant/data/tests/TestMeta.java --- a/buildframework/helium/sf/java/antdata/tests/src/com/nokia/helium/ant/data/tests/TestMeta.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antdata/tests/src/com/nokia/helium/ant/data/tests/TestMeta.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,6 +17,8 @@ package com.nokia.helium.ant.data.tests; +import static org.junit.Assert.assertTrue; + import java.io.File; import java.io.IOException; import java.io.StringWriter; @@ -28,7 +30,6 @@ import org.dom4j.DocumentHelper; import org.dom4j.Node; import org.junit.Test; -import static org.junit.Assert.*; import com.nokia.helium.ant.data.Database; @@ -82,4 +83,32 @@ assertTrue(macro.valueOf("scope").equals("public")); assertTrue(macro.valueOf("deprecated").equals("")); } + + @Test + public void testProjectMetaScope() throws IOException, DocumentException { + readPropertyTotal("public", 3); + readPropertyTotal("private", 7); + } + + private void readPropertyTotal(String scope, int total) throws IOException, DocumentException { + Database db = new Database(null, scope); + List paths = new ArrayList(); + File testAntFile = new File(System.getProperty("testdir"), "tests/data/test_project_scopes.ant.xml"); + paths.add(testAntFile.getCanonicalPath()); + db.setScopeFilter(scope); + db.addAntFilePaths(paths); + StringWriter out = new StringWriter(); + db.toXML(out); + + Document doc = DocumentHelper.parseText(out.toString()); + System.out.println(doc.asXML()); + + Node database = doc.selectSingleNode("//antDatabase"); + + Node project = database.selectSingleNode("project"); + + List properties = project.selectNodes("property"); + System.out.println(properties.size()); + assertTrue(properties.size() == total); + } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/antlib.xml --- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -45,7 +45,8 @@ - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/taskdefs/AntLintTask.java --- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/taskdefs/AntLintTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/taskdefs/AntLintTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -21,10 +21,12 @@ import java.util.ArrayList; import java.util.List; import java.util.Vector; + import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet; + import com.nokia.helium.antlint.ant.AntlintException; import com.nokia.helium.antlint.ant.Reporter; import com.nokia.helium.antlint.ant.Severity; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractCheck.java --- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractCheck.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractCheck.java Mon Sep 13 13:11:19 2010 +0800 @@ -22,6 +22,7 @@ import org.apache.tools.ant.types.DataType; import org.dom4j.Element; import org.dom4j.Node; + import com.nokia.helium.antlint.ant.Reporter; import com.nokia.helium.antlint.ant.Severity; @@ -31,7 +32,7 @@ */ public abstract class AbstractCheck extends DataType implements Check { - private boolean enabled; + private boolean enabled = true; private Severity severity; private Reporter reporter; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractScriptCheck.java --- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractScriptCheck.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/AbstractScriptCheck.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,11 +18,11 @@ import java.io.File; import java.io.FileOutputStream; +import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.io.IOException; import org.apache.tools.ant.BuildException; @@ -75,8 +75,9 @@ output2.write("try:\n"); for (String line : text.split("\n")) { if (line.trim().startsWith("import ") - || line.trim().startsWith("from ")) + || line.trim().startsWith("from ")) { output2.write(" " + line + "\n"); + } } output2.write("except ImportError, e:\n"); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckAntCall.java --- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckAntCall.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckAntCall.java Mon Sep 13 13:11:19 2010 +0800 @@ -29,8 +29,8 @@ import com.nokia.helium.antlint.ant.AntlintException; /** - * CheckAntCall is used to check whether antcall is used with no - * param elements and calls the target with no dependencies + * CheckAntCall is used to check whether antcall is used with no param elements and + * calls the target with no dependencies * *
  * Usage:
@@ -63,8 +63,7 @@
     /**
      * Check against the given node.
      * 
-     * @param node
-     *            is the node to check.
+     * @param node is the node to check.
      */
     @SuppressWarnings("unchecked")
     private void checkAntCalls(Element node) {
@@ -72,18 +71,11 @@
             List antcallList = node.elements("antcall");
             for (Element antcallElement : antcallList) {
                 String antcallName = antcallElement.attributeValue("target");
-                if (((node.elements("param") == null) || (node
-                        .elements("param") != null && node.elements("param")
-                        .isEmpty()))
-                        && !checkTargetDependency(antcallName)) {
-                    this
-                            .getReporter()
-                            .report(
-                                    this.getSeverity(),
-                                    " is used with no param elements and calls the target "
-                                            + antcallName
-                                            + " that has no dependencies! ( could be used instead.)",
-                                    this.getAntFile(), 0);
+                if (((node.elements("param") == null) || (node.elements("param") != null && node.elements("param").isEmpty()))
+                    && !checkTargetDependency(antcallName)) {
+                    this.getReporter().report(this.getSeverity(), " is used with no param elements and calls the target "
+                        + antcallName
+                        + " that has no dependencies! ( could be used instead.)", this.getAntFile(), 0);
                 }
             }
         }
@@ -104,7 +96,8 @@
         try {
             doc = saxReader.read(antFilename);
             elementTreeWalk(doc.getRootElement(), "target", targetNodes);
-        } catch (DocumentException e) {
+        }
+        catch (DocumentException e) {
             throw new AntlintException("Invalid XML file " + e.getMessage());
         }
 
@@ -125,16 +118,14 @@
     /**
      * Check the availability dependent targets of the given target.
      * 
-     * @param targetName
-     *            is the target for which dependent targets to be loked up.
+     * @param targetName is the target for which dependent targets to be loked up.
      * @return true, if the dependant targets are available; otherwise false
      */
     private boolean checkTargetDependency(String targetName) {
         boolean dependencyCheck = false;
-        Target targetDependency = (Target) getProject().getTargets().get(
-                targetName);
+        Target targetDependency = (Target) getProject().getTargets().get(targetName);
         dependencyCheck = targetDependency != null
-                && targetDependency.getDependencies().hasMoreElements();
+            && targetDependency.getDependencies().hasMoreElements();
         return dependencyCheck;
     }
 
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDuplicateNames.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDuplicateNames.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckDuplicateNames.java	Mon Sep 13 13:11:19 2010 +0800
@@ -56,13 +56,14 @@
 
         for (String macroName : macros) {
             if (macros.contains(macroName + "Macro")
-                    || macros.contains(macroName + "macro"))
+                    || macros.contains(macroName + "macro")) {
                 this.getReporter()
                         .report(
                                 this.getSeverity(),
                                 macroName + " and " + macroName + "Macro"
                                         + " found duplicate name",
                                 this.getAntFile(), 0);
+            }
         }
     }
 
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckIndentation.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckIndentation.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckIndentation.java	Mon Sep 13 13:11:19 2010 +0800
@@ -17,12 +17,13 @@
 package com.nokia.helium.antlint.ant.types;
 
 import java.io.File;
+import java.io.IOException;
 
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.ParserConfigurationException;
+
 import org.xml.sax.SAXException;
-import java.io.IOException;
 
 import com.nokia.helium.antlint.AntLintHandler;
 import com.nokia.helium.antlint.ant.AntlintException;
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckProjectName.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckProjectName.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckProjectName.java	Mon Sep 13 13:11:19 2010 +0800
@@ -53,9 +53,6 @@
 
     /**
      * {@inheritDoc}
-     * 
-     * @throws SAXException
-     * @throws ParserConfigurationException
      */
     public void run(Element node) {
         if (node.getName().equals("project")) {
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPropertyName.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPropertyName.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPropertyName.java	Mon Sep 13 13:11:19 2010 +0800
@@ -23,7 +23,6 @@
 import java.util.regex.Pattern;
 
 import org.dom4j.Document;
-
 import org.dom4j.DocumentException;
 import org.dom4j.Element;
 import org.dom4j.io.SAXReader;
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPythonTasks.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPythonTasks.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckPythonTasks.java	Mon Sep 13 13:11:19 2010 +0800
@@ -18,10 +18,10 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
-import java.io.IOException;
 
 import org.apache.tools.ant.BuildException;
 import org.dom4j.Document;
@@ -93,8 +93,9 @@
             PrintWriter output = new PrintWriter(new FileOutputStream(file));
             if (!text.equals("")) {
                 output.write("def abc():");
-                for (String line : text.split("\n"))
+                for (String line : text.split("\n")) {
                     output.write("    " + line + "\n");
+                }
             }
             output.close();
         } catch (IOException e) {
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckScriptDef.java	Mon Sep 13 13:11:19 2010 +0800
@@ -18,12 +18,12 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import java.io.IOException;
 
 import org.apache.tools.ant.BuildException;
 import org.dom4j.Document;
@@ -127,19 +127,22 @@
             PrintWriter output = new PrintWriter(new FileOutputStream(file));
 
             for (String line : text.split("\n")) {
-                if (line.trim().startsWith("import"))
+                if (line.trim().startsWith("import")) {
                     output.write(line + "\n");
+                }
             }
 
             output.write("/**\n * x\n */\npublic final class " + scriptdefname
                     + " {\n");
-            output.write("private " + scriptdefname + "() { }\n");
-            output.write("public static void main(String[] args) {\n");
+            output.write("    private " + scriptdefname + "() { }\n");
+            output.write("    public static void main(String[] args) {\n");
             for (String line : text.split("\n")) {
-                if (!line.trim().startsWith("import"))
-                    output.write(line + "\n");
+                if (!line.trim().startsWith("import")) {
+                    output.write("        " + line + "\n");
+                }
             }
-            output.write("} }");
+            output.write("    }\n");
+            output.write("}\n");
             output.close();
         } catch (IOException e) {
             throw new BuildException("Not able to write Beanshell File "
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTabCharacter.java
--- a/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTabCharacter.java	Mon Sep 06 09:57:24 2010 +0100
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTabCharacter.java	Mon Sep 13 13:11:19 2010 +0800
@@ -17,15 +17,16 @@
 package com.nokia.helium.antlint.ant.types;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.List;
-import java.io.IOException;
 
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import org.xml.sax.SAXException;
+
 import org.dom4j.Element;
 import org.dom4j.Node;
+import org.xml.sax.SAXException;
 
 import com.nokia.helium.antlint.AntLintHandler;
 import com.nokia.helium.antlint.ant.AntlintException;
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTryCatchBlock.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/antlint/src/com/nokia/helium/antlint/ant/types/CheckTryCatchBlock.java	Mon Sep 13 13:11:19 2010 +0800
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
+package com.nokia.helium.antlint.ant.types;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import com.nokia.helium.antlint.ant.AntlintException;
+
+/**
+ * CheckTryCatchBlock is used to check for empty and more than one
+ * catch elements in a given try-catch block.
+ * 
+ * 
+ * Usage:
+ * 
+ *  <antlint>
+ *       <fileset id="antlint.files" dir="${antlint.test.dir}/data">
+ *               <include name="*.ant.xml"/>
+ *               <include name="*build.xml"/>
+ *               <include name="*.antlib.xml"/>
+ *       </fileset>
+ *       <checkTryCatchBlock" severity="error" enabled="true" />
+ *  </antlint>
+ * 
+ * + * @ant.task name="checkTryCatchBlock" category="AntLint" + * + */ +public class CheckTryCatchBlock extends AbstractCheck { + + private File antFile; + + /** + * {@inheritDoc} + */ + public File getAntFile() { + return antFile; + } + + /** + * {@inheritDoc} + */ + public void run(File antFilename) throws AntlintException { + try { + this.antFile = antFilename; + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + saxFactory.setNamespaceAware(true); + saxFactory.setValidating(true); + SAXParser parser = saxFactory.newSAXParser(); + TryCatchBlockHandler handler = new TryCatchBlockHandler(); + parser.parse(antFilename, handler); + } catch (ParserConfigurationException e) { + throw new AntlintException("Not able to parse XML file " + + e.getMessage()); + } catch (SAXException e) { + throw new AntlintException("Not able to parse XML file " + + e.getMessage()); + } catch (IOException e) { + throw new AntlintException("Not able to find XML file " + + e.getMessage()); + } + } + + public String toString() { + return "CheckTryCatchBlock"; + } + + private class TryCatchBlockHandler extends DefaultHandler { + + private Locator locator; + private int catchCounter; + + /** + * {@inheritDoc} + */ + public void setDocumentLocator(Locator locator) { + this.locator = locator; + } + + /** + * {@inheritDoc} + */ + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + if (localName.equals("trycatch")) { + catchCounter = 0; + } else if (localName.equals("catch")) { + catchCounter++; + } + } + + /** + * {@inheritDoc} + */ + public void endElement(String uri, String localName, String qName) + throws SAXException { + if (localName.equals("trycatch") && catchCounter == 0) { + getReporter().report(getSeverity(), + " block found without element", + getAntFile(), locator.getLineNumber()); + } else if (localName.equals("trycatch") && catchCounter > 1) { + getReporter().report( + getSeverity(), + " block found with " + catchCounter + + " elements.", getAntFile(), + locator.getLineNumber()); + } + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/tests/antunit/test_antlint.ant.xml --- a/buildframework/helium/sf/java/antlint/tests/antunit/test_antlint.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/tests/antunit/test_antlint.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -329,5 +329,23 @@ - + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/antlint/tests/data/sample.ant.xml --- a/buildframework/helium/sf/java/antlint/tests/data/sample.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/antlint/tests/data/sample.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -247,5 +247,52 @@ checking indentation + + checking for empty catch block in try-catch + + + + + + + + + checking for empty catch block in try-catch + + + + + + inside finally + + + + + + checking for empty catch block in try-catch + + + + + + inside catch + + + + + + checking for empty catch block in try-catch + + + + + + inside catch1 + + + inside catch2 + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/taskdefs/CcmTask.java --- a/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/taskdefs/CcmTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/taskdefs/CcmTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -27,6 +27,8 @@ import java.util.jar.JarFile; import java.util.zip.ZipEntry; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; import org.python.util.PythonInterpreter; import com.nokia.helium.ccmtask.ant.commands.AddTask; @@ -34,6 +36,8 @@ import com.nokia.helium.ccmtask.ant.commands.ChangeReleaseTag; import com.nokia.helium.ccmtask.ant.commands.Checkout; import com.nokia.helium.ccmtask.ant.commands.Close; +import com.nokia.helium.ccmtask.ant.commands.CreateReleaseTag; +import com.nokia.helium.ccmtask.ant.commands.DeleteReleaseTag; import com.nokia.helium.ccmtask.ant.commands.Reconcile; import com.nokia.helium.ccmtask.ant.commands.Role; import com.nokia.helium.ccmtask.ant.commands.Snapshot; @@ -41,10 +45,6 @@ import com.nokia.helium.ccmtask.ant.commands.Update; import com.nokia.helium.ccmtask.ant.commands.Workarea; import com.nokia.helium.ccmtask.ant.types.SessionSet; -import com.nokia.helium.ccmtask.ant.commands.CreateReleaseTag; -import com.nokia.helium.ccmtask.ant.commands.DeleteReleaseTag; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Task; /** * Synergy task. @@ -220,7 +220,6 @@ /** * Returns the jar file name containing this class * @return a File object or null if not found. - * @throws IMakerException */ protected File getJarFile() { URL url = this.getClass().getClassLoader().getResource(this.getClass().getName().replace('.', '/') + ".class"); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/taskdefs/ccmtask.py --- a/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/taskdefs/ccmtask.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/taskdefs/ccmtask.py Mon Sep 13 13:11:19 2010 +0800 @@ -36,18 +36,18 @@ logger = logging.getLogger("ccm.ant") session = None -def execute_update(command): +def execute_update(session, command): java_ccmtask.log(str('Updating project: ' + command.getProject())) project = session.create(command.getProject()) project.update() -def execute_role(command): +def execute_role(session, command): if not command.getRole(): raise Exception("The 'role' attribute has not been defined.") java_ccmtask.log(str('Updating role: ' + command.getRole())) session.role = command.getRole() -def execute_synchronize(command): +def execute_synchronize(session, command): if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") java_ccmtask.log(str('Synchronizing project: ' + command.getProject())) @@ -55,14 +55,14 @@ project = session.create(command.getProject()) project.sync(command.getRecursive()) -def execute_reconcile(command): +def execute_reconcile(session, command): if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") java_ccmtask.log(str('Reconciling project: ' + command.getProject())) project = session.create(command.getProject()) project.reconcile() -def execute_snapshot(command): +def execute_snapshot(session, command): if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") if not command.getDir(): @@ -74,7 +74,7 @@ else: project.snapshot(command.getDir(), command.getRecursive()) -def execute_changereleasetag(command): +def execute_changereleasetag(session, command): if not command.getFolder(): raise Exception("The 'folder' attribute has not been defined.") if not command.getReleaseTag(): @@ -86,7 +86,7 @@ if task.release != str(command.getReleaseTag()): task.release = str(command.getReleaseTag()) -def execute_checkout(command): +def execute_checkout(session, command): if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") java_ccmtask.log(str('Checking out project: ' + command.getProject() + ' with release tag ' + command.getRelease())) @@ -114,7 +114,7 @@ purpose = None project.checkout(session.create(command.getRelease()), version, purpose, recursive) -def execute_createreleasetag(command): +def execute_createreleasetag(session, command): java_ccmtask.log(str('creating a release tag')) if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") @@ -123,7 +123,7 @@ new_release_tag = command.getNewTag(); project.create_release_tag(command.getRelease(), new_release_tag) -def execute_deletereleasetag(command): +def execute_deletereleasetag(session, command): java_ccmtask.log(str('deleting a release tag')) if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") @@ -132,7 +132,7 @@ new_release_tag = command.getNewTag(); project.delete_release_tag(command.getRelease(), new_release_tag) -def execute_workarea(command): +def execute_workarea(session, command): if not command.getProject(): raise Exception("The 'project' attribute has not been defined.") java_ccmtask.log(str('Modifying work area for the project : ' + command.getProject())) @@ -163,11 +163,11 @@ wat = None project.work_area(maintain, recursive, relative, path, pst, wat) -def execute_addtask(command): +def execute_addtask(session, command): if command.getFolder() != None: tasks = [] ccmfolder = session.create("Folder " + command.getFolder()) - role = find_folder_information(command) + role = find_folder_information(session, command) if role == "build_mgr": java_ccmtask.log("Changing role to %s" % role) session.role = "build_mgr" @@ -181,7 +181,7 @@ for task in tasks: ccmfolder.append(task) -def find_folder_information(command): +def find_folder_information(session, command): cmdline = "folder -sh i " + command.getFolder() result = session.execute(cmdline) result_array = str(result).split('\r') @@ -193,7 +193,7 @@ else: return "developer" -def execute_exists(command): +def execute_exists(session, command): fpn = None if command.getObject() != None: fpn = command.getObject() @@ -210,12 +210,11 @@ else: raise Exception("Could not find '%s'." % ccmo) -def execute_close(command): - global session - java_ccmtask.log(str("Closing session %s." % session)) - session.close_on_exit = True +def execute_close(session, command): + java_ccmtask.log(str("Closing session %s." % str(session))) + if hasattr(session, 'close_on_exit'): + session.close_on_exit = True session.close() - session = None def referenceToObject(obj): if obj.isReference() == 1: @@ -235,9 +234,9 @@ sessionid = sessionIds.pop() session = ccm.Session(username=None, engine=None, dbpath=None, ccm_addr=sessionid, close_on_exit=False) else: - username = java_ccmtask.getUsername() - password = java_ccmtask.getPassword() - session = ccm.open_session(username=username, password=password) + username = java_ccmtask.getUsername() + password = java_ccmtask.getPassword() + session = ccm.open_session(username=username, password=password) if java_ccmtask.getVerbose() == 1: logging.getLogger("ccm").setLevel(logging.DEBUG) @@ -249,7 +248,7 @@ method_name = 'execute_' + command.getName() method = sys.modules['__main__'].__dict__[method_name] try: - method(command) + method(session, command) except Exception, e: if java_ccmtask.getVerbose() == 1: import traceback diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/types/SessionSet.java --- a/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/types/SessionSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/types/SessionSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,9 @@ package com.nokia.helium.ccmtask.ant.types; +import java.util.Vector; + import org.apache.tools.ant.types.DataType; -import java.util.Vector; /** * This class implement an Ant Datatype that represents a set of diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/types/TaskSet.java --- a/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/types/TaskSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/ccmtask/src/com/nokia/helium/ccmtask/ant/types/TaskSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,9 @@ package com.nokia.helium.ccmtask.ant.types; +import java.util.Vector; + import org.apache.tools.ant.types.DataType; -import java.util.Vector; /** * This class abstract a synergy session. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/CheckEngine.java --- a/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/CheckEngine.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/CheckEngine.java Mon Sep 13 13:11:19 2010 +0800 @@ -46,7 +46,7 @@ /** * Method verifies Ant version. */ - public void verifyAntVersion() { + public void verifyAntVersion() throws CheckToolException { String expVersion = configuration.getProperty("ant.version"); String errorMsg = "Supported Ant version is not defined in 'helium.basic.tools.config' file under helium config folder."; verifyIsExpectedToolVersionConfigured(expVersion, errorMsg); @@ -59,7 +59,7 @@ /** * Method verifies Python version. */ - public void verifyPythonVersion() { + public void verifyPythonVersion() throws CheckToolException { String expVersion = configuration.getProperty("python.version"); String errorMsg = "Supported Python version is not defined in 'helium.basic.tools.config' file under helium config folder."; verifyIsExpectedToolVersionConfigured(expVersion, errorMsg); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/CheckToolException.java --- a/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/CheckToolException.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/CheckToolException.java Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ * failure occurred during checking of tools required by the Helium. * */ -public class CheckToolException extends RuntimeException { +public class CheckToolException extends Exception { private static final long serialVersionUID = 1L; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/HeliumToolsCheckerMain.java --- a/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/HeliumToolsCheckerMain.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/HeliumToolsCheckerMain.java Mon Sep 13 13:11:19 2010 +0800 @@ -14,6 +14,7 @@ * Description: * */ + package com.nokia.helium.checktools; import java.io.FileInputStream; @@ -21,12 +22,11 @@ import java.util.Properties; /** - * HeliumToolsCheckerMain is the main class which is used to trigger the - * checking of basic tools required by the Helium. + * HeliumToolsCheckerMain is the main class which is used to trigger the checking of basic tools + * required by the Helium. * - * Note: HeliumToolsCheckerMain requires a '-config' parameter to be passed as - * the argument. The config parameter should be followed by a valid location of - * the configuration file. + * Note: HeliumToolsCheckerMain requires a '-config' parameter to be passed as the argument. The + * config parameter should be followed by a valid location of the configuration file. * */ public final class HeliumToolsCheckerMain { @@ -34,12 +34,10 @@ private Properties configuration; private CheckEngine checkEngine; - /** * Create an instance of HeliumToolsCheckerMain. * - * @param configFile - * is the config file to read. + * @param configFile is the config file to read. */ private HeliumToolsCheckerMain(String configFile) { loadConfiguration(configFile); @@ -54,7 +52,7 @@ try { checkEngine.verifyAntVersion(); } catch (CheckToolException e) { - System.out.println("*** Error: " + e.getMessage()); + println("*** Error: " + e.getMessage()); } } @@ -65,7 +63,7 @@ try { checkEngine.verifyPythonVersion(); } catch (CheckToolException e) { - System.out.println("*** Error: " + e.getMessage()); + println("*** Error: " + e.getMessage()); } } @@ -81,16 +79,14 @@ /** * Method loads the configuration details from the given file. * - * @param configFile - * is the configuration file to be loaded. + * @param configFile is the configuration file to be loaded. */ private void loadConfiguration(String configFile) { try { configuration = new Properties(); configuration.load(new FileInputStream(configFile)); } catch (IOException th) { - System.out.println("Error occured while loading config file: " - + configFile); + println("Error occured while loading config file: " + configFile); System.exit(-1); } } @@ -98,8 +94,7 @@ /** * Main method to trigger tool check. * - * @param args - * contains command line arguments passed. + * @param args contains command line arguments passed. * @throws Exception */ public static void main(String[] args) throws Exception { @@ -108,29 +103,31 @@ // check for configuration file if (args.length == 2 && args[0].equalsIgnoreCase("-config")) { - if (args[1] == null - || (args[1] != null && args[1].trim().isEmpty())) { - System.out.println("*** Error: Parameter '-config' not set for HeliumToolsCheckerMain"); + if (args[1] == null || (args[1] != null && args[1].trim().isEmpty())) { + println("*** Error: Parameter '-config' not set for HeliumToolsCheckerMain"); System.exit(-1); } configFile = args[1]; } if (configFile != null) { - HeliumToolsCheckerMain checkerMain = new HeliumToolsCheckerMain( - configFile); + HeliumToolsCheckerMain checkerMain = new HeliumToolsCheckerMain(configFile); checkerMain.checkAnt(); checkerMain.checkPython(); if (checkerMain.checkFailed()) { System.exit(-1); } - } else { - System.out.println("*** Error: Missing '-config' argument for HeliumToolsCheckerMain"); - System.out - .println("Usage: java [main-class-name] -config [location of configuration file]"); - System.out - .println("Example: java com.nokia.helium.checktools.HeliumToolsCheckerMain -config \"config/helium.basic.tools.config\""); + } + else { + println("*** Error: Missing '-config' argument for HeliumToolsCheckerMain"); + println("Usage: java [main-class-name] -config [location of configuration file]"); + println("Example: java com.nokia.helium.checktools.HeliumToolsCheckerMain -config \"config/helium.basic.tools.config\""); System.exit(-1); } } + + @SuppressWarnings("PMD.SystemPrintln") + public static void println(String text) { + System.out.println(text); + } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/OSResolver.java --- a/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/OSResolver.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/OSResolver.java Mon Sep 13 13:11:19 2010 +0800 @@ -48,7 +48,7 @@ * is the command to be formatted. * @return the formatted OS specific command string. */ - public static String getCommand(String cmd) { + public static String getCommand(String cmd) throws CheckToolException { StringBuffer buffer = new StringBuffer(); if (isOs("windows")) { if (!isOs("win9x")) { @@ -71,7 +71,7 @@ * The OS family * @return true if the OS matches; otherwise false. */ - public static boolean isOs(String family) { + public static boolean isOs(String family) throws CheckToolException { boolean retValue = false; if (family != null) { // windows probing logic relies on the word 'windows' in diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/ToolChecker.java --- a/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/ToolChecker.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/ToolChecker.java Mon Sep 13 13:11:19 2010 +0800 @@ -38,7 +38,7 @@ * is the message to be displayed on failure. */ public void verifyIsExpectedToolVersionConfigured(String expVersion, - String errorMsg) { + String errorMsg) throws CheckToolException { if (expVersion == null || (expVersion != null && expVersion.trim().isEmpty())) { raiseError(errorMsg); @@ -58,16 +58,17 @@ * is the message to be displayed on failure. */ public void verifyToolVersion(String command, String expVersion, - String versionString2match, String errorMsg) { + String versionString2match, String errorMsg) throws CheckToolException { String[] versions = expVersion.split(","); String installedVersion = getInstalledToolVersion(command); boolean valid = false; for (String expver : versions) { - if (!valid) + if (!valid) { valid = installedVersion.contains(versionString2match + expver); + } } if (!valid) { - System.out.println("Installed Version : " + installedVersion); + HeliumToolsCheckerMain.println("Installed Version : " + installedVersion); raiseError(errorMsg); } } @@ -78,7 +79,7 @@ * @param message * is the failure message. */ - public void raiseError(String message) { + public void raiseError(String message) throws CheckToolException { incrementErrorCount(); throw new CheckToolException(message); } @@ -90,7 +91,7 @@ * is the command string to execute. * @return the actual tool version. */ - public String getInstalledToolVersion(String cmd) { + public String getInstalledToolVersion(String cmd) throws CheckToolException { String input = null; String error = null; try { @@ -129,10 +130,12 @@ versionString = os.toString(); } finally { try { - if (os != null) + if (os != null) { os.close(); - if (is != null) + } + if (is != null) { is.close(); + } } catch (IOException e) { e = null; // ignore the exception } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/tests/src/com/nokia/helium/checktools/tests/TestCheckEngine.java --- a/buildframework/helium/sf/java/checktools/tests/src/com/nokia/helium/checktools/tests/TestCheckEngine.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/tests/src/com/nokia/helium/checktools/tests/TestCheckEngine.java Mon Sep 13 13:11:19 2010 +0800 @@ -53,7 +53,7 @@ /** * Method tests the ant version with valid version set. */ - public void testVerifyAntVersionValid() { + public void testVerifyAntVersionValid() throws CheckToolException { CheckToolException cte = null; Properties props = new Properties(); String str = new ToolChecker().getInstalledToolVersion(OSResolver @@ -73,7 +73,7 @@ /** * Method tests the python version with invalid version set. */ - public void testVerifyPythonVersionInValid() { + public void testVerifyPythonVersionInValid() throws CheckToolException { CheckToolException cte = null; Properties props = new Properties(); props.setProperty("python.version", "0.0.0.0"); @@ -91,7 +91,7 @@ /** * Method tests the python version with valid version set. */ - public void testVerifyPythonVersionValid() { + public void testVerifyPythonVersionValid() throws CheckToolException { CheckToolException cte = null; Properties props = new Properties(); String str = new ToolChecker().getInstalledToolVersion(OSResolver diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/checktools/tests/src/com/nokia/helium/checktools/tests/TestOSResolver.java --- a/buildframework/helium/sf/java/checktools/tests/src/com/nokia/helium/checktools/tests/TestOSResolver.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/checktools/tests/src/com/nokia/helium/checktools/tests/TestOSResolver.java Mon Sep 13 13:11:19 2010 +0800 @@ -31,8 +31,9 @@ /** * Method to test getCommand. + * @throws CheckToolException */ - public void testGetCommand() { + public void testGetCommand() throws CheckToolException { String result = OSResolver.getCommand("test"); String osName = System.getProperty("os.name").toLowerCase(Locale.US); boolean isWindows = osName.indexOf("windows") > -1; @@ -50,7 +51,7 @@ /** * Method to test whether the given os is of Windows family or not. */ - public void testIsOSWindowsFamily() { + public void testIsOSWindowsFamily() throws CheckToolException { String osName = System.getProperty("os.name").toLowerCase(Locale.US); boolean isWindows = osName.indexOf("windows") > -1; boolean result = OSResolver.isOs("windows"); @@ -64,7 +65,7 @@ /** * Method to test whether the given os is of unix family or not. */ - public void testIsOSUnixFamily() { + public void testIsOSUnixFamily() throws CheckToolException { String osName = System.getProperty("os.name").toLowerCase(Locale.US); String pathSeparator = System.getProperty("path.separator"); boolean isUnix = pathSeparator.equals(":") diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailDataSender.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailDataSender.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailDataSender.java Mon Sep 13 13:11:19 2010 +0800 @@ -19,20 +19,27 @@ import java.util.Arrays; import java.util.Properties; -import java.util.Hashtable; import java.util.zip.GZIPOutputStream; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import javax.mail.*; -import javax.mail.internet.*; -import javax.naming.*; -import javax.naming.directory.*; + +import javax.mail.BodyPart; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; import javax.activation.DataHandler; import javax.mail.util.ByteArrayDataSource; +import javax.mail.internet.AddressException; + import org.apache.log4j.Logger; import org.apache.commons.io.FileUtils; @@ -46,7 +53,7 @@ // Address email is sent from private String from; - + // The target address private String[] toAddressList; @@ -57,18 +64,15 @@ // Configured smtp server address private String smtpServerAddress; + /** - * Constructor - * - * @param String - * comma separeted email recepients list - * @param String - * smtp server - * @param String - * ldap server - */ - public EmailDataSender(String toStrings, String smtpServer, - String ldapAddress) { + * Constructor + * + * @param String comma separeted email recepients list + * @param String smtp server + * @param String ldap server + */ + public EmailDataSender(String toStrings, String smtpServer, String ldapAddress) { if (toStrings != null) { String[] splitList = toStrings.split(","); toAddressList = splitList; @@ -76,152 +80,128 @@ smtpServerAddress = smtpServer; ldapURL = ldapAddress; } + /** - * Constructor - * - * @param String - * email recepient list in array - * @param String - * smtp server - * @param String - * ldap server - */ - public EmailDataSender(String[] toList, String smtpServer, - String ldapAddress) { + * Constructor + * + * @param String email recepient list in array + * @param String smtp server + * @param String ldap server + */ + public EmailDataSender(String[] toList, String smtpServer, String ldapAddress) { toAddressList = toList; smtpServerAddress = smtpServer; ldapURL = ldapAddress; } + /** - * Constructor - * - * @param String - * email recepients list in array - * @param String - * smtp server - * @param String - * ldap server - * @param String - * root domain in ldap server - */ - public EmailDataSender(String[] toList, String smtpServer, - String ldapAddress, String rootdn) { + * Constructor + * + * @param String email recepients list in array + * @param String smtp server + * @param String ldap server + * @param String root domain in ldap server + */ + public EmailDataSender(String[] toList, String smtpServer, String ldapAddress, String rootdn) { toAddressList = toList; smtpServerAddress = smtpServer; ldapURL = ldapAddress; this.rootdn = rootdn; } + /** - * Set sender address. - * - * @param String - * mail sender address - */ + * Set sender address. + * + * @param String mail sender address + */ public void setFrom(String from) { this.from = from; } + /** - * Add current user to recipient list. - * - */ - public void addCurrentUserToAddressList() { + * Add current user to recipient list. + * + */ + public void addCurrentUserToAddressList() throws EmailSendException { // Create an empty array if needed - if (toAddressList == null) + if (toAddressList == null) { toAddressList = new String[0]; + } try { - String userEmail; - userEmail = getUserEmail(); - toAddressList = Arrays.copyOf(toAddressList, - toAddressList.length + 1); - toAddressList[toAddressList.length - 1] = userEmail; - } catch (javax.mail.internet.AddressException e) { - return; //does this so that it passes checkstyle and builds - } catch (javax.naming.NamingException e) { - return; //without it build complains that errors are thrown and not caught - //methods are used else where and are caught and exercised. + String[] tmpToAddressList = Arrays.copyOf(toAddressList, toAddressList.length + 1); + tmpToAddressList[tmpToAddressList.length - 1] = getUserEmail(); + toAddressList = tmpToAddressList; + } catch (LDAPException ex) { + throw new EmailSendException(ex.getMessage(), ex); } } + /** - * Get recipient address list. - * - * @return - * Recipient address list. - */ + * Get recipient address list. + * + * @return Recipient address list. + */ private InternetAddress[] getToAddressList() { int toListLength = 0; - if (toAddressList != null) + if (toAddressList != null) { toListLength = toAddressList.length; + } InternetAddress[] addressList = new InternetAddress[toListLength]; try { - log.debug("getToAddressList:length: " - + toListLength); + log.debug("getToAddressList:length: " + toListLength); for (int i = 0; i < toListLength; i++) { - log.debug("getToAddressList:address:" - + toAddressList[i]); + log.debug("getToAddressList:address:" + toAddressList[i]); addressList[i] = new InternetAddress(toAddressList[i]); } - } catch (javax.mail.internet.AddressException aex) { + } + catch (AddressException aex) { log.error("AddressException: " + aex); } return addressList; } + /** - * Send xml data without compression - * - * @param String - * purpose of this email - * @param String - * file to send - * @param String - * mime type - * @param String - * subject of email - * @param String - * header of email - */ - public void sendData(String purpose, String fileToSend, String mimeType, - String subject, String header) { + * Send xml data without compression + * + * @param String purpose of this email + * @param String file to send + * @param String mime type + * @param String subject of email + * @param String header of email + */ + public void sendData(String purpose, File fileToSend, String mimeType, + String subject, String header) throws EmailSendException { sendData(purpose, fileToSend, mimeType, subject, header, false); } - /** - * Sending the XML data(compressed) through email. - * - * @param String - * purpose of this email - * @param String - * file to send - * @param String - * subject of email - * @param String - * header of email - */ - public void compresseAndSendData(String purpose, String fileToSend, - String subject, String header) { + * Sending the XML data(compressed) through email. + * + * @param String purpose of this email + * @param String file to send + * @param String subject of email + * @param String header of email + */ + public void compresseAndSendData(String purpose, File fileToSend, + String subject, String header) throws EmailSendException { sendData(purpose, fileToSend, null, subject, header, true); } + /** - * Send xml data - * - * @param String - * purpose of this email - * @param String - * file to send - * @param String - * mime type - * @param String - * subject of email - * @param String - * header of mail - * @param boolean - * compress data if true - */ - public void sendData(String purpose, String fileToSend, String mimeType, - String subject, String header, boolean compressData) { + * Send xml data + * + * @param String purpose of this email + * @param String file to send + * @param String mime type + * @param String subject of email + * @param String header of mail + * @param boolean compress data if true + */ + public void sendData(String purpose, File fileToSend, String mimeType, + String subject, String header, boolean compressData) throws EmailSendException { try { log.debug("sendData:Send file: " + fileToSend + " and mimetype: " + mimeType); - if (fileToSend != null) { + if (fileToSend != null && fileToSend.exists()) { InternetAddress[] toAddresses = getToAddressList(); Properties props = new Properties(); if (smtpServerAddress != null) { @@ -230,27 +210,22 @@ } Session mailSession = Session.getDefaultInstance(props, null); MimeMessage message = new MimeMessage(mailSession); - String subjectToSend = subject; - if (subject == null) { - subjectToSend = ""; - } - message.setSubject(subjectToSend); + message.setSubject(subject == null ? "" : subject); MimeMultipart multipart = new MimeMultipart("related"); BodyPart messageBodyPart = new MimeBodyPart(); ByteArrayDataSource dataSrc = null; - String fileName = new File(fileToSend).getName(); + String fileName = fileToSend.getName(); if (compressData) { log.debug("Sending compressed data"); dataSrc = compressFile(fileToSend); dataSrc.setName(fileName + ".gz"); messageBodyPart.setFileName(fileName + ".gz"); - } else { + } + else { log.debug("Sending uncompressed data:"); - dataSrc = new ByteArrayDataSource(new FileInputStream( - new File(fileToSend)), mimeType); + dataSrc = new ByteArrayDataSource(new FileInputStream(fileToSend), mimeType); - message.setContent(FileUtils.readFileToString(new File( - fileToSend)), "text/html"); + message.setContent(FileUtils.readFileToString(fileToSend), "text/html"); multipart = null; } String headerToSend = null; @@ -266,113 +241,82 @@ message.setContent(multipart); } try { - InternetAddress fromAddress = getFromAddress(); - message.setFrom(fromAddress); - } catch (HlmAntLibException e) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Error retrieving current user email address: " + e.getMessage(), e); - } catch (javax.mail.internet.AddressException e) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Error retrieving current user email address: " + e.getMessage(), e); - } catch (javax.naming.NamingException e) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Error retrieving current user email address: " + e.getMessage(), e); + message.setFrom(getFromAddress()); + } + catch (AddressException e) { + throw new EmailSendException("Error retrieving the from address: " + e.getMessage(), e); + } catch (LDAPException e) { + throw new EmailSendException("Error retrieving the from address: " + e.getMessage(), e); } message.addRecipients(Message.RecipientType.TO, toAddresses); log.info("Sending email alert: " + subject); Transport.send(message); } - } catch (javax.mail.MessagingException e) { - String errorMessage = e.getMessage(); + } catch (MessagingException e) { String fullErrorMessage = "Failed sending e-mail: " + purpose; - if (errorMessage != null) { - fullErrorMessage += " " + errorMessage; + if (e.getMessage() != null) { + fullErrorMessage += ": " + e.getMessage(); } - } catch (java.io.IOException e) { - String errorMessage = e.getMessage(); + throw new EmailSendException(fullErrorMessage, e); + } catch (IOException e) { String fullErrorMessage = "Failed sending e-mail: " + purpose; - if (errorMessage != null) { - fullErrorMessage += " " + errorMessage; + if (e.getMessage() != null) { + fullErrorMessage += ": " + e.getMessage(); } // We are Ignoring the errors as no need to fail the build. - log.info(fullErrorMessage); + throw new EmailSendException(fullErrorMessage, e); } } /** * GZipping a string. * - * @param data - * the content to be gzipped. - * @param filename - * the name for the file. + * @param data the content to be gzipped. + * @param filename the name for the file. * @return a ByteArrayDataSource. */ - protected ByteArrayDataSource compressFile(String fileName) - throws IOException { + protected ByteArrayDataSource compressFile(File fileName) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); GZIPOutputStream gz = new GZIPOutputStream(out); - BufferedInputStream bufferedInputStream = new BufferedInputStream( - new FileInputStream(new File(fileName))); + BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(fileName)); byte[] dataBuffer = new byte[512]; while ((bufferedInputStream.read(dataBuffer)) != -1) { gz.write(dataBuffer); } gz.close(); bufferedInputStream.close(); - ByteArrayDataSource dataSrc = new ByteArrayDataSource( - out.toByteArray(), "application/x-gzip"); + ByteArrayDataSource dataSrc = new ByteArrayDataSource(out.toByteArray(), "application/x-gzip"); return dataSrc; } + /** - * Get sender address. - * - * @return - * sender address. - */ - private InternetAddress getFromAddress() throws javax.mail.internet.AddressException, javax.naming.NamingException { + * Get sender address. + * + * @return sender address. + * @throws AddressException + * @throws LDAPException + */ + private InternetAddress getFromAddress() throws AddressException, LDAPException { if (from != null) { return new InternetAddress(from); } return new InternetAddress(getUserEmail()); } - + /** * Getting user email. * - * @return - * the user email address. + * @return the user email address. */ - protected String getUserEmail() throws javax.mail.internet.AddressException, javax.naming.NamingException { - String username = System.getProperty("user.name"); - log.debug("EmailDataSender:getUserEmail:username: " + username); - - // Set up environment for creating initial context - Hashtable env = new Hashtable(11); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - env.put(Context.PROVIDER_URL, ldapURL + "/" + rootdn); - - // Create initial context - DirContext ctx = new InitialDirContext(env); - SearchControls controls = new SearchControls(); - controls.setSearchScope(SearchControls.SUBTREE_SCOPE); - try { - NamingEnumeration en = ctx.search("", "uid=" + username, controls); - if (en.hasMore()) { - SearchResult sr = en.next(); - if (sr.getAttributes().get("mail") != null) { - String email = (String) sr.getAttributes().get("mail").get(); - log.debug("getUserEmail:" + email); - return email; - } + protected String getUserEmail() throws LDAPException { + if (ldapURL != null) { + LDAPHelper helper = new LDAPHelper(this.ldapURL, this.rootdn); + String email = helper.getUserAttributeAsString(LDAPHelper.EMAIL_ATTRIBUTE_NAME); + if (email == null) { + throw new LDAPException("Could not find email for current user. (" + System.getProperty("user.name") + ")"); } - } catch (javax.naming.NameNotFoundException ex) { - throw new HlmAntLibException("Error finding user email for " + username ); + return email; } - throw new HlmAntLibException("Could not find user email in LDAP."); + throw new LDAPException("LDAP url is not defined."); } } - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailSendException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/EmailSendException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.core; + +/** + * Email sending exception handling class + */ +public class EmailSendException extends Exception { + + private static final long serialVersionUID = 7997902958106522082L; + + /** + * Constructor + * + * @param String + * exception message + */ + public EmailSendException(String exception) { + super(exception); + } + + public EmailSendException(String exception, Throwable cause) { + super(exception, cause); + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/HlmAntLibException.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/HlmAntLibException.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.core; - -/** - * HlmAntlib exception handling class - */ -public class HlmAntLibException extends RuntimeException { - - private static final long serialVersionUID = -2504337723465536053L; - - /** - * Constructor - * - * @param String - * exception message - */ - public HlmAntLibException(String msg) { - super("HlmAntLibException:generic:" + msg); - } - - /** - * Constructor - * - * @param String - * module which throws the exception - * @param String - * exception message - */ - public HlmAntLibException(String module, String msg) { - super("HlmAntLibException:" + module + ":" + msg); - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/LDAPException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/LDAPException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.core; + +/** + * Exception occuring during LDAP search. + * + */ +public class LDAPException extends Exception { + + private static final long serialVersionUID = -4843665216704377558L; + + /** + * Create an exception with a message. + * @param message the error message + */ + public LDAPException(String message) { + super(message); + } + + /** + * Create an exception with a message and a root cause. + * @param message the error message + * @param cause the root cause + */ + public LDAPException(String message, Throwable cause) { + super(message, cause); + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/LDAPHelper.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/LDAPHelper.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.core; + +import java.util.Hashtable; + +import javax.naming.Context; +import javax.naming.NameNotFoundException; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import javax.naming.directory.SearchControls; +import javax.naming.directory.SearchResult; + +/** + * Simpler LDAP interface to retrieve user base attribute. + * + */ +public class LDAPHelper { + public static final String EMAIL_ATTRIBUTE_NAME = "mail"; + private String ldapURL; + private String rootdn; + + /** + * Construct a LDAP helper for a specific server. + * @param ldapURL the ldap url (e.g: ldap://server:389) + * @param rootdn the rootdn value. + */ + public LDAPHelper(String ldapURL, String rootdn) { + if (ldapURL == null) { + throw new IllegalArgumentException("The ldap server url cannot be null."); + } + if (rootdn == null) { + throw new IllegalArgumentException("The rootdn cannot be null."); + } + this.ldapURL = ldapURL; + this.rootdn = rootdn; + } + + /** + * Get the value of the LDAP attribute for a filter. + * @param filter the filter to search for + * @param attribute the attribute name. + * @return the value of the attribute as a string., if the value is not a String then it is + * stringify using toString. Returns null if not found. + * @throws LDAPException + */ + public String getAttributeAsString(String filter, String attribute) throws LDAPException { + if (filter == null) { + throw new IllegalArgumentException("filter cannot be null."); + } + if (attribute == null) { + throw new IllegalArgumentException("attribute cannot be null."); + } + // Set up environment for creating initial context + Hashtable env = new Hashtable(11); + env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); + env.put(Context.PROVIDER_URL, ldapURL + "/" + rootdn); + + // Create initial context + try { + DirContext ctx = new InitialDirContext(env); + SearchControls controls = new SearchControls(); + controls.setSearchScope(SearchControls.SUBTREE_SCOPE); + NamingEnumeration en = ctx.search("", filter, controls); + if (en.hasMore()) { + SearchResult sr = en.next(); + if (sr.getAttributes().get(attribute) != null) { + Object value = sr.getAttributes().get(attribute).get(); + if (value instanceof String) { + return (String)value; + } else { + return value.toString(); + } + } + } + } catch (NameNotFoundException ex) { + throw new LDAPException("Could not find " + filter + " attribute " + attribute + " in LDAP: " + ex.getMessage(), ex); + } catch (NamingException ex) { + throw new LDAPException("Could not find " + filter + " attribute " + attribute + " in LDAP: " + ex.getMessage(), ex); + } + return null; + } + + /** + * Get the value of the LDAP attribute for current user. (based on user.name). + * @param attribute the attribute name. + * @return the value of the attribute as a string., if the value is not a String then it is + * stringify using toString. Returns null if not found. + * @throws LDAPException + */ + public String getUserAttributeAsString(String attribute) throws LDAPException { + return getUserAttributeAsString(System.getProperty("user.name"), attribute); + } + + /** + * Get the value of the LDAP attribute for username. + * @param username the user to search for + * @param attribute the attribute name. + * @return the value of the attribute as a string., if the value is not a String then it is + * stringify using toString. Returns null if not found. + * @throws LDAPException + */ + public String getUserAttributeAsString(String username, String attribute) throws LDAPException { + return getAttributeAsString("uid=" + username, attribute); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/LogSource.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/LogSource.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/LogSource.java Mon Sep 13 13:11:19 2010 +0800 @@ -28,9 +28,9 @@ */ public class LogSource extends DataType { - public File getFilename() { + public File getFilename() throws LogSourceException { //will be implemented by subclasses - throw new HlmAntLibException("Improper logsource usage"); + throw new LogSourceException("Improper logsource usage"); } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/LogSourceException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/LogSourceException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.core; + +/** + * LogSource exception handling class + */ +public class LogSourceException extends Exception { + + + /** + * Constructor + * + * @param String + * exception message + */ + public LogSourceException(String exception) { + super(exception); + } + +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/MessageCreationException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/MessageCreationException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.helium.core; + +/** + * Exception class for Messagecreation implementation + * + */ +public class MessageCreationException extends Exception { + + /** + * Constructor + * + * @exception - exception to be processed. + */ + + public MessageCreationException(String exception) { + super("Message Creation Error: " + exception); + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/MultiCauseBuildException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/MultiCauseBuildException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.core; + +import java.io.PrintStream; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Vector; + +import org.apache.tools.ant.BuildException; + +/** + * A MultiCauseBuildException class used by the HeliumExecutor plugin to store + * the failures caused in the course of a build. + * + */ +public class MultiCauseBuildException extends BuildException { + + private static final long serialVersionUID = -4843675216704377447L; + + private Vector causes = new Vector(); + + /** + * Construct a new multicause build exception with no detail message and no + * cause. + */ + public MultiCauseBuildException() { + super(); + } + + /** + * Construct a new multi-cause build exception with the given detail message + * and no cause. + * + * @param msg + * Detail message. + */ + public MultiCauseBuildException(String msg) { + super(msg); + } + + /** + * Construct a new multi-cause build exception with no detail message and + * the given cause. + * + * @param cause + * the cause of failure. + */ + public MultiCauseBuildException(Throwable cause) { + super(); + causes.add(cause); + } + + /** + * Construct a new multi-cause exception with the given detail message and + * the given cause. + * + * @param msg + * Detail message. + * @param cause + * the cause of failure + * + */ + public MultiCauseBuildException(String msg, Throwable cause) { + super(msg); + causes.add(cause); + } + + /** + * Method adds the given throwable instance. + * + * @param th + * the throwbale instance to be added. + */ + public void add(Throwable th) { + causes.add(th); + } + + /** + * {@inheritDoc} + */ + public StackTraceElement[] getStackTrace() { + List stackTraceElements = new ArrayList(); + for (Throwable th : causes) { + stackTraceElements.addAll(Arrays.asList(th.getStackTrace())); + } + return stackTraceElements + .toArray(new StackTraceElement[stackTraceElements.size()]); + } + + /** + * {@inheritDoc} + */ + public void printStackTrace(PrintStream ps) { + synchronized (ps) { + super.printStackTrace(ps); + int i = 1; + for (Throwable cause : causes) { + ps.printf("MultiCauseBuildException caused by [%d]: ", i++); + cause.printStackTrace(ps); + } + } + } + + /** + * {@inheritDoc} + */ + public void printStackTrace(PrintWriter pw) { + synchronized (pw) { + super.printStackTrace(pw); + int i = 1; + for (Throwable cause : causes) { + pw.printf("MultiCauseBuildException caused by [%d]: ", i++); + cause.printStackTrace(pw); + } + } + } + + /** + * {@inheritDoc} + */ + public String getMessage() { + String message = super.getMessage(); + for (Throwable th : causes) { + if (message == null) { + message = th.getMessage(); + } else { + message += "\n" + th.getMessage(); + } + } + return message; + } + + /** + * Returns the location of the error and the error message. + * + * @return the location of the error and the error message + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + for (Throwable th : causes) { + buffer.append(th); + buffer.append("\n"); + } + return buffer.toString(); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/PPHash.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/PPHash.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.core; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -import freemarker.template.ObjectWrapper; -import freemarker.template.SimpleCollection; -import freemarker.template.SimpleScalar; -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateModel; -import fmpp.Engine; -import fmpp.models.AddTransform; -import fmpp.models.ClearTransform; -import fmpp.models.CopyWritableVariableMethod; -import fmpp.models.NewWritableHashMethod; -import fmpp.models.NewWritableSequenceMethod; -import fmpp.models.RemoveTransform; -import fmpp.models.SetTransform; - -/** - * Downgraded implementation which makes the PPHash public (from FMPP). - */ -public class PPHash implements TemplateHashModelEx { - private Map map = new HashMap(); - - /** - * Constructor - * - */ - public PPHash() { - // transforms - put("set", new SetTransform()); - put("add", new AddTransform()); - put("remove", new RemoveTransform()); - put("clear", new ClearTransform()); - - // methods - put("newWritableSequence", new NewWritableSequenceMethod()); - put("newWritableHash", new NewWritableHashMethod()); - put("copyWritable", new CopyWritableVariableMethod()); - - // constants - put("slash", File.separator); - put("version", Engine.getVersionNumber()); - put("freemarkerVersion", Engine.getFreeMarkerVersionNumber()); - - } - /** - * Get number of templates. - * - * @return - * Number of templates. - */ - public int size() { - return map.size(); - } - - /** - * Get templates. - * - * @return - * templates. - */ - public TemplateCollectionModel keys() { - return new SimpleCollection(map.keySet(), ObjectWrapper.SIMPLE_WRAPPER); - } - - /** - * Get template values. - * - * @return - * template values. - */ - public TemplateCollectionModel values() { - return new SimpleCollection(map.values(), ObjectWrapper.SIMPLE_WRAPPER); - } - - /** - * Get a template. - * - * @param String - * key for template - * @return - * a template. - */ - public TemplateModel get(String key) { - return map.get(key); - } - - /** - * Check if there are any template. - * - * @return - * True if no template. - */ - public boolean isEmpty() { - return map.isEmpty(); - } - /** - * Add template - * - * @param String - * name of template - * @param TemplateModel - * value - */ - public void put(String name, TemplateModel value) { - map.put(name, value); - } - /** - * Add template - * - * @param String - * name of template - * @param String - * value - */ - public void put(String name, String value) { - map.put(name, new SimpleScalar(value)); - } - - /** - * Delete template - * - * @param String - * name of template - */ - public void remove(String name) { - map.remove(name); - } -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/PPInputSource.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/PPInputSource.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.core; -/** - * Template source. - */ -public class PPInputSource implements TemplateInputSource { - - private String name = "pp"; - - /** - * Get source name - * - * @return - * name of source - */ - @Override - public String getSourceName() { - return name; - } - - /** - * Get hash - * - * @return - * hash - */ - public PPHash getPPHash() { - return new PPHash(); - } -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/TemplateProcessor.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/TemplateProcessor.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/TemplateProcessor.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,16 +17,17 @@ package com.nokia.helium.core; -import freemarker.template.Template; -import freemarker.template.Configuration; - +import java.io.File; import java.io.FileWriter; -import java.io.File; +import java.util.HashMap; import java.util.List; -import java.util.HashMap; import java.util.Map; + import org.apache.log4j.Logger; +import freemarker.template.Configuration; +import freemarker.template.Template; + /** * Template processor. * @@ -61,10 +62,6 @@ PropertiesSource propSource = (PropertiesSource) source; templateMap.put(propSource.getSourceName(), propSource .getProperties()); - } else if (source instanceof PPInputSource) { - PPInputSource ppSource = (PPInputSource) source; - templateMap.put(ppSource.getSourceName(), ppSource - .getPPHash()); } } } catch (java.io.IOException e) { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HeliumExecutor.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HeliumExecutor.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HeliumExecutor.java Mon Sep 13 13:11:19 2010 +0800 @@ -14,262 +14,283 @@ * Description: * */ - package com.nokia.helium.core.ant; -import java.util.StringTokenizer; -import java.util.Vector; -import java.util.Enumeration; -import java.util.List; -import java.io.BufferedReader; -import java.io.FileWriter; -import java.io.InputStream; import java.io.File; import java.io.IOException; -import java.io.InputStreamReader; -import java.net.JarURLConnection; +import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; - -import org.apache.tools.ant.taskdefs.ImportTask; -import org.apache.tools.ant.helper.DefaultExecutor; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Target; -import org.apache.tools.ant.Location; -import com.nokia.helium.core.ant.types.*; - -import java.util.HashMap; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Map; import java.util.jar.JarEntry; import java.util.jar.JarFile; -import org.apache.log4j.Logger; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.BuildListener; +import org.apache.tools.ant.BuildLogger; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.ProjectHelper; +import org.apache.tools.ant.helper.DefaultExecutor; + +import com.nokia.helium.core.MultiCauseBuildException; +import com.nokia.helium.core.ant.types.HlmDefList; /** * This class implements a flexible Ant Executor which allows dynamic discovery * and automatic loading of new features. It also supports pre/post actions to * be executed. + * */ public class HeliumExecutor extends DefaultExecutor { - private HashMap> preOperations = new HashMap>(); - private HashMap> postOperations = new HashMap>(); - private HashMap> exceptionHandlers = new HashMap>(); - private Project project; - private Logger log = Logger.getLogger(HeliumExecutor.class); + + private static final String HELP_TARGET = "help"; + + private List hlmDefCache = new ArrayList(); + private MultiCauseBuildException failure; /** - * Override the default Ant executor. + * Execute the specified Targets for the specified Project. * * @param project - * Object of the project + * the Ant Project. * @param targetNames - * Array of target names to execute - * + * String[] of Target names. + * @throws BuildException + * on error */ public void executeTargets(Project project, String[] targetNames) { - this.project = project; - log.debug("Running executeTargets"); - BuildException failure = null; - try { - loadModules(project); - doOperations(preOperations, project, targetNames); - super.executeTargets(project, targetNames); - } catch (BuildException e) { - // Saving current issue - // We are Ignoring the errors as no need to fail the build. - failure = e; + if (targetNames.length > 1 && targetNames[0].equals(HELP_TARGET)) { + displayHelp(project, targetNames); + } else { + executeRegularTargets(project, targetNames); } + } + /** + * Execute the given targets. + * + * @param project + * is the ant project + * @param targetNames + * array of target names to be executed. + */ + public void executeRegularTargets(Project project, String[] targetNames) { + project.log("Running executeTargets", Project.MSG_DEBUG); + loadModules(project); + handlePreBuildActions(project, targetNames); try { - doOperations(postOperations, project, targetNames); - } catch (BuildException e) { - // Treating possible new issues... - if (failure != null) { - failure = new BuildException(e.toString() + failure.toString()); - } else { - failure = e; - } - } - // Propagating any raised issues. - if (failure != null) { - handleExceptions(project, failure); - throw failure; + super.executeTargets(project, targetNames); + } catch (BuildException be) { + recordFailure(be); + } finally { + handlePostBuildActions(project, targetNames); + // Propagating any raised issues. + handleException(project); } } /** - * Loading all the discovered modules. + * Method loads all the available helium modules from the system classpath. * - * @param module - * @param prj + * @param project + * is the ant project. */ - private void loadModules(Project prj) { - List moduleList = loadAvailableModules(); - for (File moduleName : moduleList) { - loadModule(moduleName, prj); + @SuppressWarnings("unchecked") + private void loadModules(Project project) { + try { + List modules = getAvailableModules(); + project.log("Total no of modules available : " + modules.size(), Project.MSG_DEBUG); + for (URL module : modules) { + loadModule(project, module); + } + Map references = (Hashtable)project.getReferences(); + for (String key : references.keySet()) { + Object refObj = references.get(key); + if (refObj instanceof HlmDefList) { + hlmDefCache.add((HlmDefList)refObj); + project.log("Total pre build actions : " + + ((HlmDefList)refObj).getPreBuildActions().size(), Project.MSG_DEBUG); + project.log("Total post build actions : " + + ((HlmDefList)refObj).getPostBuildActions().size(), Project.MSG_DEBUG); + project.log("Total exception handlers : " + + ((HlmDefList)refObj).getExceptionHandlers().size(), Project.MSG_DEBUG); + } + } + } catch (BuildException be) { + recordFailure(be); } } /** - * Load a specific module. + * Returns a list of available helium modules from the system classpath. * - * @param moduleLib - * @param prj + * @return a list of helium module files. */ - private void loadModule(File moduleLib, Project prj) { - String file = getHlmAntLibFile(moduleLib); - if (file == null) { - return; - } - log.debug("Loading " + moduleLib.getName()); - ImportTask task = new ImportTask(); - Target target = new Target(); - target.setName(""); - target.setProject(prj); - task.setOwningTarget(target); - task.setLocation(new Location(file)); - task.setFile(file); - task.setProject(prj); - task.execute(); - String moduleName = getModuleName(moduleLib); - Object refObject = prj.getReference(moduleName + ".list"); - - if (refObject == null) { - log.debug(moduleName + ".list not found"); + private List getAvailableModules() { + List moduleList = new ArrayList(); + String classpathString = System.getProperty("java.class.path"); + String[] modules = classpathString.split(File.pathSeparator); + File module = null; + URL url = null; + for (String moduleName : modules) { + module = new File(moduleName); + if (module != null && module.isFile() + && module.getName().endsWith(".jar")) { + try { + String hlmAntlibXmlFile = findHeliumAntlibXml(new JarFile( + module)); + if (hlmAntlibXmlFile != null) { + url = new URL("jar:" + module.toURI().toString() + "!/" + + hlmAntlibXmlFile); + moduleList.add(url); + } + } catch (MalformedURLException me) { + throw new BuildException( + "Error occured while getting helium module " + + module + " : ", me); + } catch (IOException ioe) { + throw new BuildException("Error reading file " + module + + ": " + ioe.getMessage(), ioe); + } + } } - if (refObject != null && refObject instanceof HlmDefList) { - HlmDefList defList = (HlmDefList) refObject; - Vector tempDefList = new Vector( - defList.getPreDefList()); - if (tempDefList != null) { - preOperations.put(moduleName, tempDefList); - } - Vector tempPostDefList = new Vector( - defList.getPostDefList()); - if (tempPostDefList != null) { - postOperations.put(moduleName, tempPostDefList); - } - Vector tempExceptionDefList = defList - .getExceptionHandlerList(); - if (tempExceptionDefList != null) { - exceptionHandlers.put(moduleName, tempExceptionDefList); - } - log.debug("loadModule:pre-opsize: " - + preOperations.size()); - log.debug("loadModule:post-opsize: " - + postOperations.size()); - log.debug("loadModule:exception-opsize: " - + exceptionHandlers.size()); - log.debug("Checking " + moduleLib); - } + return moduleList; } /** * Search for helium.antlib.xml under the module Jar. * - * @param moduleLib - * @return - * @throws IOException + * @param jarFile + * is the jar to be searched in. + * @return the helium.antlib.xml */ - protected URL findHeliumAntlibXml(File moduleLib) throws IOException { - JarFile jarFile = new JarFile(moduleLib); - Enumeration jee = jarFile.entries(); - while (jee.hasMoreElements()) { - JarEntry je = jee.nextElement(); + private String findHeliumAntlibXml(JarFile jarFile) { + String hlmAntlibXmlFile = null; + for (Enumeration jarEntries = jarFile.entries(); jarEntries + .hasMoreElements();) { + JarEntry je = jarEntries.nextElement(); if (je.getName().endsWith("/helium.antlib.xml")) { - return new URL("jar:" + moduleLib.toURI().toString() + "!/" - + je.getName()); + hlmAntlibXmlFile = je.getName(); + break; } } - return null; + return hlmAntlibXmlFile; } /** - * Retrieve the found helium.antlib.xml. TODO improve if possible without - * extracting the file. + * Method loads the specified module . * - * @param moduleLib - * @return + * @param project + * is the ant project. + * @param module + * the helium module to be loaded. */ - private String getHlmAntLibFile(File moduleLib) { - log.debug("[HeliumExecutor] Checking " + moduleLib); - try { - URL url = findHeliumAntlibXml(moduleLib); - if (url == null) - return null; - log.debug("Getting " + url); - - JarURLConnection jarConnection = (JarURLConnection) url - .openConnection(); - JarEntry jarEntry = jarConnection.getJarEntry(); - JarFile jarFile = new JarFile(moduleLib); - InputStream is = jarFile.getInputStream(jarEntry); - InputStreamReader isr = new InputStreamReader(is); - BufferedReader reader = new BufferedReader(isr); - File file = File.createTempFile("helium", "antlib.xml"); - file.deleteOnExit(); - FileWriter writer = new FileWriter(file); - String line; - while ((line = reader.readLine()) != null) { - writer.write(line + "\n"); - } - writer.close(); - reader.close(); - log.debug("Temp file " + file.getAbsolutePath()); - return file.getAbsolutePath(); - } catch (IOException ex) { - log.error("Error: " + ex.getMessage(), ex); - return null; - } + private void loadModule(Project project, URL module) { + project.log("Loading module : " + module.toString(), Project.MSG_DEBUG); + ProjectHelper helper = (ProjectHelper) project + .getReference(ProjectHelper.PROJECTHELPER_REFERENCE); + helper.parse(project, module); } - private void doOperations( - HashMap> operations, Project prj, - String[] targetNames) { - log.debug("doOperations: start"); - for (String moduleName : operations.keySet()) { - log.debug("doOperations: module: " + moduleName); - for (HlmDefinition definition : operations.get(moduleName)) { - definition.execute(prj, moduleName, targetNames); + /** + * Method handles all the pre build events. + * + * @param project + * is the ant project. + * @param targets + * an array of target names. + */ + private void handlePreBuildActions(Project project, String[] targets) { + for (HlmDefList hlmDefList : hlmDefCache) { + for (PreBuildAction event : hlmDefList.getPreBuildActions()) { + try { + event.executeOnPreBuild(project, targets); + } catch (BuildException be) { + // Saving current issue + // We are Ignoring the errors as no need to fail the build. + recordFailure(be); + } } } } - private void handleExceptions(Project prj, Exception e) { - for (String moduleName : this.exceptionHandlers.keySet()) { - log.debug("handleExceptions: module: " + moduleName); - for (HlmExceptionHandler exceptionHandler : this.exceptionHandlers - .get(moduleName)) { - exceptionHandler.handleException(prj, moduleName, e); + /** + * Method handles all the post build events. + * + * @param project + * is the ant project. + * @param targets + * an array of target names. + */ + private void handlePostBuildActions(Project project, String[] targets) { + for (HlmDefList hlmDefList : hlmDefCache) { + for (PostBuildAction event : hlmDefList.getPostBuildActions()) { + try { + event.executeOnPostBuild(project, targets); + } catch (BuildException be) { + // Treating possible new issues... + recordFailure(be); + } } } } - private String getModuleName(File moduleLib) { - String name = moduleLib.getName(); - name = name.substring(0, name.lastIndexOf('.')); - // The module name can ends with a version - if (name.matches("(\\w|-)+-\\d+(\\.\\d+)+")) { - name = name.substring(0, name.lastIndexOf('-')); + /** + * Records a build failure. + * + * @param be + * a build failure. + */ + private void recordFailure(BuildException be) { + if (failure == null) { + failure = new MultiCauseBuildException(); } - return name; + failure.add(be); } - private List loadAvailableModules() { - List moduleList = new ArrayList(); - String classpathString = System.getProperty("java.class.path"); - StringTokenizer tokenizier = new StringTokenizer(classpathString, - File.pathSeparator); - String token; - while (tokenizier.hasMoreTokens()) { - token = (String) tokenizier.nextToken(); - if (new File(token).isFile() && token.endsWith(".jar")) { - moduleList.add(new File(token)); + /** + * Method handles the recored build failures if any. + * + * @param project + * is the ant project. + */ + private void handleException(Project project) { + if (failure != null) { + for (HlmDefList hlmDefList : hlmDefCache) { + for (HlmExceptionHandler handler : hlmDefList + .getExceptionHandlers()) { + try { + handler.handleException(project, failure); + } catch (BuildException be) { + // Treating possible new issues... + recordFailure(be); + } + } + } + throw failure; + } + } + + @SuppressWarnings("unchecked") + private void displayHelp(Project project, String[] targetNames) { + if (targetNames.length > 1) { + project.setProperty("help.item", targetNames[1]); + } + // Set Emacs mode to true for all listeners, so that help text does + // not have [echo] at the start of each line + Iterator iter = project.getBuildListeners().iterator(); + while (iter.hasNext()) { + BuildListener listener = iter.next(); + if (listener instanceof BuildLogger) { + BuildLogger logger = (BuildLogger) listener; + logger.setEmacsMode(true); } } - return moduleList; + // Run the 'help' target + project.executeTarget(HELP_TARGET); } - - protected Project getProject() { - return project; - } -} \ No newline at end of file +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HlmDefinition.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HlmDefinition.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.core.ant; - -import org.apache.tools.ant.Project; - -/** - * This interface defines the API of an HeliumExecutor task. - */ -public interface HlmDefinition { - - /** - * This method will implement the action to be performed by the - * HeliumExecutor plugin. - * @param prj - * @param module - */ - void execute(Project prj, String module, String[] targetNames); -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HlmExceptionHandler.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HlmExceptionHandler.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/HlmExceptionHandler.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,36 +1,35 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.core.ant; import org.apache.tools.ant.Project; /** - * This interface defines the API of an HeliumExecutor task. + * This interface defines the API of an HeliumExecutor task and is used for + * exception handling in helium. */ public interface HlmExceptionHandler { - + /** - * This method will implement the action to be performed by the - * HeliumExecutor plugin. - * @param project - * @param module - * @param exception + * Method handles the given exception. + * + * @param project is the ant project. + * @param exception is the exception to be handled. */ - void handleException(Project project, String module, Exception exception); + void handleException(Project project, Exception exception); } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/Message.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/Message.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,36 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.helium.core.ant; + +import java.io.InputStream; +import com.nokia.helium.core.MessageCreationException; + +/** + * Interface describing the method a Message must implements. + * + */ +public interface Message { + + /** + * Get an InputStream on the serialize the message + * @return an InputStream + * @throws MessageCreationException happens in case of serialization error. + */ + InputStream getInputStream() throws MessageCreationException; +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/PostBuildAction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/PostBuildAction.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.core.ant; + +import org.apache.tools.ant.Project; + +/** + * This interface defines the API of an HeliumExecutor task. The Sub classes + * performing any post build actions should implement this interface. + * + */ +public interface PostBuildAction { + + /** + * Method executes a post build action. + * + * @param project + * is the ant project. + * @param targetNames + * an array of target names. + */ + void executeOnPostBuild(Project project, String[] targetNames); + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/PreBuildAction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/PreBuildAction.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,37 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.core.ant; + +import org.apache.tools.ant.Project; + +/** + * This interface defines the API of an HeliumExecutor task. The Sub classes + * performing any pre build actions should implement this interface. + * + */ +public interface PreBuildAction { + + /** + * Method executes a pre build action. + * + * @param project + * is the ant project. + * @param targetNames + * an array of target names. + */ + void executeOnPreBuild(Project project, String[] targetNames); +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/antlib.xml --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -39,9 +39,13 @@ + + - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/conditions/XMLLogCondition.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/conditions/XMLLogCondition.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/conditions/XMLLogCondition.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,12 +18,16 @@ package com.nokia.helium.core.ant.conditions; import java.io.File; -import org.apache.tools.ant.BuildException; + import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import org.xml.sax.*; -import org.xml.sax.helpers.*; -import com.nokia.helium.core.ant.types.ConditionType; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.taskdefs.condition.Condition; +import org.apache.tools.ant.types.DataType; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; /** * This class implements a Ant Condition which report true if it finds any @@ -42,7 +46,7 @@ * * @ant.type name="hasSeverity" category="Core" */ -public class XMLLogCondition extends ConditionType { +public class XMLLogCondition extends DataType implements Condition { // The severity to count private String severity; @@ -84,8 +88,9 @@ //this.log("Error: Log file does not exist " + fileName); return -1; } - if (severity == null) + if (severity == null) { throw new BuildException("'severity' attribute is not defined"); + } //this.log("Looking for severity '" + severity + "' under '" + fileName.getAbsolutePath() + "'"); SAXParserFactory factory = SAXParserFactory.newInstance(); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/filters/PrettyPrintXmlFilter.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/filters/PrettyPrintXmlFilter.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/filters/PrettyPrintXmlFilter.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,6 +17,7 @@ package com.nokia.helium.core.ant.filters; +import java.io.IOException; import java.io.StringWriter; import org.apache.tools.ant.BuildException; @@ -25,7 +26,6 @@ import org.dom4j.DocumentHelper; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; -import java.io.IOException; /** * Prints xml file in pretty format. @@ -59,8 +59,9 @@ throw new BuildException(exc.getMessage(), exc); } finally { try { - if (writer != null) + if (writer != null) { writer.close(); + } } catch (IOException exc) { throw new BuildException(exc.getMessage(), exc); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/listener/TargetTimesLogGeneratorListener.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/listener/TargetTimesLogGeneratorListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/listener/TargetTimesLogGeneratorListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,8 @@ package com.nokia.helium.core.ant.listener; import java.io.DataOutputStream; +import java.io.File; import java.io.FileOutputStream; -import java.io.File; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -92,8 +92,9 @@ targetTimesLogCsv, true); timesLogOut = new DataOutputStream(timesLogFileStream); // Display (sorted) hashtable. - for (String targetTime : targetTimesTable) + for (String targetTime : targetTimesTable) { timesLogOut.writeBytes(targetTime + "\n"); + } timesLogOut.close(); } } catch (java.io.FileNotFoundException ex) { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetFreeDriveTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetFreeDriveTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetFreeDriveTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,14 +17,15 @@ package com.nokia.helium.core.ant.taskdefs; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Task; import java.io.File; -import org.apache.tools.ant.taskdefs.condition.Os; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.taskdefs.condition.Os; + /** * Returns Next Free Drive available to use * diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetValueFromVariableSetTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetValueFromVariableSetTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/GetValueFromVariableSetTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,34 +1,35 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.core.ant.taskdefs; +import java.util.Vector; + import org.apache.tools.ant.BuildException; -import java.util.Vector; +import org.apache.tools.ant.Task; import com.nokia.helium.core.ant.MappedVariable; import com.nokia.helium.core.ant.VariableMap; -import org.apache.tools.ant.Task; import com.nokia.helium.core.ant.types.VariableSet; - /** - * To retrive a variable value from a collection of variable set based on name, which contains property-value in pair. - * + * To retrive a variable value from a collection of variable set based on name, which contains + * property-value in pair. + * *
  * Example:
  * 
@@ -42,23 +43,24 @@
  * <hlm:argSet refid="test.variableSet"/>
  * </hlm:getVariableValue>
  * 
+ * * @ant.task name="getVariableValue" */ public class GetValueFromVariableSetTask extends Task { private String name; private String property; private boolean failOnError = true; - - private Vector variableMaps = new Vector(); - + + private Vector variableMaps = new Vector(); + public void setName(String name) { this.name = name; } /** - * Helper function to set failonerror attribute for the task. - * @param failStatus, if true will fail the build if no variable is found for - * matching name. + * Helper function to set failonerror attribute for the task. + * + * @param failStatus, if true will fail the build if no variable is found for matching name. */ public void setFailOnError(boolean failStatus) { failOnError = failStatus; @@ -66,6 +68,7 @@ /** * Helper function to store the name of the property where the value to be stored + * * @param property name of the property where the result to be stored */ public void setProperty(String property) { @@ -73,7 +76,8 @@ } /** - * Helper function to create the VariableIFImpl object. + * Helper function to create the VariableIFImpl object. + * * @return created VariableIFImpl instance */ public VariableSet createVariableIFImpl() { @@ -82,9 +86,9 @@ return var; } - /** * Helper function to add the newly created variable set. Called by ant. + * * @param vs variable set to be added. */ public void add(VariableMap vs) { @@ -95,23 +99,24 @@ if (variableMaps.isEmpty()) { throw new BuildException("variable interface cannot be null"); } - if (variableMaps.size() > 1 ) { + if (variableMaps.size() > 1) { throw new BuildException("maximum one variable interface can be set"); } return variableMaps.elementAt(0); } - /** * Task to get the name / value pair + * * @return return the name / value pair for the variable set. */ public void execute() { - if (name == null) + if (name == null) { throw new BuildException("'name' attribute has not been defined."); - if (property == null) - throw new BuildException( - "'property' attribute has not been defined."); + } + if (property == null) { + throw new BuildException("'property' attribute has not been defined."); + } VariableMap variableMap = getVariableInterface(); for (MappedVariable var : variableMap.getVariables()) { if (var.getName().equals(name)) { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/LDAPTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/LDAPTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/LDAPTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,11 +17,12 @@ package com.nokia.helium.core.ant.taskdefs; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.tools.ant.BuildException; -import javax.naming.*; -import javax.naming.directory.*; -import java.util.Hashtable; + +import com.nokia.helium.core.LDAPException; +import com.nokia.helium.core.LDAPHelper; /** * Task is to search data from LDAP server. @@ -41,43 +42,41 @@ private String filter; private String key; private String property; + private boolean failOnError = true; /** * Method executes current task. */ public void execute() { - if (url == null) + if (url == null) { throw new BuildException("'url' attribute is not defined"); - if (rootdn == null) + } + if (rootdn == null) { throw new BuildException("'rootdn' attribute is not defined"); - if (filter == null) + } + if (filter == null) { throw new BuildException("'filter' attribute is not defined"); - if (property == null) + } + if (property == null) { throw new BuildException("'property' attribute is not defined"); - if (key == null) + } + if (key == null) { throw new BuildException("'key' attribute is not defined"); + } - // Set up environment for creating initial context - Hashtable env = new Hashtable(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - env.put(Context.PROVIDER_URL, url + "/" + rootdn); - - // Create initial context try { - DirContext ctx = new InitialDirContext(env); - SearchControls controls = new SearchControls(); - controls.setSearchScope(SearchControls.SUBTREE_SCOPE); - NamingEnumeration en = ctx.search("", filter, - controls); - if (en.hasMore()) { - SearchResult sr = en.next(); - getProject().setProperty(property, - (String) sr.getAttributes().get(key).get()); - return; + LDAPHelper helper = new LDAPHelper(url, rootdn); + String value = helper.getAttributeAsString(filter, key); + if (value != null) { + getProject().setNewProperty(property, value); + } else { + log("Could not find value for key: " + key, Project.MSG_WARN); } - } catch (NamingException exc) { - throw new BuildException(exc.getMessage()); + } catch (LDAPException exc) { + log(exc.getMessage(), Project.MSG_ERR); + if (failOnError) { + throw new BuildException(exc.getMessage(), exc); + } } } @@ -175,4 +174,14 @@ public void setKey(String key) { this.key = key; } + + /** + * Defines if the task should fail on error or not found. + * @param failOnError + * @ant.not-required Default is true + */ + public void setFailOnError(boolean failOnError) { + this.failOnError = failOnError; + } + } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/PythonTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/PythonTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/PythonTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -23,6 +23,7 @@ import java.io.PrintWriter; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.ExecTask; import org.apache.tools.ant.types.Commandline; @@ -153,11 +154,12 @@ execTask.setOutput(output); try { execTask.execute(); - } catch (BuildException t) { - if (iFailonerror) - throw new BuildException(t.getMessage()); - else - log(t.getMessage(), 0); // MSG_ERR=0 + } catch (BuildException ex) { + if (iFailonerror) { + throw new BuildException(ex.getMessage(), ex); + } else { + log(ex.getMessage(), Project.MSG_ERR); + } } } else if (iText != null) { // Write the content of the script using Echo task @@ -188,15 +190,16 @@ if (!fileDeleted && iFailonerror) { throw new BuildException("Could not delete script file!"); } - } catch (IOException e) { + } catch (IOException ex) { if (iFailonerror) { - throw new BuildException(e.getMessage()); + throw new BuildException(ex.getMessage(), ex); } - log("Error while running python task " + e.getMessage()); + log("Error while running python task: " + ex.getMessage(), Project.MSG_ERR); } finally { // make sure we delete the file anyway - if (tempfile != null) + if (tempfile != null) { tempfile.delete(); + } } } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/RetryTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/RetryTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/RetryTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -24,7 +24,7 @@ import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.TaskContainer; -import org.apache.tools.ant.taskdefs.*; +import org.apache.tools.ant.taskdefs.Sleep; /** * Retries the nested task a set number of times diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/SerializePathTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/SerializePathTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/SerializePathTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,12 +18,20 @@ package com.nokia.helium.core.ant.taskdefs; -import java.io.*; -import java.util.Vector; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; import java.util.Iterator; +import java.util.Vector; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; -import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.Path; /** diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/ValidateUserLoginTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/ValidateUserLoginTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/ValidateUserLoginTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,12 +17,21 @@ package com.nokia.helium.core.ant.taskdefs; -import org.apache.tools.ant.Task; -import org.apache.tools.ant.Project; +import java.util.Hashtable; + +import javax.naming.Context; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.Attribute; +import javax.naming.directory.Attributes; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import javax.naming.directory.SearchControls; +import javax.naming.directory.SearchResult; + import org.apache.tools.ant.BuildException; -import javax.naming.*; -import javax.naming.directory.*; -import java.util.Hashtable; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.condition.Condition; /** @@ -61,8 +70,9 @@ public void execute() { - if (property == null) + if (property == null) { throw new BuildException("'property' attribute is not defined"); + } validateParameters(url, rootdn, filter, key, searchdn, password); log("Authenticating the user..."); if (authenticateUser(url, searchUser(url, rootdn, filter, key, searchdn))) { @@ -113,18 +123,24 @@ public void validateParameters(String url, String rootdn, String filter, String key, String searchdn, String password) { - if (url == null) + if (url == null) { throw new BuildException("'url' attribute is not defined"); - if (rootdn == null) + } + if (rootdn == null) { throw new BuildException("'rootdn' attribute is not defined"); - if (filter == null) + } + if (filter == null) { throw new BuildException("'filter' attribute is not defined"); - if (key == null) + } + if (key == null) { throw new BuildException("'key' attribute is not defined"); - if (searchdn == null) + } + if (searchdn == null) { throw new BuildException("'searchdn' attribute is not defined"); - if (password == null) + } + if (password == null) { throw new BuildException("'password' attribute is not defined"); + } } public boolean authenticateUser(String ldapurl, String rooTdn) { @@ -136,7 +152,7 @@ env.put(Context.SECURITY_PRINCIPAL, rooTdn); env.put(Context.SECURITY_CREDENTIALS, password); try { - DirContext authContext = new InitialDirContext(env); + DirContext authContext = new InitialDirContext(env); //NOPMD return true; } catch (NamingException e) { // We are Ignoring the errors as no need to fail the build. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/XMLLogCountTask.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/XMLLogCountTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/taskdefs/XMLLogCountTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -21,6 +21,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; + import com.nokia.helium.core.ant.conditions.XMLLogCondition; /** @@ -78,8 +79,9 @@ * @throws BuildException */ public void execute() { - if (property == null) + if (property == null) { throw new BuildException("'property' attribute is not defined"); + } XMLLogCondition cond = new XMLLogCondition(); cond.setFile(fileName); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/ConditionType.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/ConditionType.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.core.ant.types; - -import org.apache.tools.ant.ProjectComponent; -import org.apache.tools.ant.taskdefs.condition.Condition; - -/** - * Base class for conditions. - */ -public class ConditionType extends ProjectComponent implements Condition { - - public boolean eval() { - return false; - } -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/FMPPMessage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/FMPPMessage.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,97 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.helium.core.ant.types; + +import java.io.File; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.types.DataType; +import org.apache.log4j.Logger; +import fmpp.tools.AntTask; +import fmpp.tools.AntTask.AntAttributeSubstitution; + +import java.io.IOException; +import java.io.InputStream; +import java.io.FileInputStream; +import com.nokia.helium.core.MessageCreationException; +import com.nokia.helium.core.ant.Message; + + +/** + * Helper class to store the list of targets to be recorded and to be sent for diamonds. + * + * Example 1: + *
+ *   <hlm:fmppMessage target="diamonds" sourceFile="tool.xml.ftl">
+ *        <data expandProperties="yes">
+ *           ant: antProperties()
+ *       </data>
+ *   </hlm:fmppMessage>
+ * 
+ * @ant.type name="fmppMessage" category="Core" + */ +public class FMPPMessage extends DataType implements Message { + + private File outputFile; + + private AntTask task = new AntTask(); + + private Logger log = Logger.getLogger(FMPPMessage.class); + + public void setSourceFile(File sourceFile) { + if (!sourceFile.exists()) { + throw new BuildException("input file : " + sourceFile + " doesn't exists"); + } + task.setSourceFile(sourceFile); + } + + public void setFreemarkerLinks(String freemarkerLinks) { + task.setFreemarkerLinks(freemarkerLinks); + } + + public void addConfiguredData(AntAttributeSubstitution ats) { + task.addConfiguredData(ats); + } + + public void addConfiguredFreemarkerLinks(AntAttributeSubstitution ats) { + task.addConfiguredFreemarkerLinks(ats); + } + public void setTemplateData(String templateData) { + task.setTemplateData(templateData); + } + + public InputStream getInputStream() throws MessageCreationException { + InputStream stream = null; + try { + task.setProject(getProject()); + outputFile = File.createTempFile("fmppmessage", ".xml"); + outputFile.deleteOnExit(); + task.setTaskName("fmpp"); + task.setOutputFile(outputFile); + task.execute(); + log.debug("outputfile in getinputstream: " + outputFile); + stream = new FileInputStream(outputFile); + } catch (BuildException bex) { + throw new MessageCreationException(bex.getMessage()); + } + catch (IOException iex) { + throw new MessageCreationException(iex.getMessage()); + } + return stream; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/FileMessage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/FileMessage.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.helium.core.ant.types; + +import java.io.File; +import com.nokia.helium.core.MessageCreationException; +import com.nokia.helium.core.ant.Message; + +import org.apache.tools.ant.types.DataType; + +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.FileInputStream; + +/** + * Helper class to store the list of targets to be recorded and to be sent for diamonds. + * + * Example 1: + *
+ *     <hlm:filemessage id="initial-message" file="${build.output.dir}/temp.xml" />
+ * 
+ * 
+ * @ant.type name="fileMessage" category="Core" + */ +public class FileMessage extends DataType implements Message { + + private File file; + + /** + * Helper function set file to send as message + * + * @param inputFile to be sent. + */ + public void setFile(File inputFile) { + file = inputFile; + } + + /** + * Helper function to the stream for the file + * + * @return stream of the file content + */ + public InputStream getInputStream() throws MessageCreationException { + if (file == null) { + throw new MessageCreationException("file attribute is not defined at " + this.getLocation().toString()); + } + try { + return new FileInputStream(file); + } catch (FileNotFoundException ex) { + throw new MessageCreationException("file Not found:" + file); + } + } + +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmDefList.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmDefList.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmDefList.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,108 +1,85 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.core.ant.types; import java.util.Vector; + import org.apache.tools.ant.types.DataType; + import com.nokia.helium.core.ant.HlmExceptionHandler; +import com.nokia.helium.core.ant.PostBuildAction; +import com.nokia.helium.core.ant.PreBuildAction; /** + * HlmDefList is a class used to store the pre/post build events and the + * exception handlers. * + * @ant.type name="deflist" category="Core" */ public class HlmDefList extends DataType { - private Vector preDefList = new Vector(); - private Vector postDefList = new Vector(); - private Vector exceptionHandlerList = new Vector(); - - /** - * Creates an empty hlm post-action definition and adds it to the list. - */ - public HlmPreDefImpl createHlmPreDefImpl() { - HlmPreDefImpl def = new HlmPreDefImpl(); - add(def); - return (HlmPreDefImpl) def; - } + private Vector preBuildActions = new Vector(); + private Vector postBuildActions = new Vector(); + private Vector exceptionHandlers = new Vector(); /** - * Creates an empty hlm post-action definition and adds it to the list. + * Method to add a pre/post build action or an exception handler. + * + * @param type + * is the datatype representing a pre/post build action or an + * exception handler. */ - public HlmPostDefImpl createHlmPostDefImpl() { - HlmPostDefImpl def = new HlmPostDefImpl(); - add(def); - return (HlmPostDefImpl) def; - } - - /** - * Add a given variable to the list - * - * @param var - * variable to add - */ - public void add(HlmPreDefImpl definition) { - if (definition != null) { - preDefList.add(definition); + public void add(DataType type) { + if (type instanceof PreBuildAction) { + preBuildActions.add((PreBuildAction) type); + } + if (type instanceof PostBuildAction) { + postBuildActions.add((PostBuildAction) type); + } + if (type instanceof HlmExceptionHandler) { + exceptionHandlers.add((HlmExceptionHandler) type); } } /** - * Add a post-action to the list. + * Get the list of pre build actions. + * + * @return the list of pre build actions. */ - public void add(HlmPostDefImpl definition) { - if (definition != null) { - postDefList.add(definition); - } - } - - /** - * Add a exception handler to the list. - */ - public void add(HlmExceptionHandler exceptionHandler) { - if (exceptionHandler != null) { - exceptionHandlerList.add(exceptionHandler); - } + public Vector getPreBuildActions() { + return preBuildActions; } /** - * Get the pre-action list. + * Get the list of post build actions. * - * @return a vector containing all the pre-actions + * @return the list of post build actions. */ - public Vector getPreDefList() { - return preDefList; + public Vector getPostBuildActions() { + return postBuildActions; } /** - * Get the post-action list. + * Get the list of exception handlers. * - * @return a vector containing all the post-actions + * @return the list of exception handlers */ - public Vector getPostDefList() { - return postDefList; - } - - /** - * Get the exception handler list. - * - * @return a vector containing all the exception handlers - */ - public Vector getExceptionHandlerList() { - return exceptionHandlerList; + public Vector getExceptionHandlers() { + return exceptionHandlers; } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmFinalTargetDef.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmFinalTargetDef.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmFinalTargetDef.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,54 +1,62 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ - package com.nokia.helium.core.ant.types; +import java.util.Hashtable; + +import org.apache.log4j.Logger; import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; -import java.util.Hashtable; -import org.apache.log4j.Logger; +import org.apache.tools.ant.types.DataType; +import com.nokia.helium.core.ant.PostBuildAction; /** - * Class to execute the final target as post operation. + * Class to execute the final target as post build action. + * + * @ant.type name="finaltargetdef" category="Core" */ -public class HlmFinalTargetDef extends HlmPostDefImpl -{ +public class HlmFinalTargetDef extends DataType implements PostBuildAction { private Logger log = Logger.getLogger(HlmFinalTargetDef.class); - + /** * This post action will execute the final target if any to be executed. + * * @param prj * @param module * @param targetNames * */ - public void execute(Project prj, String module, String[] targetNames) { - String finalTargetName = prj.getProperty("hlm.target.final"); - log.debug("Calling final target" + finalTargetName); + @SuppressWarnings("unchecked") + public void executeOnPostBuild(Project project, String[] targetNames) { + String finalTargetName = project.getProperty("hlm.target.final"); + log.debug("Calling final target : " + finalTargetName); if (finalTargetName != null) { - Hashtable targets = prj.getTargets(); - Target finalTarget = (Target)targets.get(finalTargetName); + // verify the target exists. + Hashtable targets = project.getTargets(); + Target finalTarget = (Target) targets.get(finalTargetName); if (finalTarget == null) { - log.info("The final target : " + finalTargetName + " not available skipping"); + log.info("The final target : " + finalTargetName + + " not available skipping"); return; } - finalTarget.execute(); + // let's the project execute the target. + project.executeTarget(finalTargetName); } } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmImportDef.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmImportDef.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmImportDef.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,41 +1,43 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.core.ant.types; +import java.io.File; + import org.apache.log4j.Logger; -import org.apache.tools.ant.taskdefs.ImportTask; -import org.apache.tools.ant.Target; import org.apache.tools.ant.Location; import org.apache.tools.ant.Project; +import org.apache.tools.ant.Target; +import org.apache.tools.ant.taskdefs.ImportTask; +import org.apache.tools.ant.types.DataType; -import java.io.File; +import com.nokia.helium.core.ant.PreBuildAction; /** * This class implements an Executor importer pre-action. * * @ant.type name="importdef" category="Core" */ -public class HlmImportDef extends HlmPreDefImpl { +public class HlmImportDef extends DataType implements PreBuildAction { private static Logger log = Logger.getLogger(HlmImportDef.class); - - private File file ; + + private File file; public void setFile(File file) { this.file = file; @@ -44,16 +46,17 @@ /** * Will import the given file. */ - public void execute(Project prj, String module, String[] targetNames) { - log.debug("importdef:prj name" + prj.getName() + ". fileName" + file.toString()); + public void executeOnPreBuild(Project project, String[] targetNames) { + log.debug("importdef:prj name" + project.getName() + ". fileName" + + file.toString()); ImportTask task = new ImportTask(); Target target = new Target(); target.setName(""); - target.setProject(prj); + target.setProject(project); task.setOwningTarget(target); task.setLocation(new Location(file.getAbsolutePath())); task.setFile(file.toString()); - task.setProject(prj); + task.setProject(project); task.execute(); } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmListenerDef.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmListenerDef.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmListenerDef.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,33 +1,36 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.core.ant.types; -import org.apache.tools.ant.Project; +import org.apache.log4j.Logger; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildListener; -import org.apache.log4j.Logger; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.types.DataType; + +import com.nokia.helium.core.ant.PreBuildAction; /** * This class implements a listener registration action. * * @ant.type name="listenerdef" category="Core" */ -public class HlmListenerDef extends HlmPreDefImpl { +public class HlmListenerDef extends DataType implements PreBuildAction { private String classname; private Logger log = Logger.getLogger(HlmListenerDef.class); @@ -39,18 +42,22 @@ /** * Register given listener to the project. */ - public void execute(Project prj, String module, String[] targetNames) { + public void executeOnPreBuild(Project project, String[] targetNames) { try { Class listenerClass = Class.forName(classname); BuildListener listener = (BuildListener) listenerClass .newInstance(); - prj.addBuildListener(listener); + project.addBuildListener(listener); + log.debug(classname + " is registered"); } catch (ClassNotFoundException ex) { - log.debug("Class not found exception:" + ex.getMessage(), ex); + throw new BuildException("Class not found exception:" + + ex.getMessage(), ex); } catch (InstantiationException ex1) { - log.debug("Class Instantiation exception:" + ex1.getMessage(), ex1); + throw new BuildException("Class Instantiation exception:" + + ex1.getMessage(), ex1); } catch (IllegalAccessException ex1) { - log.debug("Illegal Class Access exception:" + ex1.getMessage(), ex1); + throw new BuildException("Illegal Class Access exception:" + + ex1.getMessage(), ex1); } } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmPostDefImpl.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmPostDefImpl.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.core.ant.types; - -import org.apache.tools.ant.Project; -import org.apache.tools.ant.types.DataType; -import org.apache.log4j.Logger; - -import com.nokia.helium.core.ant.HeliumExecutor; -import com.nokia.helium.core.ant.HlmDefinition; - -/** - * Implement an abstract post-action. - */ -public class HlmPostDefImpl extends DataType implements HlmDefinition { - private Logger log = Logger.getLogger(HeliumExecutor.class); - - /** - * Do nothing. - */ - public void execute(Project prj, String module, String[] targetNames) { - // Empty method. Implemented by extending classes. - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmPreDefImpl.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/HlmPreDefImpl.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.core.ant.types; - -import org.apache.tools.ant.Project; -import org.apache.tools.ant.types.DataType; - -import com.nokia.helium.core.ant.HlmDefinition; - -/** - * Implement an abstract pre-action. - */ -public class HlmPreDefImpl extends DataType implements HlmDefinition { - /** - * Do nothing. - */ - public void execute(Project prj, String module, String[] targetNames) { - // empty will implemented by the sub classes. - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/Stage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/Stage.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.helium.core.ant.types; + +import org.apache.tools.ant.types.DataType; +import org.apache.tools.ant.BuildException; +import org.apache.log4j.Logger; + +/** + * A Stage is a Data type which stores Stage information. + * + *

+ * A Stage is defined by setting three attributes name, start and end targets, both should be a + * valid target name in the project. + * + *

+ * Usage: + * + *

+ *      <hlm:stage id="preparation" starttarget="stagetest" endtarget="stagetest"/>              
+ * 
+ * + * @ant.type name="stage" category="Core" + * + */ +public class Stage extends DataType { + + //Default id is used as the stage name so overriding is possible. + private Logger log = Logger.getLogger(Stage.class); + private String stageName; + + private String startTarget; + + private String endTarget; + + public void setStageName(String name) { + log.debug("stage-name:" + name); + if (stageName != null) { + throw new BuildException("no supported attribute stageName externally"); + } + stageName = name; + } + + public String getStageName() { + return stageName; + } + /** + * Returns the stage start target. + * @return stage start target name. + */ + public String getStartTarget() { + return startTarget; + } + + /** + * Returns the stage end target. + * @return end target name + */ + public String getEndTarget() { + return endTarget; + } + + /** + * Set the starting target. + * + * @param start is the starting point to set. + * @ant.required + */ + public void setStartTarget(String name) { + startTarget = name; + } + + /** + * Set the end target. + * + * @param end is the end point to set. + * @ant.required + */ + public void setEndTarget(String name) { + endTarget = name; + } + + /** Check is the end target set to current target. + * + * @param target + * @return + */ + public boolean isEndTarget( String target ) { + return this.endTarget.equals( target ); + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/TargetMessageTrigger.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/TargetMessageTrigger.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.helium.core.ant.types; + +import java.util.List; + +import org.apache.tools.ant.types.DataType; +import java.util.ArrayList; +import com.nokia.helium.core.ant.Message; + +/** + * Helper class to store the list of targets to be recorded and to be sent for diamonds. + * + * Example 1: + *
+ *    <hlm:targetMessageTrigger id="diamonds.id" target="diamonds">
+ *        <hlm:fmppMessage>
+ *            <converterTask id="tools-conversion" sourceFile="${helium.dir}/tools/common/templates/diamonds/tool.xml.ftl" outputFile="${build.output.dir}/tool.xml">
+ *                <data expandProperties="yes">
+ *                    ant: antProperties()
+ *                </data>
+ *            </converterTask>
+ *        </hlm:fmppMessage>
+ *    </hlm:targetMessageTrigger>
+ * 
+ * @ant.type name="TargetMessageTrigger" category="Core" 
+ */
+ 
+ 
+public class TargetMessageTrigger extends DataType {
+
+    private String targetName;
+    
+    private boolean condition = true;
+    
+    private List messageList = new ArrayList();
+
+    /**
+     * Helper function to add message to the list.
+     * 
+     * @param message message to be added to the list
+     */
+    public void add(Message message) {
+        messageList.add(message);
+    }
+
+    public void setCondition(boolean condition) {
+        this.condition = condition;
+    }
+    public boolean isTriggerNeeded() {
+        return condition;
+    }
+    /**
+     * To get the message list to be processed further.
+     * 
+     * @return the message list. 
+     */
+    public List getMessageList() {
+        return messageList;
+    }
+
+    /**
+     * Sets the target name for which the message to be processed.
+     * 
+     * @param name of the target.
+     */
+    public void setTarget(String name) {
+        targetName = name;
+    }
+    
+    /**
+     * Helper function to get the target name for which the message is processed.
+     * 
+     * @return target name.
+     */
+    public String getTargetName() {
+        return targetName;
+    }
+}
\ No newline at end of file
diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/TextMessage.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/TextMessage.java	Mon Sep 13 13:11:19 2010 +0800
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+ 
+package com.nokia.helium.core.ant.types;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+import org.apache.tools.ant.types.DataType;
+
+import com.nokia.helium.core.MessageCreationException;
+import com.nokia.helium.core.ant.Message;
+
+   
+/**
+ * Helper class to store the text message.
+ *
+ * Example 1:
+ * 
+ *     <hlm:textMessage id="initial-message" text="helloworld" />
+ * 
+ * @ant.type name="textMessage" category="Core" + */ +public class TextMessage extends DataType implements Message { + private String text; + + /** + * Helper function to set the text to be sent. + * + * @param text to be sent. + */ + /** + * Helper function to return the contents as stream. + * + * @return content as input stream. + */ + public InputStream getInputStream() throws MessageCreationException { + if (text == null) { + throw new MessageCreationException("text attribute is not defined at " + this.getLocation()); + } + try { + return new ByteArrayInputStream(text.getBytes("UTF-8")); + } catch (UnsupportedEncodingException uex) { + throw new MessageCreationException(uex.getMessage()); + } + } + + /** + * Text message to send. + * + * @param text to be sent. + * @ant.required + */ + public void setText(String text) { + this.text = text; + } + +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/VariableImpl.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/VariableImpl.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/VariableImpl.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,14 +18,14 @@ package com.nokia.helium.core.ant.types; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.DataType; -import org.apache.tools.ant.BuildException; -import org.apache.commons.lang.StringUtils; +import org.codehaus.plexus.util.StringUtils; import com.nokia.helium.core.ant.MappedVariable; -import java.util.Arrays; /** * Helper class to store the command line variables diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/VariableSet.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/VariableSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/ant/types/VariableSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,19 +17,18 @@ package com.nokia.helium.core.ant.types; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.types.DataType; + import com.nokia.helium.core.ant.MappedVariable; import com.nokia.helium.core.ant.Variable; import com.nokia.helium.core.ant.VariableMap; - -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.types.DataType; -import java.util.ArrayList; - /** * Helper class to store the variable set (list of variables * with name / value pair) @@ -108,8 +107,9 @@ for (Variable variable : variables) { if (variable instanceof MappedVariable) { allVariables.put(((MappedVariable)variable).getName(), (MappedVariable)variable); - } else if (variable instanceof VariableSet) + } else if (variable instanceof VariableSet) { allVariables.putAll(((VariableSet)variable).getVariablesMap()); + } } return allVariables; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/CommandBase.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/CommandBase.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/CommandBase.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,19 +1,20 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + package com.nokia.helium.core.plexus; import java.io.File; @@ -21,18 +22,17 @@ import java.util.Vector; import org.apache.log4j.Logger; -import org.codehaus.plexus.util.Os; +import org.apache.tools.ant.taskdefs.condition.Os; import org.codehaus.plexus.util.cli.CommandLineException; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; import org.codehaus.plexus.util.cli.StreamConsumer; /** - * This abstract class implements some basic support to execute commands and - * redirect outputs to StreamConsumer. You can have common stream consumers or - * execution base streamconsumers. The exception type raised - * can be controlled by the implementing class. - * + * This abstract class implements some basic support to execute commands and redirect outputs to + * StreamConsumer. You can have common stream consumers or execution base streamconsumers. The + * exception type raised can be controlled by the implementing class. + * * @param */ public abstract class CommandBase { @@ -42,12 +42,14 @@ /** * Get the executable name. + * * @return */ protected abstract String getExecutable(); /** * Throw an exception with message and cause. + * * @param message * @param t * @throws T @@ -56,6 +58,7 @@ /** * Throw an exception with message only. + * * @param message * @throws T */ @@ -64,18 +67,18 @@ } /** - * Location where to execute the command. The default location - * is the current directory. + * Location where to execute the command. The default location is the current directory. + * * @return a File object pointing to a directory. */ public File getWorkingDir() { return new File("."); } - + /** - * Add a LineHandler to the CommandBase instance. - * LineHandlers could be used to record/log the output stream - * command invocation. + * Add a LineHandler to the CommandBase instance. LineHandlers could be used to record/log the + * output stream command invocation. + * * @param lineHandler a lineHandle instance */ public void addOutputLineHandler(StreamConsumer lineHandler) { @@ -83,11 +86,11 @@ outputHandlers.add(lineHandler); } } - + /** - * Add a LineHandler to the CommandBase instance. - * LineHandlers could be used to record/log the output error stream - * command invocation. + * Add a LineHandler to the CommandBase instance. LineHandlers could be used to record/log the + * output error stream command invocation. + * * @param lineHandler a lineHandle instance */ public void addErrorLineHandler(StreamConsumer lineHandler) { @@ -107,13 +110,11 @@ } /** - * Execute the command given by getExecutable with args as list of arguments and custom StreamConsumer. + * Execute the command given by getExecutable with args as list of arguments and custom + * StreamConsumer. * - * @param args - * an array representing blocks arguments - * @param output - * the StreamConsumer to analyze the output with. If null it is - * ignored. + * @param args an array representing blocks arguments + * @param output the StreamConsumer to analyze the output with. If null it is ignored. * @throws T */ public void execute(String[] args, StreamConsumer output) throws T { @@ -121,20 +122,16 @@ } /** - * Execute the command given by getExecutable with args as list of arguments and custom StreamConsumer. - * Also env content will be added to the environment. + * Execute the command given by getExecutable with args as list of arguments and custom + * StreamConsumer. Also env content will be added to the environment. * - * @param args - * an array representing blocks arguments - * @param env - * additional key to add the environment - * @param output - * the StreamConsumer to analyze the output with. If null it is - * ignored. + * @param args an array representing blocks arguments + * @param env additional key to add the environment + * @param output the StreamConsumer to analyze the output with. If null it is ignored. * @throws T */ public void executeCmdLine(String argLine, Map env, StreamConsumer output) - throws T { + throws T { Commandline cmdLine = new Commandline(); cmdLine.createArg().setValue(getExecutable()); if (argLine != null) { @@ -143,19 +140,19 @@ executeCmd(cmdLine, env, output); } - private void executeCmd(Commandline cmdLine, Map env, StreamConsumer output) throws T { + private void executeCmd(Commandline cmdLine, Map env, StreamConsumer output) + throws T { if (env != null) { for (Map.Entry entry : env.entrySet()) { cmdLine.addEnvironment(entry.getKey(), entry.getValue()); } } cmdLine.setWorkingDirectory(getWorkingDir()); - + // This is only needed on windows. if (Os.isFamily(Os.FAMILY_WINDOWS)) { - cmdLine.createArg().setLine("&& exit %%ERRORLEVEL%%"); + cmdLine.createArg().setLine("&& exit %%ERRORLEVEL%%"); } - StreamMultiplexer inputMux = new StreamMultiplexer(); if (output != null) { @@ -173,36 +170,28 @@ } try { - int err = CommandLineUtils.executeCommandLine(cmdLine, inputMux, - errorMux); + int err = CommandLineUtils.executeCommandLine(cmdLine, inputMux, errorMux); // check its exit value log.debug("Execution of " + getExecutable() + " returned: " + err); if (err != 0) { - throwException(errorRecorder.getBuffer() + " (return code: " + err - + ")"); + throwException(errorRecorder.getBuffer() + " (return code: " + err + ")"); } - } catch (CommandLineException e) { - throwException( - "Error executing " + getExecutable() + ": " - + e.toString()); + } + catch (CommandLineException e) { + throwException("Error executing " + getExecutable() + ": " + e.toString()); } } /** - * Execute the command given by getExecutable with args as list of arguments and custom StreamConsumer. - * Also env content will be added to the environment. + * Execute the command given by getExecutable with args as list of arguments and custom + * StreamConsumer. Also env content will be added to the environment. * - * @param args - * an array representing blocks arguments - * @param env - * additional key to add the environment - * @param output - * the StreamConsumer to analyze the output with. If null it is - * ignored. + * @param args an array representing blocks arguments + * @param env additional key to add the environment + * @param output the StreamConsumer to analyze the output with. If null it is ignored. * @throws T */ - public void execute(String[] args, Map env, StreamConsumer output) - throws T { + public void execute(String[] args, Map env, StreamConsumer output) throws T { Commandline cmdLine = new Commandline(); cmdLine.createArg().setValue(getExecutable()); if (args != null) { @@ -210,5 +199,5 @@ } executeCmd(cmdLine, env, output); } - + } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/FileStreamConsumer.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/FileStreamConsumer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/FileStreamConsumer.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,12 @@ */ package com.nokia.helium.core.plexus; +import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; -import java.io.BufferedWriter; import org.apache.log4j.Logger; import org.codehaus.plexus.util.cli.StreamConsumer; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/StreamMultiplexer.java --- a/buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/StreamMultiplexer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/src/com/nokia/helium/core/plexus/StreamMultiplexer.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,6 +17,7 @@ package com.nokia.helium.core.plexus; import java.util.Vector; + import org.codehaus.plexus.util.cli.StreamConsumer; /** diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/antunit/executor/build.xml --- a/buildframework/helium/sf/java/core/tests/antunit/executor/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/tests/antunit/executor/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,9 +22,14 @@ --> Helium antlib core executor test config. + Running target. + + + final-target is executed as postbuild action + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/antunit/executor/test_executor.ant.xml --- a/buildframework/helium/sf/java/core/tests/antunit/executor/test_executor.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/tests/antunit/executor/test_executor.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -72,12 +72,6 @@ - - - - - - - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestAntStreamConsumer.java --- a/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestAntStreamConsumer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestAntStreamConsumer.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,14 @@ */ package com.nokia.helium.core.plexus.tests; +import static org.junit.Assert.assertTrue; + import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.BuildListener; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Echo; import org.junit.Test; -import static org.junit.Assert.*; + import com.nokia.helium.core.plexus.AntStreamConsumer; public class TestAntStreamConsumer { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestCommandBase.java --- a/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestCommandBase.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestCommandBase.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,13 @@ */ package com.nokia.helium.core.plexus.tests; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import hidden.org.codehaus.plexus.interpolation.os.Os; import java.util.Hashtable; import org.junit.Test; -import static org.junit.Assert.*; import com.nokia.helium.core.plexus.CommandBase; import com.nokia.helium.core.plexus.StreamRecorder; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestFileStreamConsumer.java --- a/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestFileStreamConsumer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestFileStreamConsumer.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,14 @@ */ package com.nokia.helium.core.plexus.tests; +import static org.junit.Assert.assertTrue; + import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import org.junit.Test; -import static org.junit.Assert.*; + import com.nokia.helium.core.plexus.FileStreamConsumer; public class TestFileStreamConsumer { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestStreamRecorder.java --- a/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestStreamRecorder.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/plexus/tests/TestStreamRecorder.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,7 +16,7 @@ */ package com.nokia.helium.core.plexus.tests; -import static org.junit.Assert.*; +import static org.junit.Assert.assertTrue; import org.junit.Test; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/tests/TestLDAPHelper.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/core/tests/src/com/nokia/helium/core/tests/TestLDAPHelper.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,125 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.core.tests; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Test; + +import com.nokia.helium.core.LDAPException; +import com.nokia.helium.core.LDAPHelper; + +/** + * Testing the LDAPHelper class. Test are limited to what + * can be check locally. + * + */ +public class TestLDAPHelper { + + /** + * Test that construction fails if ldap is null + */ + @Test + public void checkContstrutorValidationForLDAP() { + IllegalArgumentException error = null; + try { + new LDAPHelper(null, ""); + } catch (IllegalArgumentException ex) { + error = ex; + } + assertNotNull(error); + } + + /** + * Test that construction fails if rootdn is null + */ + @Test + public void checkContstrutorValidationForRootDN() { + IllegalArgumentException error = null; + try { + new LDAPHelper("", null); + } catch (IllegalArgumentException ex) { + error = ex; + } + assertNotNull(error); + } + + /** + * Test that construction fails if rootdn is null + * @throws LDAPException + */ + @Test + public void checkGetAttributeAsStringNullUsername() throws LDAPException { + IllegalArgumentException error = null; + LDAPHelper helper = new LDAPHelper("", ""); + try { + helper.getAttributeAsString(null, ""); + } catch (IllegalArgumentException ex) { + error = ex; + } + assertNotNull(error); + } + + /** + * Test that construction fails if rootdn is null + * @throws LDAPException + */ + @Test + public void checkGetAttributeAsStringNullAttribute() throws LDAPException { + IllegalArgumentException error = null; + LDAPHelper helper = new LDAPHelper("", ""); + try { + helper.getAttributeAsString("", null); + } catch (IllegalArgumentException ex) { + error = ex; + } + assertNotNull(error); + } + + /** + * Test that construction fails if rootdn is null + * @throws LDAPException + */ + @Test + public void checkGetAttributeAsStringNullAttributeCurrentUser() throws LDAPException { + IllegalArgumentException error = null; + LDAPHelper helper = new LDAPHelper("", ""); + try { + helper.getUserAttributeAsString(null); + } catch (IllegalArgumentException ex) { + error = ex; + } + assertNotNull(error); + } + + + /** + * Test that construction fails if rootdn is null + * @throws LDAPException + */ + @Test + public void checkGetAttributeAsStringInvalidUser() { + LDAPException error = null; + LDAPHelper helper = new LDAPHelper("", ""); + try { + helper.getAttributeAsString("invaliduser", LDAPHelper.EMAIL_ATTRIBUTE_NAME); + } catch (LDAPException ex) { + error = ex; + } + assertNotNull(error); + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/diamonds.rst --- a/buildframework/helium/sf/java/diamonds/diamonds.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/diamonds.rst Mon Sep 13 13:11:19 2010 +0800 @@ -11,14 +11,16 @@ ------------ Diamonds is web application that can collect all build related information and categorize builds. It can represent build information in different metrics. This document describes how -to configure diamonds in helium. +to configure diamonds in helium and minimum set of properties required. Diamonds Server setup --------------------- -Please define ``diamonds.host`` property with server address and ``diamonds.port`` with server port number. -e. g. :: +These are the minimum set of properties required in order to start the diamonds. All the properties are +defined automatically with already defined set of properties. The end user would not be required to change +any thing. As these are configured once for different vendors (symbian foundation, nokia, others.) + @@ -27,52 +29,95 @@ ------------------- `diamonds` target is the initialize target for diamonds logging. Call diamonds target in build target sequence and this will log the already available data to diamonds and continue to log data onward as soon as they are available. -This is done already in helium build target sequence. So user can ignore this section. +This is done already in helium build target sequence. So user can ignore this section. Earlier the diamonds +target needs to be called once the build area is initialized, but now this could be called even +before, as the output for diamonds files are generated in the cache location. -Disable diamonds logging -------------------------------- -Diamonds logging can be skipped by defining the property ``skip.diamonds`` to true. + +Disable diamonds reporting +-------------------------- +Diamonds reporting can be skipped by defining the property ``diamonds.enabled`` to false. e.g.:: - hlm -Dskip.diamonds=true + hlm -Ddiamonds.enabled=false -Add targets into diamonds configuration ftl file ------------------------------------------------- -Diamonds detail configurations are in helium/config/diamonds_config.xml.ftl file. -User have to add target here(this target must be already defined in configuration) -if they want to log some additional data to diamonds after the target execution. - -Define the target with the following attributes inside ```` node: +Diamonds Configuration details +------------------------------ +Diamonds configurations are extendable now. The default diamonds configuration is there under +${helium.dir}/config/diamonds_config_default.ant.xml. The configuration is based on ant properties +and references. So if the user wants to add process and report for new information, they can add +the details in their configurations. There are three types of information being provided using the +configurations and are below. -.. csv-table:: Target - :header: "Attribute", "Description", "Required" - - "name", "Name of the target","Yes" - "template-file", "template file to process the data","No, if not defined, consider template file name same as target name" - "logfile", "log file which will be processed","No" - "ant-properties","set true if you need values from ant properties, default is false","No" - "defer", "logging will be deferred and will be logged at the build finish time. Default is false","No" +Properties Required: +==================== +Below are the properties requried for processing diamonds. But these are mapped to predifined properties +in helium and no action required for the user. The end user would not be required to change +any thing. As these are configured once for different vendors (symbian foundation, nokia, others.) -e.g + + + + + + +Stage Configurations: +===================== +Stages are to record information specific to stages. Stage information is used for both logging and +diamonds reporting. The build process needs to define stages clearly and map it with the configurations +as below. .. code-block:: xml - + + + + + + + + +The stage configuration provides the information about the stage starting and ending target sequence. +There should be a corresponding stagerecord for each stage, which is to store the log information +for that specific stages, please refer to logging module for more information. + +Both the stages / target reporting using messaging type to provide details to be sent to diamonds +reporting. See details in messaging sections for further details. + +Currently the diamonds reporting just records the start / end time using the following configuration. + +.. code-block:: xml + + + + ant: antProperties() + + + +The config takes a template to be used to convert, the template is converted using fmpp and all +the output files are processed and sent to diamonds. All the input to fmpp task could be used here. +The template diamonds_stage.xml.ftl just reports the start / end time. In addition to duration, if +the user wants to send more information for the stages it could be done by overriding the +configuration as below and controlling using the user defined template. + +.. code-block:: xml + + + + ant: antProperties() + + -If no logfile provided, looks for xml file to send using file or file, -if both doesn't exists does nothing. tries to pass ant properties and sends it. For below example, it looks for - or create_bom.xml and if any one exists then it will send that data. - -:: - - +Reporting based on target execution: +==================================== +If some data needs to be sent at the end of target execution, this can be defined with below configuration. - -Using only ant properties for a specific target to send data - -:: - - - + + + + ant: antProperties() + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/ivy.xml --- a/buildframework/helium/sf/java/diamonds/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -36,5 +36,7 @@ + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/AllTargetDiamondsListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/AllTargetDiamondsListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.diamonds; + +import java.io.BufferedWriter; +import java.io.FileInputStream; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Calendar; +import java.util.Date; +import java.util.Vector; +import org.apache.log4j.Logger; +import org.apache.tools.ant.BuildEvent; +import org.apache.tools.ant.Target; + +/** + * Generate target times + */ +public class AllTargetDiamondsListener extends DiamondsListenerImpl { + + private static Logger log = Logger.getLogger(DiamondsListenerImpl.class); + + private Vector antTargets = new Vector(); + + + + + /** + * Function to process logging info during begining of target execution + * + * @param event of target execution. + */ + public void targetBegin(BuildEvent buildEvent) { + antTargets.add(new AntTarget(buildEvent.getTarget())); + } + + /** + * Function to process logging info during end of target execution + * + * @param event of target execution. + */ + public void targetEnd(BuildEvent buildEvent) { + for (AntTarget at : antTargets) + { + if (at.equals(buildEvent.getTarget())) { + at.setEndTime(new Date()); + } + } + } + + /** + * Function to process logging info during end of build + * + * @param event of target execution. + */ + public void buildEnd(BuildEvent buildEvent) throws DiamondsException { + try { + if (isInitialized()) { + File tempFile = File.createTempFile("diamonds-targets", ".xml"); + FileWriter fstream = new FileWriter(tempFile); + BufferedWriter out = new BufferedWriter(fstream); + out.write("\n"); + + for (AntTarget at : antTargets) + { + Calendar startcalendar = Calendar.getInstance(); + Calendar endcalendar = Calendar.getInstance(); + startcalendar.setTime(at.getStartTime()); + if (at.getEndTime() != null) + { + endcalendar.setTime(at.getEndTime()); + endcalendar.add(Calendar.SECOND, -5); + if (endcalendar.after(startcalendar)) + { + out.write("\n"); + out.write("" + at.getName() + "\n"); + out.write("" + getTimeFormat().format(at.getStartTime()) + "\n"); + out.write("" + getTimeFormat().format(at.getEndTime()) + "\n"); + out.write("\n"); + } + } + } + + out.write("\n"); + out.close(); + FileInputStream stream = new FileInputStream(tempFile); + log.debug("alltargetdiamondslistener file: " + tempFile); + mergeToFullResults(stream); + stream.close(); + stream = new FileInputStream(tempFile); + log.debug("diamondsclient: " + getDiamondsClient()); + log.debug("diamondsclient: " + DiamondsConfig.getBuildId()); + getDiamondsClient().sendData(stream, DiamondsConfig.getBuildId()); + } + } + catch (IOException e) + { + e.printStackTrace(); + } + } + + class AntTarget { + private String targetName; + private Date startTime; + private Date endTime; + private int hashCode; + + public AntTarget(Target target) + { + targetName = target.getName(); + hashCode = target.hashCode(); + startTime = new Date(); + } + public String getName() { return targetName; } + public Date getStartTime() { return startTime; } + public Date getEndTime() { return endTime; } + public void setEndTime(Date e) { endTime = e; } + public boolean equals(Object obj) { return obj.hashCode() == hashCode; } + public int hashCode() { return hashCode; } + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsClient.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,38 +1,39 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.diamonds; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.methods.FileRequestEntity; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.methods.RequestEntity; +import org.apache.commons.httpclient.methods.InputStreamRequestEntity; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; + import com.nokia.helium.core.EmailDataSender; - -import java.io.IOException; -import java.io.File; +import com.nokia.helium.core.EmailSendException; /** - * Diamonds client used to connect to get build id and also to send the build - * results + * Diamonds client used to connect to get build id and also to send the build results * */ public class DiamondsClient { @@ -42,7 +43,7 @@ private static final int SERV_NOT_FOUND = 404; private static final int SERV_OK = 200; - + private boolean isRecordOnly; private Logger log = Logger.getLogger(DiamondsClient.class); @@ -57,7 +58,6 @@ private HttpClient httpClient; - public DiamondsClient(String hst, String prt, String pth, String mailID) { host = hst; port = prt; @@ -70,7 +70,8 @@ int result = 0; try { result = httpClient.executeMethod(postMethod); - } catch (IOException e) { + } + catch (IOException e) { isRecordOnly = true; throw new DiamondsException("IOException while sending http request." + e.getMessage()); // e.printStackTrace(); @@ -109,8 +110,7 @@ // Request content will be retrieved directly // from the input stream - RequestEntity entity = new FileRequestEntity(input, - "text/xml; charset=ISO-8859-1"); + RequestEntity entity = new FileRequestEntity(input, "text/xml; charset=ISO-8859-1"); post.setRequestEntity(entity); return post; } @@ -118,26 +118,71 @@ private int processPostMethodResult(int result) { // Log status code switch (result) { - case INT_SERV_ERROR: - // log.error("Internal server error"); - break; - case SERV_NOT_FOUND: - // log.error("Server not found"); - break; - case SERV_OK: - // log.info("Connection to diamonds server - OK"); - break; - default: - // log.debug("Response code: " + result); + case INT_SERV_ERROR: + // log.error("Internal server error"); + break; + case SERV_NOT_FOUND: + // log.error("Server not found"); + break; + case SERV_OK: + // log.info("Connection to diamonds server - OK"); + break; + default: + // log.debug("Response code: " + result); } return result; } + + public String getBuildId(InputStream stream) throws DiamondsException { + String diamondsBuildID = null; + PostMethod postMethod = null; + try { + if (!isRecordOnly) { + String strURL = getURL(); + log.debug("strURL:" + strURL); + postMethod = getPostMethod(stream, strURL); + log.debug("postmethod:" + postMethod); + int postMethodResult = httpClient.executeMethod(postMethod); + log.debug("postmethod-result:" + postMethodResult); + int result = processPostMethodResult(postMethodResult); + + if (result == SERV_OK) { + // Display and save response code which functions as a id for + // the build. + diamondsBuildID = postMethod.getResponseBodyAsString(); + log.debug("diamondsBuildID: " + diamondsBuildID); + } + else { + isRecordOnly = true; + log.error("Diamonds data not sent, because of connection failure."); + // throw new DiamondsException("Connection Failed"); + } + } + } + catch (HttpException ex) { + isRecordOnly = true; + log.debug("Diamonds data not sent:s", ex); + log.error("Diamonds data not sent: " + ex.getMessage()); + } + catch (IOException ex) { + isRecordOnly = true; + log.debug("Diamonds data not sent:", ex); + log.error("Diamonds data not sent: " + ex.getMessage()); + } + finally { + // Release current connection to the connection pool once you are + // done + if (postMethod != null) { + postMethod.releaseConnection(); + } + } + return diamondsBuildID; + } /** * - * @param fileName - * Filename to export to Diamonds + * @param fileName Filename to export to Diamonds * @return diamonds build id */ public String getBuildId(String fileName) throws DiamondsException { @@ -156,7 +201,7 @@ log.debug("postmethod:" + postMethod); int postMethodResult = httpClient.executeMethod(postMethod); log.debug("postmethod-result:" + postMethodResult); - + int result = processPostMethodResult(postMethodResult); if (result == SERV_OK) { @@ -164,21 +209,25 @@ // the build. diamondsBuildID = postMethod.getResponseBodyAsString(); log.debug("diamondsBuildID: " + diamondsBuildID); - } else { + } + else { isRecordOnly = true; log.error("Diamonds data not sent, because of connection failure."); - //throw new DiamondsException("Connection Failed"); + // throw new DiamondsException("Connection Failed"); } } - } catch (HttpException ex) { + } + catch (HttpException ex) { isRecordOnly = true; - log.error("Diamonds data not sent: " + ex.getMessage()); log.debug("Diamonds data not sent:s", ex); - } catch (IOException ex) { - isRecordOnly = true; log.error("Diamonds data not sent: " + ex.getMessage()); + } + catch (IOException ex) { + isRecordOnly = true; log.debug("Diamonds data not sent:", ex); - } finally { + log.error("Diamonds data not sent: " + ex.getMessage()); + } + finally { // Release current connection to the connection pool once you are // done if (postMethod != null) { @@ -188,6 +237,43 @@ return diamondsBuildID; } + private PostMethod getPostMethod(InputStream stream, String urlPath) { + + // Get the Diamonds XML-file which is to be exported + //File input = new File(fileName); + + // Prepare HTTP post + PostMethod post = new PostMethod(urlPath); + + RequestEntity entity = new InputStreamRequestEntity(stream, "text/xml"); + post.setRequestEntity(entity); + return post; + } + + public int sendData(InputStream stream, String urlPath) { + PostMethod postMethod = null; + int result = -1; + if (urlPath != null && !isRecordOnly) { + try { + String strURL = getURL(urlPath); + postMethod = getPostMethod(stream, strURL); + result = processPostMethodResult(httpClient.executeMethod(postMethod)); + } + catch (IllegalArgumentException e) { + // Catching this exception is needed because it is raised by httpclient + // library if the server is under update. + log.error("sendData:The final data via http not sent because errors:IllegalArgumentException ", e); + } + catch (DiamondsException e) { + log.error("sendData:The final data via http not sent because errors:DiamondsException ", e); + } + catch (IOException e) { + log.error("sendData:The final data via http not sent because errors:IOException ", e); + } + } + return result; + } + public int sendData(String fileName, String urlPath) { PostMethod postMethod = null; int result = -1; @@ -195,29 +281,28 @@ try { String strURL = getURL(urlPath); postMethod = getPostMethod(fileName, strURL); - result = processPostMethodResult(httpClient - .executeMethod(postMethod)); - } catch (IllegalArgumentException e) { + result = processPostMethodResult(httpClient.executeMethod(postMethod)); + } + catch (IllegalArgumentException e) { // Catching this exception is needed because it is raised by httpclient // library if the server is under update. log.error("sendData:The final data via http not sent because errors:IllegalArgumentException ", e); - } catch (DiamondsException e) { + } + catch (DiamondsException e) { log.error("sendData:The final data via http not sent because errors:DiamondsException ", e); - } catch (IOException e) { + } + catch (IOException e) { log.error("sendData:The final data via http not sent because errors:IOException ", e); } } return result; } - public int sendDataByMail(String fileName, String smtpServer, - String ldapServer) { + public int sendDataByMail(String fileName, String smtpServer, String ldapServer) throws EmailSendException { log.debug("DiamondsClient:sendDataByEmail:emailID" + emailID); - EmailDataSender emailSender = new EmailDataSender(emailID, smtpServer, - ldapServer); + EmailDataSender emailSender = new EmailDataSender(emailID, smtpServer, ldapServer); log.debug("DiamondsClient:sendDataByEmail: " + fileName); - emailSender.sendData("diamonds", fileName, "application/xml", - "[DIAMONDS_DATA]", null); + emailSender.sendData("diamonds", new File(fileName), "application/xml", "[DIAMONDS_DATA]", null); log.debug("DiamondsClient:sendDataByEmail:succeeds"); return 0; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsConfig.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsConfig.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsConfig.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,32 +1,28 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.diamonds; -import org.apache.tools.ant.BuildException; - -import java.util.*; -import org.dom4j.io.SAXReader; -import org.dom4j.Document; -import org.dom4j.Element; -import org.dom4j.Node; -import org.dom4j.DocumentException; +import java.util.HashMap; +import java.util.Map; +import com.nokia.helium.core.ant.types.Stage; +import com.nokia.helium.core.ant.types.TargetMessageTrigger; +import org.apache.tools.ant.Project; +import java.util.Hashtable; import org.apache.log4j.Logger; /** @@ -34,133 +30,77 @@ * */ public final class DiamondsConfig { - private static DiamondsProperties diamondsProperties; - private static List stages; + private static HashMap stages = new HashMap(); - private static Logger log; + private static Logger log = Logger.getLogger(DiamondsConfig.class); - private static Map targets; - - private static String outputDir; + private static String initialiserTargetName; + + private static Project project; + + private static final String DIAMONDS_HOST_PROPERTY = "diamonds.host"; + private static final String DIAMONDS_PORT_PROPERTY = "diamonds.port"; + private static final String DIAMONDS_PATH_PROPERTY = "diamonds.path"; + private static final String DIAMONDS_TSTAMP_PROPERTY = "diamonds.tstamp.format"; + private static final String DIAMONDS_MAIL_PROPERTY = "diamonds.mail"; + private static final String DIAMONDS_LDAP_PROPERTY = "diamonds.ldap.server"; + private static final String DIAMONDS_SMTP_PROPERTY = "diamonds.smtp.server"; + private static final String DIAMONDS_INITIALIZER_TARGET_PROPERTY = "diamonds.initializer.targetname"; + private static final String DIAMONDS_CATEGORY_PROPERTY = "diamonds.category"; + + + private static final String[] PROPERTY_NAMES = {DIAMONDS_HOST_PROPERTY, DIAMONDS_PORT_PROPERTY, DIAMONDS_PATH_PROPERTY, + DIAMONDS_TSTAMP_PROPERTY, DIAMONDS_MAIL_PROPERTY, + DIAMONDS_LDAP_PROPERTY, DIAMONDS_SMTP_PROPERTY, + DIAMONDS_INITIALIZER_TARGET_PROPERTY, DIAMONDS_CATEGORY_PROPERTY}; - private static String templateDir; - - private static String initialiserTargetName; + private static HashMap targetMessageList = new HashMap(); private DiamondsConfig() { } - - /** - * Method accessed by loggers to load the diamonds specific configuration. - * - * @param configFile - * - configuration to load - * - */ - public static void parseConfiguration(String configFile) - throws DiamondsException { - if (log == null) { - log = Logger.getLogger(DiamondsConfig.class); + + + @SuppressWarnings("unchecked") + private static void initializeMessage(Project prj) { + Hashtable references = prj.getReferences(); + for (String key : references.keySet()) { + Object object = references.get(key); + log.debug("key: " + key); + if (object instanceof TargetMessageTrigger) { + log.debug("found message map:" + object); + log.debug("found key: " + key); + TargetMessageTrigger message = (TargetMessageTrigger)object; + targetMessageList.put(message.getTargetName(), (TargetMessageTrigger)object); + } } - SAXReader saxReader = new SAXReader(); - Document document = null; - try { - log.debug("Reading diamonds configuration."); - document = saxReader.read(configFile); - } catch (DocumentException e) { - // No need to fail the build due to internal Helium configuration errors. - log.debug("Diamonds configuration parsing error: " - + e.getMessage()); + } + + @SuppressWarnings("unchecked") + public static void initialize(Project prj) throws DiamondsException { + project = prj; + log.debug("Diamonds config initialization: project: " + project); + initializeMessage(prj); + for (String property : PROPERTY_NAMES ) { + validateProperty(property); } - parseConfig(document); - diamondsProperties = parseDiamondsProperties(document); - stages = parseStages(document); - targets = parseTargets(document); - } - - /** - * Parses the general configuration info. - * - * @param document - * - XML config in DOM4J document - */ - private static void parseConfig(Document document) { - log.debug("diamonds:DiamondsConfig:parsing general configuration."); - Node node = document.selectSingleNode("//output-dir"); - outputDir = node.valueOf("@path"); - node = document.selectSingleNode("//template-dir"); - templateDir = node.valueOf("@path"); + Hashtable references = prj.getReferences(); + for (String key : references.keySet()) { + Object object = references.get(key); + if (object instanceof Stage) { + log.debug("stage found: " + key); + Stage stageMap = (Stage)object; + stageMap.setStageName(key); + stages.put(key, (Stage)object); + } + } } - /** - * Parses the server info. - * - * @param document - * - XML config in DOM4J document - */ - private static DiamondsProperties parseDiamondsProperties(Document document) { - log.debug("diamonds:DiamondsConfig:parsing diamonds properties."); - - Map propertiesMap = new HashMap(); - - loadProperty(document, propertiesMap, "host"); - loadProperty(document, propertiesMap, "port"); - loadProperty(document, propertiesMap, "path"); - loadProperty(document, propertiesMap, "tstampformat"); - loadProperty(document, propertiesMap, "mail"); - loadProperty(document, propertiesMap, "ldapserver"); - loadProperty(document, propertiesMap, "smtpserver"); - loadProperty(document, propertiesMap, "initialiser-target-name"); - loadProperty(document, propertiesMap, "category-property"); - loadProperty(document, propertiesMap, "buildid-property"); - return new DiamondsProperties(propertiesMap); - } - - /** - * Parses the Targets data from config. - * - * @param document - * - XML config in DOM4J document - * @return list of targets available in the config - */ - @SuppressWarnings("unchecked") - private static Map parseTargets(Document document) { - log.debug("diamonds:DiamondsConfig:parsing for targets"); - Map targets = new HashMap(); - List stageNodes = document.selectNodes("//target"); - - // Set initialiserTargetName according to target name defined Diamonds config file - initialiserTargetName = diamondsProperties.getProperty("initialiser-target-name"); - targets.put(initialiserTargetName, new Target(initialiserTargetName,"","","","")); - for (Element stageNode : stageNodes) { - targets.put(stageNode.valueOf("@name"), new Target(stageNode - .valueOf("@name"), stageNode.valueOf("@template-file"), - stageNode.valueOf("@logfile"), stageNode - .valueOf("@ant-properties"), stageNode - .valueOf("@defer"))); + private static void validateProperty(String propertyName) throws DiamondsException { + String propertyValue = project.getProperty(propertyName); + if (propertyValue == null) { + throw new DiamondsException("required property: " + propertyName + " not defined"); } - return targets; - } - - /** - * Parses the stages info. - * - * @param document - * - XML config in DOM4J document - * @return list of stages in config - */ - @SuppressWarnings("unchecked") - private static List parseStages(Document document) { - List stages = new ArrayList(); - List stageNodes = document.selectNodes("//stage"); - log.debug("diamonds:DiamondsConfig:parsing for stages"); - for (Element stage : stageNodes) { - stages.add(new Stage(stage.valueOf("@name"), stage - .valueOf("@start"), stage.valueOf("@end"), stage - .valueOf("@logfile"))); - } - return stages; } /** @@ -168,7 +108,7 @@ * * @return the stages from config in memory */ - static List getStages() { + static Map getStages() { return stages; } @@ -177,8 +117,8 @@ * * @return the targets from config in memory */ - static Map getTargets() { - return targets; + static HashMap getTargetsMap() { + return targetMessageList; } /** @@ -187,7 +127,7 @@ * @return the existance of stages in config */ public static boolean isStagesInConfig() { - return stages != null; + return !stages.isEmpty(); } /** @@ -196,58 +136,56 @@ * @return the targets from config in memory */ public static boolean isTargetsInConfig() { - return targets != null; + return !targetMessageList.isEmpty(); + } + + public static String getHost() { + return project.getProperty(DIAMONDS_HOST_PROPERTY); + } + + public static String getPort() { + return project.getProperty(DIAMONDS_PORT_PROPERTY); + } + + public static String getPath() { + return project.getProperty(DIAMONDS_PATH_PROPERTY); + } + + public static String getTimeFormat() { + return project.getProperty(DIAMONDS_TSTAMP_PROPERTY); } - /** - * Gets the diamonds properties loaded from config - * - * @return the targets from config in memory - */ - public static DiamondsProperties getDiamondsProperties() { - return diamondsProperties; + public static String getMailInfo() { + return project.getProperty(DIAMONDS_MAIL_PROPERTY); + } + + public static String getLDAPServer() { + return project.getProperty(DIAMONDS_LDAP_PROPERTY); } - /** - * Gets the output directory - * - * @return the output directory, loaded from config - */ - static String getOutputDir() { - return outputDir; + public static String getSMTPServer() { + return project.getProperty(DIAMONDS_SMTP_PROPERTY); + } + + public static String getBuildIdProperty() { + return "diamonds.build.id"; + } + + public static String getBuildId() { + return project.getProperty(getBuildIdProperty()); } /** - * Gets the output directory - * - * @return the output directory, loaded from config - */ - static String getTemplateDir() { - return templateDir; - } - - /** * Gets the initialiserTargetName * - * @return the initialiserTargetName, loaded from config + * @return the initialiserTargetName */ - public static String getInitialiserTargetName() { - return initialiserTargetName; + public static String getInitializerTargetProperty() { + return DIAMONDS_INITIALIZER_TARGET_PROPERTY; } - - /** - * Load diamonds property into hashmap. - * @param doc - * @param hash - * @param name - * @return - */ - public static void loadProperty(Document document, Map hash, String name) { - Node node = document.selectSingleNode("//property[@name='" + name + "']"); - if (node == null) { - throw new BuildException("diamonds: DiamondsConfig:'" + name + "' property definition is missing."); - } - hash.put(name, node.valueOf("@value")); + + public static String getCategory() { + return project.getProperty(DIAMONDS_CATEGORY_PROPERTY); } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsExceptionStatusUpdate.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsExceptionStatusUpdate.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsExceptionStatusUpdate.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,40 +1,32 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: To update the build status to Diamonds with signals in case of build exceptions. -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: To update the build status to Diamonds with signals in case of build exceptions. + * + */ + package com.nokia.helium.diamonds; +import java.text.SimpleDateFormat; +import org.apache.tools.ant.types.DataType; +import java.util.Hashtable; +import java.util.Vector; +import org.apache.log4j.Logger; import org.apache.tools.ant.Project; import com.nokia.helium.core.ant.HlmExceptionHandler; -import com.nokia.helium.core.PropertiesSource; -import com.nokia.helium.core.TemplateInputSource; -import com.nokia.helium.core.TemplateProcessor; import com.nokia.helium.signal.SignalStatus; import com.nokia.helium.signal.SignalStatusList; -import org.apache.log4j.Logger; - -import java.util.Hashtable; -import java.util.Vector; -import java.util.List; -import java.io.File; -import java.util.ArrayList; -import java.text.SimpleDateFormat; -import java.util.Properties; - /** * Class to store the builds status and check the signal is present in the deferred signal list. @@ -42,7 +34,7 @@ * With collected signal information and build status send the generated XML file to diamonds client class * to update the information into diamonds */ -public class DiamondsExceptionStatusUpdate implements HlmExceptionHandler { +public class DiamondsExceptionStatusUpdate extends DataType implements HlmExceptionHandler { private Logger log = Logger.getLogger(DiamondsExceptionStatusUpdate.class); /* Initiate build status to failed as this method will be invoked in case of exceptions only */ @@ -50,13 +42,10 @@ private SimpleDateFormat timeFormat; - private TemplateProcessor templateProcessor; - private Hashtable signalInformation = new Hashtable(); private String outputFile,templateFile; - private List sourceList = new ArrayList(); /** * Implements the Exception method to update build status and signal information to diamonds. @@ -65,109 +54,42 @@ * @param e */ @SuppressWarnings("unchecked") - public void handleException(Project project, String module, Exception e) { - templateProcessor = new TemplateProcessor(); - Properties tempProperties = new Properties(); - String templateDir = DiamondsConfig.getTemplateDir(); - /* Initialize the diamond properties class to access the diamonds properties */ - DiamondsProperties diamondsProperties = DiamondsConfig.getDiamondsProperties(); - //Check, Is the diamonds listener is initialized? - if (DiamondsListenerImpl.isInitialized()) { - timeFormat = new SimpleDateFormat(DiamondsConfig.getDiamondsProperties().getProperty("tstampformat")); - /* Initialize the diamond client class required to update the information into diamonds. */ - DiamondsClient diamondsClient = new DiamondsClient(project - .getProperty(diamondsProperties.getProperty("host")), - project.getProperty(diamondsProperties - .getProperty("port")), project - .getProperty(diamondsProperties - .getProperty("path")), project - .getProperty(diamondsProperties - .getProperty("mail"))); + public void handleException(Project project, Exception e) { + Project prj = DiamondsListenerImpl.getProject(); - /* Check is the signal is in deferred signal list? - * If so get the signal information like signal name, error message and target name - * - */ - if (SignalStatusList.getDeferredSignalList().hasSignalInList()) { - Vector signalList = SignalStatusList.getDeferredSignalList().getSignalStatusList(); - timeFormat = new SimpleDateFormat(DiamondsConfig.getDiamondsProperties().getProperty("tstampformat")); - log.debug("Build Status = " + buildStatus); - int i = 0; - for (SignalStatus status : signalList) { - signalInformation.put("diamond.signal.name." + i, status.getName()); - signalInformation.put("diamond.error.message." + i, status.getMessage()); - signalInformation.put("diamond.time.stamp." + i,new String(timeFormat.format(status.getTimestamp()))); - i += 1; + try { + if (DiamondsListenerImpl.isInitialized()) { + if (SignalStatusList.getDeferredSignalList().hasSignalInList()) { + Vector signalList = SignalStatusList.getDeferredSignalList().getSignalStatusList(); + timeFormat = new SimpleDateFormat(DiamondsConfig.getTimeFormat()); + log.debug("Build Status = " + buildStatus); + int i = 0; + for (SignalStatus status : signalList) { + prj.setProperty("diamond.signal.name." + i, status.getName()); + prj.setProperty("diamond.error.message." + i, status.getName()); + prj.setProperty("diamond.time.stamp." + i, new String(timeFormat.format(status.getTimestamp()))); + DiamondsListenerImpl.sendMessage("diamonds-signal"); + } } - /* Generate the signal XML file required for diamonds to update the signal information, - * using templateprocessor class - */ - templateFile = "diamonds_signal.xml.ftl"; - outputFile = DiamondsConfig.getOutputDir() + File.separator + "diamonds-signal.xml"; - sourceList.add(new PropertiesSource("diamondSignal", signalInformation)); - templateProcessor.convertTemplate(templateDir, templateFile, outputFile,sourceList); - - /* send the generated XML file for diamonds client to update the signals information into Diamonds */ - log.debug("sending data to diamonds ..." + outputFile); - diamondsClient.sendData(outputFile, DiamondsConfig.getDiamondsProperties().getDiamondsBuildID()); - try { - DiamondsListenerImpl.mergeToFullResults(new File(outputFile)); - } catch (DiamondsException de) { - log.error("Not able to merge into full results XML file " + de.getMessage(), de); + if (SignalStatusList.getNowSignalList().hasSignalInList()) { + Vector signalList = SignalStatusList.getNowSignalList().getSignalStatusList(); + buildStatus = "failed"; + timeFormat = new SimpleDateFormat(DiamondsConfig.getTimeFormat()); + log.debug("Build Status = " + buildStatus); + int i = 0; + for (SignalStatus status : signalList) { + prj.setProperty("diamond.signal.name." + i, status.getName()); + prj.setProperty("diamond.error.message." + i, status.getMessage()); + prj.setProperty("diamond.time.stamp." + i,new String(timeFormat.format(status.getTimestamp()))); + i += 1; + } + DiamondsListenerImpl.sendMessage("diamonds.signal.message"); } + prj.setProperty("build.status", buildStatus); + DiamondsListenerImpl.sendMessage("diamonds.status.message"); } - /* Check, is the signal is in now signal list? - * If so get the signal information like signal name, error message and target name - * - */ - if (SignalStatusList.getNowSignalList().hasSignalInList()) { - Vector signalList = SignalStatusList.getNowSignalList().getSignalStatusList(); - buildStatus = "failed"; - timeFormat = new SimpleDateFormat(DiamondsConfig.getDiamondsProperties().getProperty("tstampformat")); - log.debug("Build Status = " + buildStatus); - int i = 0; - for (SignalStatus status : signalList) { - signalInformation.put("diamond.signal.name." + i, status.getName()); - signalInformation.put("diamond.error.message." + i, status.getMessage()); - signalInformation.put("diamond.time.stamp." + i,new String(timeFormat.format(status.getTimestamp()))); - i += 1; - } - /* Generate the signal XML file required for diamonds to update the signal information, - * using templateprocessor class - */ - templateFile = "diamonds_signal.xml.ftl"; - outputFile = DiamondsConfig.getOutputDir() + File.separator + "diamonds-signal.xml"; - sourceList.add(new PropertiesSource("diamondSignal", signalInformation)); - templateProcessor.convertTemplate(templateDir, templateFile, outputFile,sourceList); - - /* send the generated XML file for diamonds client to update the signals information into Diamonds */ - log.debug("sending data to diamonds ..." + outputFile); - diamondsClient.sendData(outputFile, DiamondsConfig.getDiamondsProperties().getDiamondsBuildID()); - try { - DiamondsListenerImpl.mergeToFullResults(new File(outputFile)); - } catch (DiamondsException de) { - log.error("Not able to merge into full results XML file " + de.getMessage(), de); - } - } - /* Generate the build status XML file required for diamonds to update the build status information, - * using templateprocessor class. - */ - tempProperties.put("build.status", buildStatus); - sourceList.add(new PropertiesSource("ant", project.getProperties())); - sourceList.add(new PropertiesSource("diamonds", tempProperties)); - outputFile = DiamondsConfig.getOutputDir() + File.separator + "diamonds-status.xml"; - templateFile = "diamonds_status.xml.ftl"; - templateProcessor.convertTemplate(templateDir, templateFile, outputFile, sourceList); - - /* send the generated XML file for diamonds client to update the build status into Diamonds */ - log.debug("[DiamondsExceptionStatusUpdate] => sending data to diamonds ..." + outputFile); - diamondsClient.sendData(outputFile, DiamondsConfig.getDiamondsProperties().getDiamondsBuildID()); - try { - DiamondsListenerImpl.mergeToFullResults(new File(outputFile)); - } catch (DiamondsException de) { - log.error("Not able to merge into full results XML file " + de.getMessage(), de); - } + } catch (DiamondsException dex) { + log.debug("exception: ", dex); } - } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListenerImpl.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListenerImpl.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsListenerImpl.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,48 +1,46 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.diamonds; import org.apache.tools.ant.BuildEvent; + import org.apache.tools.ant.Project; -import org.apache.tools.ant.util.FileUtils; import java.util.Date; -import java.util.List; -import java.util.HashSet; import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.ListIterator; import org.apache.log4j.Logger; -import java.util.Properties; -import com.nokia.helium.core.PropertiesSource; -import com.nokia.helium.core.TemplateInputSource; -import com.nokia.helium.core.TemplateProcessor; +import com.nokia.helium.core.EmailSendException; +import com.nokia.helium.core.ant.Message; +import com.nokia.helium.core.MessageCreationException; import com.nokia.helium.diamonds.XMLMerger.XMLMergerException; +import java.io.InputStream; /** - * Base diamonds logger implementation. The common implementation like - * initialization done here and used by sub classes. + * Base diamonds logger implementation. The common implementation like initialization done here and + * used by sub classes. */ public class DiamondsListenerImpl implements DiamondsListener { - private static ArrayList finalLogList = new ArrayList(); + private static ArrayList finalStreamList = new ArrayList(); private static DiamondsClient diamondsClient; @@ -50,97 +48,72 @@ private static ArrayList deferLogList = new ArrayList(); - private TemplateProcessor templateProcessor; + private static Logger log = Logger.getLogger(DiamondsListenerImpl.class); - private Project project; + private static Project project; + + private static Object mutexObject = new Object();; - private SimpleDateFormat timeFormat; - - private Date buildStartTime; - - private Logger log = Logger.getLogger(DiamondsListenerImpl.class); + private static SimpleDateFormat timeFormat; /** * Default constructor */ public DiamondsListenerImpl() { - templateProcessor = new TemplateProcessor(); - timeFormat = new SimpleDateFormat(DiamondsConfig - .getDiamondsProperties().getProperty("tstampformat")); + } + + public static void initialize(Project prj) { + project = prj; + log.debug("buildbegin:" + project); + Date date = new Date(); + timeFormat = new SimpleDateFormat(DiamondsConfig.getTimeFormat()); + log.debug("build.start.time:" + date); + project.setProperty("build.start.time", timeFormat.format(date)); } /** * Function to process logging info during end of build * - * @param event - * of target execution. + * @param event of target execution. */ - public final void buildBegin(BuildEvent buildEvent) - throws DiamondsException { - project = buildEvent.getProject(); - buildStartTime = new Date(); + public final void buildBegin(BuildEvent buildEvent) throws DiamondsException { } /** * Function to process logging info during end of build * - * @param event - * of target execution. + * @param event of target execution. */ @SuppressWarnings("unchecked") - public final void buildEnd(BuildEvent buildEvent) throws DiamondsException { + public void buildEnd(BuildEvent buildEvent) throws DiamondsException { + log.debug("build end: " + isInitialized()); if (isInitialized()) { - log.debug("diamonds:DiamondsListenerImpl:sending final data to diamonds."); - String output = DiamondsConfig.getOutputDir() + File.separator - + "diamonds-finish.xml"; - File outputFile = new File(output); - String finishTemplateFile = "diamonds_finish.xml.ftl"; - Properties tempProperties = new Properties(); - tempProperties.put("build.end.time", timeFormat - .format(new Date())); - List sourceList = new ArrayList(); - sourceList.add(new PropertiesSource("ant", project - .getProperties())); - sourceList - .add(new PropertiesSource("diamonds", tempProperties)); - templateProcessor.convertTemplate(DiamondsConfig - .getTemplateDir(), finishTemplateFile, output, - sourceList); - - log.info("Sending final data to diamonds."); - // String mergedFile = mergeFiles(output); - diamondsClient.sendData(output, DiamondsConfig - .getDiamondsProperties().getDiamondsBuildID()); - mergeToFullResults(outputFile); + project.setProperty("build.end.time", timeFormat.format(new Date())); + sendMessage("final.message"); isInitialized = false; - DiamondsProperties props = DiamondsConfig.getDiamondsProperties(); - String smtpServer = project.getProperty(props - .getProperty("smtpserver")); - String ldapServer = project.getProperty(props - .getProperty("ldapserver")); - + InputStream first = finalStreamList.remove(0); try { - File first = finalLogList.remove(0); - String outputDir = DiamondsConfig.getOutputDir(); - File fullResultsFile = new File(outputDir + File.separator - + "diamonds-full-results.xml"); - FileUtils.getFileUtils().copyFile(first, fullResultsFile); - XMLMerger merger = new XMLMerger(fullResultsFile); - HashSet fileHash = new HashSet(finalLogList); - for (File file : fileHash) { + //printStreamContent(first); + File fullResultsFile = File.createTempFile("diamonds-full-results", ".xml"); + XMLMerger merger = new XMLMerger(first, fullResultsFile); + String smtpServer = DiamondsConfig.getSMTPServer(); + String ldapServer = DiamondsConfig.getLDAPServer(); + for (InputStream stream : finalStreamList) { try { - merger.merge(file); - } catch (XMLMerger.XMLMergerException xe) { + merger.merge(stream); + } + catch (XMLMerger.XMLMergerException xe) { log.debug("Error during the merge: ", xe); } } -// diamondsClient.sendData(fullResultsFile.getAbsolutePath(), DiamondsConfig.getDiamondsProperties().getDiamondsBuildID()); - diamondsClient.sendDataByMail( - fullResultsFile.getAbsolutePath(), smtpServer, - ldapServer); + diamondsClient.sendDataByMail(fullResultsFile.getAbsolutePath(), smtpServer, ldapServer); + } catch (EmailSendException ese) { + log.warn("Error occured while sending mail: " + ese.getMessage()); + } catch (IOException e) { log.error("Error sending diamonds final log: IOException", e); - } catch (XMLMergerException e) { + } + catch (XMLMergerException e) { log.error("Error sending diamonds final log: XMLMergerException ", e); } } @@ -149,8 +122,7 @@ /** * Function to process logging info during begining of target execution * - * @param event - * of target execution. + * @param event of target execution. */ public void targetBegin(BuildEvent buildEvent) throws DiamondsException { initDiamondsClient(); @@ -159,8 +131,7 @@ /** * Function to process logging info during end of target execution * - * @param event - * of target execution. + * @param event of target execution. */ public void targetEnd(BuildEvent buildEvent) throws DiamondsException { } @@ -174,97 +145,109 @@ return isInitialized; } - public static void mergeToFullResults(File xmlFile) throws DiamondsException { - finalLogList.add(xmlFile); + public static void mergeToFullResults(InputStream stream) throws DiamondsException { + finalStreamList.add(stream); } - protected String getSourceFile(String inputName) { - return DiamondsConfig.getOutputDir() + File.separator + inputName - + ".xml"; + + /** + * Helper function to return the default project passed to messages. + */ + static Project getProject() { + return project; } - + + + protected DiamondsClient getDiamondsClient() { return diamondsClient; } - - protected TemplateProcessor getTemplateProcessor() { - return templateProcessor; - } - + + protected boolean getIsInitialized() { return isInitialized; } - - protected SimpleDateFormat getTimeFormat() { + + protected static SimpleDateFormat getTimeFormat() { return timeFormat; } - + protected ArrayList getDeferLogList() { return deferLogList; } + + protected static File streamToTempFile(InputStream stream) throws IOException { + File temp = File.createTempFile("diamonds", "xml"); + FileOutputStream out = new FileOutputStream(temp); + int read = 0; + byte[] bytes = new byte[1024]; + + while ((read = stream.read(bytes)) != -1) { + out.write(bytes, 0, read); + } + out.flush(); + out.close(); + stream.close(); + return temp; + } + private static void sendMessage(Message message, String buildID) throws DiamondsException { + try { + File tempFile = streamToTempFile(message.getInputStream()); + tempFile.deleteOnExit(); + if (buildID == null) { + buildID = diamondsClient.getBuildId(new FileInputStream(tempFile)); + if (buildID != null) { + project.setProperty(DiamondsConfig.getBuildIdProperty(), buildID); + log.info("got Build ID from diamonds:" + buildID); + } + } else { + diamondsClient.sendData(new FileInputStream(tempFile), buildID); + } + mergeToFullResults(new FileInputStream(tempFile)); + } catch (IOException iex) { + log.debug("IOException while retriving message:", iex); + throw new DiamondsException("IOException while retriving message"); + } + catch (MessageCreationException mex) { + log.debug("IOException while retriving message:", mex); + throw new DiamondsException("error during message retrival"); + } + } + + /** + * Send message to diamonds. + * @param messageId - id to look from in the ant config and to send it to diamonds. + * id is pointing to an fmpp message. + */ + public static void sendMessage(String messageId) throws DiamondsException { + log.debug("send-message:" + messageId); + synchronized (mutexObject) { + String buildID = project.getProperty(DiamondsConfig.getBuildIdProperty()); + Object obj = project.getReference(messageId); + if (obj != null) { + if (obj instanceof Message) { + sendMessage((Message)obj, buildID); + } + } else { + log.debug("Message not sent for message id: " + messageId); + } + } + } + /** * Initializes the diamonds client and sends the initial data */ @SuppressWarnings("unchecked") protected void initDiamondsClient() throws DiamondsException { - String outputDir = DiamondsConfig.getOutputDir(); if (!isInitialized) { - String startTemplateFile = "diamonds_start.xml.ftl"; - String output = outputDir + File.separator - + "diamonds-start.log.xml"; - new File(outputDir).mkdirs(); - File outputFile = new File(output); - Properties tempProperties = new Properties(); - tempProperties.put("build.start.time", timeFormat - .format(buildStartTime)); - List sourceList = new ArrayList(); - sourceList.add(new PropertiesSource("ant", project - .getProperties())); - sourceList - .add(new PropertiesSource("diamonds", tempProperties)); - DiamondsProperties diamondsProperties = DiamondsConfig - .getDiamondsProperties(); - templateProcessor.convertTemplate(DiamondsConfig - .getTemplateDir(), startTemplateFile, output, - sourceList); - mergeToFullResults(outputFile); - - // String mergedFile = mergeFiles(output); - log.info("Initializing diamonds client"); - diamondsClient = new DiamondsClient(project - .getProperty(diamondsProperties.getProperty("host")), - project.getProperty(diamondsProperties - .getProperty("port")), project - .getProperty(diamondsProperties - .getProperty("path")), project - .getProperty(diamondsProperties - .getProperty("mail"))); - String buildID = diamondsClient - .getBuildId(outputFile.getAbsolutePath()); - if (buildID != null) { - diamondsProperties.setDiamondsBuildID(buildID); - project.setProperty(diamondsProperties.getProperty("buildid-property"), - diamondsProperties.getDiamondsBuildID()); - log.info("Got build id from diamonds: " + buildID); - } else { - diamondsProperties.setDiamondsBuildID(buildID); - project.setProperty(diamondsProperties.getProperty("buildid-property"), - "default"); - log.info("diamonds build id set to default and in record only mode"); - } - if (deferLogList.size() > 0) { - log - .debug("diamonds:DiamondsListenerImpl: sending DefferList"); - ListIterator defferList = deferLogList - .listIterator(); - while (defferList.hasNext()) { - String mergedDeferFile = defferList.next(); - mergeToFullResults(new File(mergedDeferFile)); - diamondsClient.sendData(mergedDeferFile, DiamondsConfig - .getDiamondsProperties().getDiamondsBuildID()); - } - deferLogList.clear(); + diamondsClient = new DiamondsClient(DiamondsConfig.getHost(), + DiamondsConfig.getPort(), + DiamondsConfig.getPath(), + DiamondsConfig.getMailInfo()); + String buildID = project.getProperty(DiamondsConfig.getBuildIdProperty()); + if (buildID == null ) { + sendMessage("initial.message"); } isInitialized = true; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsPostBuildStatusUpdate.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsPostBuildStatusUpdate.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsPostBuildStatusUpdate.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,99 +1,61 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: To update the build status to Diamonds with signals in case of build exceptions. -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: To update the build status to Diamonds with signals in case of build exceptions. + * + */ + package com.nokia.helium.diamonds; +import org.apache.log4j.Logger; +import org.apache.tools.ant.types.DataType; import org.apache.tools.ant.Project; -import com.nokia.helium.core.ant.types.*; -import com.nokia.helium.core.PropertiesSource; -import com.nokia.helium.core.TemplateInputSource; -import com.nokia.helium.core.TemplateProcessor; - -import org.apache.log4j.Logger; - -import java.util.List; -import java.io.File; -import java.util.ArrayList; -import java.util.Properties; - +import com.nokia.helium.core.ant.PostBuildAction; /** - * Class to store the builds status and send the generated XML file to diamonds client class - * to update the build status into diamonds + * Class to store the builds status and send the generated XML file to diamonds client class to + * update the build status into diamonds */ -public class DiamondsPostBuildStatusUpdate extends HlmPostDefImpl { +public class DiamondsPostBuildStatusUpdate extends DataType implements PostBuildAction { private Logger log; /* Initiate build status to failed as this method will be invoked in case of exceptions only */ private String buildStatus = "succeeded"; - private TemplateProcessor templateProcessor; + private String outputFile, templateFile; - private String outputFile,templateFile; - - private List sourceList = new ArrayList(); public DiamondsPostBuildStatusUpdate() { - log = Logger.getLogger(DiamondsPostBuildStatusUpdate.class); + log = Logger.getLogger(DiamondsPostBuildStatusUpdate.class); } /** * Override execute method to update build status to diamonds. + * * @param prj * @param module * @param targetNames */ @SuppressWarnings("unchecked") - public void execute(Project prj, String module, String[] targetNames) { - templateProcessor = new TemplateProcessor(); - Properties tempProperties = new Properties(); - - /* Intialiaze the diamond properties class to access the diamonds properties */ - DiamondsProperties diamondsProperties = DiamondsConfig.getDiamondsProperties(); - - //Check, Is the diamonds listener is initialized? - if (DiamondsListenerImpl.isInitialized()) { - /* Initialize the diamond client class required to update the information into diamonds. */ - DiamondsClient diamondsClient = new DiamondsClient(getProject() - .getProperty(diamondsProperties.getProperty("host")), - getProject().getProperty(diamondsProperties - .getProperty("port")), getProject() - .getProperty(diamondsProperties - .getProperty("path")), getProject() - .getProperty(diamondsProperties - .getProperty("mail"))); - /* Generate the build status XML file required for diamonds to update the build status information, - * using templateprocessor class. - */ - tempProperties.put("build.status", buildStatus); - sourceList.add(new PropertiesSource("ant", getProject().getProperties())); - sourceList.add(new PropertiesSource("diamonds", tempProperties)); - outputFile = DiamondsConfig.getOutputDir() + File.separator + "diamonds-status.xml"; - templateFile = "diamonds_status.xml.ftl"; - templateProcessor.convertTemplate(DiamondsConfig.getTemplateDir(), templateFile, outputFile, sourceList); - - /* send the generated XML file for diamonds client to update the build status into Diamonds */ - log.debug("[DiamondsPostBuildStatusUpdate] => sending data to diamonds ..." + outputFile); - diamondsClient.sendData(outputFile, DiamondsConfig.getDiamondsProperties().getDiamondsBuildID()); - try { - DiamondsListenerImpl.mergeToFullResults(new File(outputFile)); - } catch (DiamondsException de) { - log.error("Not able to merge into full results XML file " + de.getMessage(), de); + public void executeOnPostBuild(Project project, String[] targetNames) { + try { + if (DiamondsListenerImpl.isInitialized()) { + Project prj = DiamondsListenerImpl.getProject(); + prj.setProperty("build.status", buildStatus); + DiamondsListenerImpl.sendMessage("diamonds-status"); } + } catch (DiamondsException de) { + log.error("Not able to merge into full results XML file " + de.getMessage(), de); } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsProperties.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/DiamondsProperties.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -package com.nokia.helium.diamonds; - -import java.util.Map; - -/** - * Helper class for Diamonds properties need to connect. - * - */ -public class DiamondsProperties { - private Map diamondsProperties; - - public DiamondsProperties(Map configroperties) { - diamondsProperties = configroperties; - } - - /** - * Gets the build id returned by Diamonds server. - * - * @return build ID - */ - public String getDiamondsBuildID() { - return diamondsProperties.get("buildid"); - } - - /** - * Sets the build id obtained from the server. - * - * @param diamondsBuildID - */ - public void setDiamondsBuildID(String diamondsBuildID) { - diamondsProperties.put("buildid", diamondsBuildID); - } - - /** - * Returns the required property obtained from config - * - * @param property - * for which the values needs to be obtained. - * @return address of server - */ - public String getProperty(String property) { - // need to validate the properties while assigning in constructor - return diamondsProperties.get(property); - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/Stage.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/Stage.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.diamonds; - -/** - * Helper class for Stage configuration of Diamonds. - * - */ -public class Stage { - private String stageName; - private String startTargetName; - private String endTargetName; - private String source; - - /** - * Constructor - * - * @param stName - * - name of the stage - * @param startTgName - * - Name of the start target - * @param endTgName - * - Name of the ending target of the stage - */ - public Stage(String stName, String startTgName, String endTgName, - String sourceFiles) { - String emptyString = ""; - if (!stName.equals(emptyString)) { - stageName = stName; - } - if (!startTgName.equals(emptyString)) { - startTargetName = startTgName; - } - if (!endTgName.equals(emptyString)) { - endTargetName = endTgName; - } - if (!sourceFiles.equals(emptyString)) { - source = sourceFiles; - } - } - - /** - * Get the stage Name of the stage. - * - * @return - name of the stage - */ - public String getStageName() { - return stageName; - } - - /** - * Get the stage Name of the stage. - * - * @return - name of the stage - */ - public String getSourceFile() { - return source; - } - - /** - * gets the start target of the stage - * - * @return - start target of the stage - */ - public String getStartTargetName() { - return startTargetName; - } - - /** - * gets the end target name of the stage. - * - * @return - end target name of the stage - */ - public String getEndTargetName() { - return endTargetName; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/StageDiamondsListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,58 +1,55 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.diamonds; -import org.apache.tools.ant.BuildEvent; - - -import org.apache.tools.ant.Target; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.BuildException; +import java.util.ArrayList; import java.util.Date; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedHashMap; -import java.util.Set; -import java.util.HashMap; import java.util.List; -import java.util.Enumeration; import java.util.Map; -import java.io.File; -import java.util.Iterator; +import java.util.Set; import java.util.Vector; -import java.util.ArrayList; + import org.apache.log4j.Logger; -import com.nokia.helium.core.PropertiesSource; -import com.nokia.helium.core.TemplateInputSource; -import com.nokia.helium.core.XMLTemplateSource; +import org.apache.tools.ant.BuildEvent; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Target; +import com.nokia.helium.core.ant.types.Stage; /** - * Diamonds client used to connect to get build id and also to send the build - * results + * Diamonds client used to connect to get build id and also to send the build results * */ public class StageDiamondsListener extends DiamondsListenerImpl { private static final Date INVALID_DATE = new Date(-1); + private static Object mutexObject = new Object();; + private Logger log = Logger.getLogger(StageDiamondsListener.class); - + private List> stageTargetBeginList = new ArrayList>(); - private Map stageTargetEndMap = new HashMap(); + private Map> stageTargetEndMap = new HashMap>(); private Map stageStartTargetMap = new HashMap(); @@ -60,9 +57,7 @@ private boolean isTargetMapInitialized; - private Project project; - - private List stages; + private Map stages; public StageDiamondsListener() { @@ -70,30 +65,28 @@ } public void targetBegin(BuildEvent buildEvent) throws DiamondsException { - project = buildEvent.getProject(); - int hashCode = project.hashCode(); + initDiamondsClient(); + Project projectInStage = buildEvent.getProject(); + int hashCode = projectInStage.hashCode(); String targetName = buildEvent.getTarget().getName(); if (!isTargetMapInitialized && stages != null) { - log - .debug("diamonds:StageDiamondsListener: initializing for all stages."); - initStageTargetsMap(); + log.debug("diamonds:StageDiamondsListener: initializing for all stages."); + initStageTargetsMap(projectInStage); isTargetMapInitialized = true; } String targetNameWithHashCode = targetName + "-" + hashCode; log.debug("targetBegin: targetNameWithHashCode: " + targetNameWithHashCode); - log.debug("targetBegin targetName: " + targetName + - " - currentStartTargetName:" + stageStartTargetMap.get(targetNameWithHashCode)); + log.debug("targetBegin targetName: " + targetName + " - currentStartTargetName:" + + stageStartTargetMap.get(targetNameWithHashCode)); if (stageStartTargetMap.get(targetNameWithHashCode) == null) { log.debug("looking for start target match and associating time to it"); findAndSetStartTimeForTargetInStageList(targetName, targetNameWithHashCode); } } - - private Date getStartTime(Stage stage, int hasCode) { - String startTargetName = stage.getStartTargetName(); - String endTargetName = stage.getEndTargetName(); - for (Iterator> listIter = stageTargetBeginList.iterator(); listIter - .hasNext();) { + + private Date getStartTime(Stage stage) { + String startTargetName = stage.getStartTarget(); + for (Iterator> listIter = stageTargetBeginList.iterator(); listIter.hasNext();) { Map stageMap = listIter.next(); if (stageMap.get(startTargetName) != null) { Set targetSet = stageMap.keySet(); @@ -101,123 +94,65 @@ log.debug("key: " + key); Date time = stageMap.get(key); log.debug("time: " + time); - if ( time != INVALID_DATE) { + if (time != INVALID_DATE) { return time; } } } } - throw new BuildException("No time recorded " + - "for stage:" + stage.getStageName()); + throw new BuildException("No time recorded " + "for stage:" + stage.getStageName()); } - private Stage getStageBasedOnEndTarget(String targetName, int hashCode) { - Stage stage = stageTargetEndMap.get(targetName); - if (stage != null) { - String currentStageTargetName = stageStartTargetMap.get( - stage.getStartTargetName() + "-" + hashCode); - log.debug("getStageBasedOnEndTarget: currentStargetTargetName" + currentStageTargetName); - if (currentStageTargetName != null) { - return stage; - } - } - return null; - } - @SuppressWarnings("unchecked") - public void targetEnd(BuildEvent buildEvent) throws DiamondsException { - String targetName = buildEvent.getTarget().getName(); - project = buildEvent.getProject(); - int hashCode = project.hashCode(); - String targetNameWithHashCode = targetName + "-" + hashCode; - log.debug("targetEnd: targetNamewith-hashcode: " + targetNameWithHashCode); - - Stage stage = getStageBasedOnEndTarget(targetName, hashCode); - if (stage != null && getIsInitialized() ) { - //initDiamondsClient(); - String stageName = stage.getStageName(); - String sourceFile = stage.getSourceFile(); - log.debug("targetEnd: stageName: " + stageName); - log - .debug("diamonds:StageDiamondsListener: finished recording for stage: " - + stageName); - if (sourceFile == null) { - sourceFile = getSourceFile(stageName); - } - log.debug("targetEnd: logical.stage: " + stageName); - Date startTime = getStartTime(stage, hashCode); - log.debug("targetEnd: starttime: " + startTime); - log.debug("targetEnd: endtime: " + - getTimeFormat().format(new Date())); - project.setProperty("logical.stage", stageName); - project.setProperty("stage.start.time", getTimeFormat() - .format(startTime)); - project.setProperty("stage.end.time", getTimeFormat() - .format(new Date())); - // Look for template file with stage name - String stageTemplateFileName = stageName + ".xml.ftl"; - File stageTemplateFile = new File(stageTemplateFileName); - if (stageTemplateFile.exists()) { - String output = DiamondsConfig.getOutputDir() - + File.separator + stageName + ".xml"; - try { - List sourceList = new ArrayList(); - sourceList.add(new PropertiesSource("ant", project - .getProperties())); - sourceList - .add(new XMLTemplateSource("doc", new File(sourceFile))); - getTemplateProcessor().convertTemplate(DiamondsConfig - .getTemplateDir(), stageTemplateFileName, - output, sourceList); - mergeToFullResults(new File(output)); - log.info("Sending data to diamonds for stage: " - + stageName); - getDiamondsClient().sendData(output, DiamondsConfig - .getDiamondsProperties().getDiamondsBuildID()); - } catch (com.nokia.helium.core.TemplateProcessorException e1) { - throw new DiamondsException( - "template conversion error for stage: " - + stageName + " : " + e1.getMessage()); + private void sendStageInfo(String targetName, int hashCode) throws DiamondsException { + List stageList = stageTargetEndMap.get(targetName); + synchronized (mutexObject) { + if (stageList != null) { + for (Stage stage : stageList) { + if (stage != null) { + log.debug("stage.name: " + stage.getStageName()); + log.debug("stage.start target name: " + stage.getStartTarget()); + String currentStageTargetName = stageStartTargetMap.get(stage.getStartTarget() + + "-" + hashCode); + log.debug("getStageBasedOnEndTarget: currentStargetTargetName" + currentStageTargetName); + if (currentStageTargetName != null) { + log.debug("stage in targetend: " + stage); + if (stage != null && getIsInitialized()) { + //initDiamondsClient(); + String stageName = stage.getStageName(); + log.debug("stageName in targetend: " + stageName); + String stageMessage = stageName + ".id"; + sendMessage(stageMessage); + Date startTime = getStartTime(stage); + getProject().setProperty("logical.stage", stageName); + getProject().setProperty("stage.start.time", getTimeFormat().format(startTime)); + getProject().setProperty("stage.end.time", getTimeFormat().format(new Date())); + sendMessage("stage.time.message"); + } + } + } } - } else { - log.debug("diamonds:StageDiamondsListener:tempalte file: " - + stageTemplateFile + " does not exist"); - } - - String output = DiamondsConfig.getOutputDir() + File.separator - + stageName + "-time.xml"; - log.debug("targetEnd: output " + output); - // Store the time for the current stage and send it - stageTemplateFileName = "diamonds_stage.xml.ftl"; - try { - List sourceList = new ArrayList(); - sourceList.add(new PropertiesSource("ant", project - .getProperties())); - sourceList.add(new XMLTemplateSource("doc", new File(sourceFile))); - getTemplateProcessor().convertTemplate(DiamondsConfig - .getTemplateDir(), stageTemplateFileName, output, - sourceList); - mergeToFullResults(new File(output)); - // List filesToMerge = new ArrayList(); - - // mergedFile = mergeFiles(output); - getDiamondsClient().sendData(output, DiamondsConfig - .getDiamondsProperties().getDiamondsBuildID()); - } catch (com.nokia.helium.core.TemplateProcessorException e1) { - throw new DiamondsException("template conversion error while sending data for stage: " - + stageName + " : " + e1.getMessage()); } } } + @SuppressWarnings("unchecked") + public void targetEnd(BuildEvent buildEvent) throws DiamondsException { + String targetName = buildEvent.getTarget().getName(); + Project prj = buildEvent.getProject(); + int hashCode = prj.hashCode(); + String targetNameWithHashCode = targetName + "-" + hashCode; + log.debug("targetEnd: targetNamewith-hashcode: " + targetNameWithHashCode); + sendStageInfo(targetName, hashCode); + } + private void findAndSetStartTimeForTargetInStageList(String targetName, - String targetNameWithHashCode) throws DiamondsException { - for (Iterator> listIter = stageTargetBeginList.iterator(); listIter - .hasNext();) { + String targetNameWithHashCode) throws DiamondsException { + for (Iterator> listIter = stageTargetBeginList.iterator(); listIter.hasNext();) { Map stageMap = listIter.next(); Date targetTime = stageMap.get(targetName); if (targetTime != null && targetTime.equals(INVALID_DATE)) { log.debug("diamonds:StageDiamondsListener: started recording for stage-target-----: " - + targetName); + + targetName); log.debug("findtime: targetNamewith-hashcode: " + targetNameWithHashCode); log.debug("findtime: time: " + new Date()); stageMap.put(targetName, new Date()); @@ -228,18 +163,16 @@ } @SuppressWarnings("unchecked") - private void initStageTargetsMap() { - Iterator iter = stages.iterator(); - while (iter.hasNext()) { - // stage begin process - Stage stage = iter.next(); - String startTargetName = stage.getStartTargetName(); + private void initStageTargetsMap(Project projectInStage) { + for (String key : stages.keySet()) { + Stage stage = stages.get(key); + String startTargetName = stage.getStartTarget(); Map stageMap = new LinkedHashMap(); Vector arrayList = null; try { - arrayList = project.topoSort(startTargetName, project - .getTargets(), false); - } catch (BuildException be) { + arrayList = projectInStage.topoSort(startTargetName, projectInStage.getTargets(), false); + } + catch (BuildException be) { log.debug("Diamonds target missing: ", be); } if (arrayList != null) { @@ -254,16 +187,14 @@ stageTargetBeginList.add(stageMap); // stage end process - String endTargetName = stage.getEndTargetName(); + String endTargetName = stage.getEndTarget(); // fast lookup - Stage existingStage = stageTargetEndMap.get(endTargetName); - if (existingStage != null) { - throw new BuildException("Not supported: two stages with" + - "same ending target defined by:stage1: " + - existingStage.getStageName() + - "stage2: " + stage.getStageName()); + List existingStageList = stageTargetEndMap.get(endTargetName); + if (existingStageList == null) { + existingStageList = new ArrayList(); + stageTargetEndMap.put(endTargetName, existingStageList); } - stageTargetEndMap.put(endTargetName, stage); + existingStageList.add(stage); log.debug(" - End target: " + endTargetName); } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/Target.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/Target.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -package com.nokia.helium.diamonds; - -/** - * Helper class for the target in diamonds config. - * - */ -public class Target { - private String targetName; - private String source; - private boolean reqAntProperties; - private boolean defer; - private String templatefile; - - /** - * Constructor - * - * @param target - * - name of the target - * @param src - * - input source location. - */ - public Target(String target, String src) { - this(target, null, src, "false", "false"); - } - - /** - * Constructor - * - * @param target - * - name of the target - * @param src - * - input source location. - * @param antProps - * - boolean to pass ant properties while conversion. - */ - public Target(String target, String tplfile, String src, String antProps, - String deferSend) { - String emptyString = ""; - if (!target.equals(emptyString)) { - targetName = target; - } - if (!src.equals(emptyString)) { - source = src; - } - if (!tplfile.equals(emptyString)) { - templatefile = tplfile; - } - if (antProps != null && antProps.equals("true")) { - reqAntProperties = true; - } - if (deferSend != null && deferSend.equals("true")) { - defer = true; - } - } - - /** - * Get the target name of the target to send data - * - * @return - target name of the target to send data - */ - public String getTargetName() { - return targetName; - } - - /** - * Get the input source used for template conversion. - * - * @return - location of the input source. - */ - public String getSource() { - return source; - } - - public boolean isDefer() { - return defer; - } - - public String getTemplateFile() { - return templatefile; - } - - /** - * returns true if ant properties required for conversion, obtained from - * configuration. - * - * @return - name of the stage - */ - public boolean isAntPropertiesRequired() { - return reqAntProperties; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/TargetDiamondsListener.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/TargetDiamondsListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/TargetDiamondsListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,46 +1,44 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.diamonds; -import org.apache.tools.ant.BuildEvent; -import org.apache.tools.ant.Target; -import org.apache.tools.ant.Project; - -import java.util.ArrayList; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; import java.util.List; -import java.util.Hashtable; import java.util.Map; -import java.io.File; import org.apache.log4j.Logger; -import com.nokia.helium.core.PropertiesSource; -import com.nokia.helium.core.TemplateInputSource; -import com.nokia.helium.core.XMLTemplateSource; +import org.apache.tools.ant.BuildEvent; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Target; +import com.nokia.helium.core.ant.types.TargetMessageTrigger; +import com.nokia.helium.core.ant.Message; /** * Listener sending data based on target configuration to diamonds. */ public class TargetDiamondsListener extends DiamondsListenerImpl { - private Project project; - + private Logger log = Logger.getLogger(TargetDiamondsListener.class); - private Map targetsMap; + private Map targetsMap; private String currentTarget; @@ -48,29 +46,35 @@ * Default constructor */ public TargetDiamondsListener() { - targetsMap = DiamondsConfig.getTargets(); + targetsMap = DiamondsConfig.getTargetsMap(); + for (String key : targetsMap.keySet()) { + log.debug("target name: " + key); + } } private boolean isTargetsToExecute(BuildEvent buildEvent) { - project = buildEvent.getProject(); + Project projectInTarget = buildEvent.getProject(); Target target = buildEvent.getTarget(); boolean retValue = false; - com.nokia.helium.diamonds.Target currentTarget = targetsMap - .get(target.getName()); - String currentTargetName = null; - if (currentTarget != null) { - currentTargetName = currentTarget.getTargetName(); - } - if (currentTargetName != null) { - String ifCondition = target.getIf(); - String unlessCondition = target.getUnless(); - if (ifCondition == null && unlessCondition == null) { + log.debug("isTargetsToExecute: target:" + target.getName() ); + TargetMessageTrigger targetInMap = targetsMap.get(target.getName()); + log.debug("isTargetsToExecute: targetInMap:" + targetInMap ); + if (targetInMap != null) { + log.debug("target: " + target.getName()); + log.debug("targetInMap: " + targetInMap); + String targetNameInMap = targetInMap.getTargetName(); + log.debug("targetNameInMap: " + targetInMap.getTargetName()); + if (targetNameInMap != null) { retValue = true; - } else { - String ifProperty = project.getProperty(ifCondition); - String unlessProperty = project.getProperty(unlessCondition); - if (ifProperty != null || unlessProperty == null) { - retValue = true; + String ifCondition = target.getIf(); + if ((ifCondition != null) && (projectInTarget.getProperty( + projectInTarget.replaceProperties(ifCondition)) == null)) { + retValue = false; + } + String unlessCondition = target.getUnless(); + if (unlessCondition != null && (projectInTarget.getProperty( + projectInTarget.replaceProperties(unlessCondition)) != null)) { + retValue = false; } } } @@ -78,118 +82,71 @@ } /** - * Function to process logging info during beginning of target execution. - * This checks that the current target execution is in config and requires - * some data to be send it to diamonds. + * Function to process logging info during beginning of target execution. This checks that the + * current target execution is in config and requires some data to be send it to diamonds. * - * @param event - * of target execution. + * @param event of target execution. */ public void targetBegin(BuildEvent buildEvent) throws DiamondsException { + initDiamondsClient(); String targetName = buildEvent.getTarget().getName(); if (isTargetsToExecute(buildEvent)) { currentTarget = targetName; - com.nokia.helium.diamonds.Target target = targetsMap - .get(currentTarget); - if (!target.isDefer()) { - initDiamondsClient(); - } - } - } - - /** - * Function to process logging info during end of build. If the target in - * config, sends the data to diamonds (uses the template conversion if - * needed). - * - * @param event - * of target execution. - */ - public void targetEnd(BuildEvent buildEvent) throws DiamondsException { - String targetName = buildEvent.getTarget().getName(); - if (currentTarget != null && currentTarget.equals(targetName)) { - if (getIsInitialized()) { - log - .debug("diamonds:TargetDiamondsListener:finished recording, sending data to diamonds for target: " - + buildEvent.getTarget().getName()); - sendTargetData(buildEvent, buildEvent.getTarget().getProject()); - } - currentTarget = null; } } /** - * Sends the data to diamonds. First it looks if the template with target - * name exists, then it looks for input source file from config, if ant - * properties required from config, it uses it for template conversion. If - * no template file exists, sends the data directly. + * Function to process logging info during end of build. If the target in config, sends the data + * to diamonds (uses the template conversion if needed). * - * @param event - * of target execution. + * @param event of target execution. */ - @SuppressWarnings("unchecked") - private void sendTargetData(BuildEvent buildEvent, Project project) - throws DiamondsException { - com.nokia.helium.diamonds.Target target = targetsMap - .get(currentTarget); - String sourceFile = target.getSource(); - if (sourceFile == null) { - sourceFile = getSourceFile(target.getTargetName()); - } - Hashtable antProperties = null; - String targetTemplateFile = target.getTemplateFile(); - if (targetTemplateFile == null) { - targetTemplateFile = target.getTargetName() + ".xml.ftl"; - } - String output = DiamondsConfig.getOutputDir() + File.separator - + target.getTargetName() + ".xml"; - File templateFile = new File(DiamondsConfig.getTemplateDir(), - targetTemplateFile); - List sourceList = new ArrayList(); - if (sourceFile == null) { - log - .debug("diamonds:TargetDiamondsListener:sourceFile not defined."); - } else { - sourceList.add(new XMLTemplateSource("doc", new File(sourceFile))); - } - // Ant? - if (target.isAntPropertiesRequired()) { - sourceList - .add(new PropertiesSource("ant", project.getProperties())); - } - try { - if (templateFile.exists()) { - if (!(antProperties == null && sourceFile == null)) { - getTemplateProcessor().convertTemplate(DiamondsConfig - .getTemplateDir(), targetTemplateFile, output, - sourceList); + public void targetEnd(BuildEvent buildEvent) throws DiamondsException { + String targetName = buildEvent.getTarget().getName(); + if (isTargetsToExecute(buildEvent)) { + if (currentTarget != null && currentTarget.equals(targetName)) { + log.debug("targetEnd: " + targetName); + if (getIsInitialized()) { + log.debug("diamonds:TargetDiamondsListener:finished recording, sending data to diamonds for target: " + + buildEvent.getTarget().getName()); + sendTargetData(buildEvent, buildEvent.getTarget().getProject()); } - } else { - log - .debug("sendTargetData: exists(" - + templateFile.getAbsolutePath() + ") => false"); - + currentTarget = null; } - } catch (com.nokia.helium.core.TemplateProcessorException e1) { - throw new DiamondsException("template conversion error while sending data for target:" - + target + ":" + e1.getMessage()); - } - File outputFile = new File(output); - if (outputFile.exists()) { - mergeToFullResults(outputFile); - if (!target.isDefer()) { - getDiamondsClient().sendData(outputFile.getAbsolutePath(), - DiamondsConfig.getDiamondsProperties() - .getDiamondsBuildID()); - } else { - log.debug("diamonds:TargetDiamondsListener:defer logging for: " - + outputFile); - getDeferLogList().add(output); - } - } else { - log.debug("diamonds:TargetDiamondsListener:outputfile " - + outputFile + " does not exist"); } } + private void sendData(InputStream stream) throws DiamondsException { + String urlPath = DiamondsConfig.getBuildId(); + getDiamondsClient().sendData(stream, urlPath); + log.debug("urlPath:" + urlPath); + } + /** + * Sends the data to diamonds. First it looks if the template with target name exists, then it + * looks for input source file from config, if ant properties required from config, it uses it + * for template conversion. If no template file exists, sends the data directly. + * + * @param event of target execution. + */ + private void sendTargetData(BuildEvent buildEvent, Project project) throws DiamondsException { + TargetMessageTrigger targetMap = targetsMap.get(currentTarget); + if (targetMap != null) { + + List messageList = targetMap.getMessageList(); + for ( Message message : messageList ) { + try { + File tempFile = streamToTempFile(message.getInputStream()); + tempFile.deleteOnExit(); + sendData(new FileInputStream(tempFile)); + mergeToFullResults(new FileInputStream(tempFile)); + } catch (IOException iex) { + throw new DiamondsException("error closing the stream while sending data"); + } + catch (com.nokia.helium.core.MessageCreationException mex) { + log.debug("IOException while retriving message:", mex); + throw new DiamondsException("error during message retrival"); + } + } + } + } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/XMLMerger.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/XMLMerger.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/XMLMerger.java Mon Sep 13 13:11:19 2010 +0800 @@ -19,12 +19,13 @@ package com.nokia.helium.diamonds; import java.io.File; +import java.io.InputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; import java.util.Iterator; import java.util.List; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.UnsupportedEncodingException; import org.apache.log4j.Logger; import org.dom4j.Attribute; @@ -41,9 +42,10 @@ */ public class XMLMerger { private Logger log = Logger.getLogger(getClass()); - private File merge; + private InputStream mergeStream; private Document doc; private Element root; + private File outputFile; /** * Create an XMLMerger, the merge file will be used as input and output. @@ -51,18 +53,40 @@ * @param merge * @throws XMLMergerException */ - public XMLMerger(File merge) throws XMLMergerException { - log.debug("Merging into: " + merge.getAbsolutePath()); + public XMLMerger(InputStream stream, File file) throws XMLMergerException { try { - this.merge = merge; + outputFile = file; + mergeStream = stream; SAXReader reader = new SAXReader(); - doc = reader.read(merge); + doc = reader.read(mergeStream); root = doc.getRootElement(); } catch (DocumentException e) { throw new XMLMergerException(e.getMessage()); } } + + public void merge(InputStream stream) throws XMLMergerException { + try { + SAXReader reader = new SAXReader(); + Document dataDoc = reader.read(stream); + merge(dataDoc); + } catch (DocumentException e) { + throw new XMLMergerException(e.getMessage()); + } + } + private void merge(Document dataDoc) throws XMLMergerException { + Element dataRoot = dataDoc.getRootElement(); + if (!root.getName().equals(dataRoot.getName())) { + throw new XMLMergerException( + "Trying to merge incompatible xml format ('" + + root.getName() + "'!='" + dataRoot.getName() + + "')"); + } + mergeNode(root, dataRoot); + write(); + + } /** * Add all sub element of data file into the merged file. If the root * element name is different for the merged file an XMLMergerException is @@ -78,14 +102,7 @@ SAXReader reader = new SAXReader(); Document dataDoc = reader.read(data); Element dataRoot = dataDoc.getRootElement(); - if (!root.getName().equals(dataRoot.getName())) { - throw new XMLMergerException( - "Trying to merge incompatible xml format ('" - + root.getName() + "'!='" + dataRoot.getName() - + "')"); - } - mergeNode(root, dataRoot); - write(); + merge(dataDoc); } catch (DocumentException e) { throw new XMLMergerException(e.getMessage()); } @@ -131,20 +148,24 @@ @SuppressWarnings("unchecked") protected boolean areSame(Element a, Element b) { log.debug("areSame:" + a + " <=> " + b); - if (!a.getName().equals(b.getName())) + if (!a.getName().equals(b.getName())) { return false; + } log.debug("same attribute list size?"); - if (a.attributes().size() != b.attributes().size()) + if (a.attributes().size() != b.attributes().size()) { return false; + } log.debug("same attribute list?"); for (Iterator at = a.attributes().iterator(); at.hasNext();) { Attribute attra = at.next(); Attribute attrb = b.attribute(attra.getName()); - if (attrb == null || !attra.getValue().equals(attrb.getValue())) + if (attrb == null || !attra.getValue().equals(attrb.getValue())) { return false; + } } - if (!a.getTextTrim().equals(b.getTextTrim())) + if (!a.getTextTrim().equals(b.getTextTrim())) { return false; + } return true; } @@ -153,9 +174,8 @@ * @throws XMLMergerException */ protected void write() throws XMLMergerException { - log.debug("Writing " + merge.getAbsolutePath()); try { - FileOutputStream fos = new FileOutputStream(merge); + FileOutputStream fos = new FileOutputStream(outputFile); OutputFormat format = OutputFormat.createPrettyPrint(); XMLWriter writer = new XMLWriter(fos, format); writer.write(doc); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/HeliumListener.java --- a/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/HeliumListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/src/com/nokia/helium/diamonds/ant/HeliumListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -19,19 +19,21 @@ package com.nokia.helium.diamonds.ant; import java.io.File; -import java.util.Hashtable; +import java.util.ArrayList; import java.util.List; -import java.util.ArrayList; -import java.io.IOException; + +import org.apache.log4j.Logger; +import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.BuildListener; -import org.apache.tools.ant.BuildException; -import com.nokia.helium.diamonds.*; -import com.nokia.helium.core.PropertiesSource; -import com.nokia.helium.core.TemplateProcessor; +import org.apache.tools.ant.Project; -import org.apache.tools.ant.BuildEvent; -import org.apache.tools.ant.Project; -import org.apache.log4j.Logger; +import com.nokia.helium.diamonds.AllTargetDiamondsListener; +import com.nokia.helium.diamonds.DiamondsConfig; +import com.nokia.helium.diamonds.DiamondsException; +import com.nokia.helium.diamonds.DiamondsListener; +import com.nokia.helium.diamonds.DiamondsListenerImpl; +import com.nokia.helium.diamonds.StageDiamondsListener; +import com.nokia.helium.diamonds.TargetDiamondsListener; /** * Listener class that can connect to Ant and log information regarding to build @@ -57,7 +59,7 @@ private boolean isInitialized; - private boolean skipDiamonds; + private boolean skipDiamonds ; private boolean skipDiamondsSet; /** @@ -79,40 +81,53 @@ */ @SuppressWarnings("unchecked") public void targetStarted(BuildEvent event) { + Project prj = event.getProject(); String targetName = event.getTarget().getName(); - project = event.getProject(); - String skip = project.getProperty("skip.diamonds"); - if (skip != null && skip.equals("true")) { - skipDiamonds = true; + String diamondsEnabled = prj.getProperty("diamonds.enabled"); + String skip = prj.getProperty("skip.diamonds"); + log.debug("diamondsenabled: " + diamondsEnabled); + log.debug("skip: " + skip); + if (!isInitialized) { + if (diamondsEnabled != null && !Project.toBoolean(diamondsEnabled)) { + log.info("'diamonds.enabled' is not true, to use diamonds set 'diamonds.enabled' to 'true'."); + skipDiamonds = true; + isInitialized = true; + } else if (skip != null && Project.toBoolean(skip)) { + log.info("'skip.diamonds' is deprecated. Please consider using 'diamonds.enabled'."); + skipDiamonds = true; + isInitialized = true; + } } + try { if (!skipDiamonds) { if (!isInitialized) { - String configFile = project - .getProperty("diamonds.listener.configuration.file"); - parseConfig(configFile, project.getProperties()); - isInitialized = true; - } - DiamondsProperties diamondProperties = DiamondsConfig - .getDiamondsProperties(); - - /** - * Initialize Diamonds if and only if initializer-target-name has been called - */ - if (targetName.equals(DiamondsConfig.getInitialiserTargetName())) { - String categoryName = diamondProperties.getProperty("category-property"); - String category = project.getProperty(categoryName); - log.debug("category:" + category); - if (category != null && diamondsListeners.isEmpty()) { - addListeners(event); - log.info("Diamonds enabled"); + /** + * Initialize Diamonds if and only if initializer-target-name has been called + */ + String buildID = prj.getProperty(DiamondsConfig.getBuildIdProperty()); + log.debug("targetStarted:buildid:" + buildID); + String initializerTargetName = prj.getProperty(DiamondsConfig.getInitializerTargetProperty()); + log.debug("initializerTargetName:" + initializerTargetName); + log.debug("targetName:" + targetName); + if ( buildID != null || (initializerTargetName != null && targetName.equals(initializerTargetName))) { + isInitialized = true; + project = prj; + log.debug("trying to initialize diamonds config"); + DiamondsConfig.initialize(project); + DiamondsListenerImpl.initialize(project); + String category = DiamondsConfig.getCategory(); + log.debug("category:" + category); + if (category != null && diamondsListeners.isEmpty()) { + addListeners(event); + log.info("Diamonds enabled"); + } } } } else { if (!skipDiamondsSet && skipDiamonds) { - log.info("skip.diamonds set, to use diamonds don't set skip.diamonds."); skipDiamondsSet = true; } } @@ -143,33 +158,6 @@ } } - @SuppressWarnings("unchecked") - private void parseConfig(String configFile, Hashtable antProperties) { - TemplateProcessor templateProcessor = new TemplateProcessor(); - File outputFile = null; - try { - outputFile = File.createTempFile("diamonds", "-config.xml"); - outputFile.deleteOnExit(); - log - .debug("Preprocessing the diamonds configuration: " - + configFile); - List sourceList = new ArrayList(); - sourceList.add(new PropertiesSource("ant", antProperties)); - templateProcessor.convertTemplate(configFile, - outputFile.toString(), sourceList); - } catch (IOException e) { - throw new BuildException( - "Diamonds configuration pre-parsing error: " - + e.getMessage()); - } - try { - DiamondsConfig.parseConfiguration(outputFile.toString()); - } catch (DiamondsException e) { - throw new BuildException("Diamonds configuration parsing error: " - + e.getMessage()); - } - } - private void addListeners(BuildEvent event) throws DiamondsException { if (DiamondsConfig.isStagesInConfig()) { StageDiamondsListener stageListener = new StageDiamondsListener(); @@ -181,6 +169,10 @@ diamondsListeners.add(targetListener); targetListener.buildBegin(event); } + + AllTargetDiamondsListener allTargetListener = new AllTargetDiamondsListener(); + diamondsListeners.add(allTargetListener); + allTargetListener.buildBegin(event); } /** @@ -230,8 +222,9 @@ String loggingoutputfile = project.getProperty("logging.output.file"); if (loggingoutputfile != null) { File file = new File(loggingoutputfile); - if (file.exists()) + if (file.exists()) { file.delete(); + } } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/antunit/run-scenario.ant.xml --- a/buildframework/helium/sf/java/diamonds/tests/antunit/run-scenario.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/antunit/run-scenario.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -38,14 +38,14 @@ - + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/antunit/test_diamonds.ant.xml --- a/buildframework/helium/sf/java/diamonds/tests/antunit/test_diamonds.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/antunit/test_diamonds.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -28,25 +28,19 @@ - - - - + - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/config/diamonds_config.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/config/diamonds_config.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/config/diamonds_config_default.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/diamonds/tests/config/diamonds_config_default.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + ant: antProperties() + + + + + + + + ant: antProperties() + + + + + + + + ant: antProperties() + + + + + + + + ant: antProperties() + + + + + + + + ant: antProperties() + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/data/templates/build.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/data/templates/build.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/build.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -18,12 +18,12 @@ Description: ============================================================================ ---> - - ${ant["build.family"]} - ${ant["id"]} - <#if ant?keys?seq_contains("diamonds.start.time")>${ant["diamonds.start.time"]} - <#if ant?keys?seq_contains("diamonds.end.time")>${ant["diamonds.end.time"]} +--> + + ${ant["build.family"]} + ${ant["id"]} + <#if ant?keys?seq_contains("build.start.time")>${ant["build.start.time"]} + <#if ant?keys?seq_contains("build.end.time")> ${ant["env.USERNAME"]} ${ant["env.COMPUTERNAME"]} ${ant["name"]} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_finish.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_finish.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_finish.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -21,6 +21,6 @@ --> <#include "header.ftl"> - <#if ant?keys?seq_contains("diamonds.end.time")>${ant["diamonds.end.time"]} + <#if ant?keys?seq_contains("build.end.time")>${ant["build.end.time"]} <#include "footer.ftl"> \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_signal.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_signal.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_signal.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -22,18 +22,18 @@ <#include "header.ftl"> <#assign diamondsignalname = ""/> - <#assign diamondkeys = diamondSignal?keys> + <#assign diamondkeys = ant?keys> <#list diamondkeys as diamondkey> <#if diamondkey?contains("diamond.signal.name")> - <#list diamondSignal[diamondkey]?split(".") as signalname> - <#assign diamondsignalname = signalname/> + <#list diamondkey?split(".") as index> + <#assign signalIndex = index/> <#list diamondkeys as diamondkey> - <#if diamondkey?contains("${diamondsignalname}")> - <#if diamondkey?contains("diamond.signal.name.${diamondsignalname}")>${diamondSignal[diamondkey]} - <#if diamondkey?contains("diamond.error.message.${diamondsignalname}")>${diamondSignal[diamondkey]} - <#if diamondkey?contains("diamond.time.stamp.${diamondsignalname}")>${diamondSignal[diamondkey]} + <#if diamondkey?contains("${signalIndex}")> + <#if ant?contains("diamond.signal.name.${signalIndex}")>${ant["diamond.signal.name.${signalIndex}"]} + <#if ant?contains("diamond.error.message.${signalIndex}")>${ant["diamond.error.message.${signalIndex}"]} + <#if ant?contains("diamond.time.stamp.${signalIndex}")>${ant["diamond.time.stamp.${signalIndex}"]} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_status.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_status.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/diamonds_status.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -21,6 +21,6 @@ --> <#include "header.ftl"> - <#if diamonds?keys?seq_contains("build.status")>${diamonds["build.status"]} + <#if ant?keys?seq_contains("build.status")>${ant["build.status"]} <#include "footer.ftl"> \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/data/templates/invalid-ant-properties-input-file.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/diamonds/tests/data/templates/invalid-ant-properties-input-file.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,26 @@ +<#-- +============================================================================ +Name : start.xml.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#include "header.ftl"> +<#include "build.xml.ftl"> +<#include "locations.ftl"> + ${ant["invalid-property"]} +<#include "footer.ftl"> diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml --- a/buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/build/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,24 +23,26 @@ Helium Antlib diamonds unittests. - + + + - + - - + + @@ -69,29 +71,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -109,31 +88,8 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -141,6 +97,9 @@ + + + @@ -148,6 +107,13 @@ + + + + + @@ -158,6 +124,9 @@ + + + @@ -180,49 +149,65 @@ - - - - - + + - + - - + - - - - + + + + + + + + + + + + + + + + + + + + + + + sequence-config-test-target-1,sequence-config-test-target-2, test-verify-stages, test-verify-targets" /> \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-address/build.xml --- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-address/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-address/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,12 +23,12 @@ Helium Antlib diamonds unittests. - + + - @@ -36,12 +36,12 @@ - + @@ -82,9 +82,6 @@ - - - @@ -98,18 +95,6 @@ - - - - - - - - - - - - @@ -123,22 +108,10 @@ - - - - - - - - - - - - @@ -146,9 +119,9 @@ ${diamonds.build.id} - + - + @@ -157,8 +130,18 @@ - + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/build.xml --- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,31 +23,194 @@ Helium Antlib diamonds unittests. - + + - - - - - - + - - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${diamonds.build.id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/diamonds_config.xml.ftl --- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates-1/diamonds_config.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates/build.xml --- a/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/scenarii/invalid-templates/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,22 +23,23 @@ Helium Antlib diamonds unittests. - + + + - - + @@ -67,76 +68,28 @@ - - - - - - - - + + + + + + ant: antProperties() + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -154,8 +107,27 @@ - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/diamonds/tests/src/com/nokia/helium/diamonds/tests/TestXMLMerger.java --- a/buildframework/helium/sf/java/diamonds/tests/src/com/nokia/helium/diamonds/tests/TestXMLMerger.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/diamonds/tests/src/com/nokia/helium/diamonds/tests/TestXMLMerger.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,20 +17,27 @@ package com.nokia.helium.diamonds.tests; -import java.io.File; +import static org.junit.Assert.assertTrue; + + +import java.io.BufferedReader; import java.io.BufferedWriter; -import java.io.FileWriter; +import java.io.File; import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; import java.io.Reader; -import java.io.BufferedReader; -import java.io.IOException; +import java.io.FileInputStream; +import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.DifferenceListener; +import org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + import com.nokia.helium.diamonds.XMLMerger; import com.nokia.helium.diamonds.XMLMerger.XMLMergerException; -import org.junit.*; -import static org.junit.Assert.*; -import org.custommonkey.xmlunit.*; - public class TestXMLMerger { @Before @@ -58,18 +65,20 @@ */ @Test public void test_simpleMergeNode() throws Exception { + File tempFile = File.createTempFile("merge-out", ".xml"); File merge = createTextFile("\n"); File toBeMerged = createTextFile("\n\n" + "\n" + "\n"+ "text\n"+ ""); - XMLMerger merger = new XMLMerger(merge); + XMLMerger merger = new XMLMerger(new FileInputStream(merge), tempFile); merger.merge(toBeMerged); DifferenceListener differenceListener = new IgnoreTextAndAttributeValuesDifferenceListener(); - Diff diff = new Diff(new ReaderNoSpaces(new FileReader(merge)), new ReaderNoSpaces(new FileReader(toBeMerged))); + Diff diff = new Diff(new ReaderNoSpaces(new FileReader(tempFile)), new ReaderNoSpaces(new FileReader(toBeMerged))); diff.overrideDifferenceListener(differenceListener); assertTrue("Test that 2 simple XML merge correctly " + diff, diff.similar()); + tempFile.delete(); } /** @@ -79,7 +88,8 @@ */ @Test public void test_mergeSameNode() throws Exception { - File merge = createTextFile("\n\n" + + File tempFile = File.createTempFile("merge-out", ".xml"); + File merge = createTextFile("\n\n" + "
\n" + "1\n" + "
\n" + @@ -89,12 +99,13 @@ "1\n" + "\n" + "
"); - XMLMerger merger = new XMLMerger(merge); + XMLMerger merger = new XMLMerger(new FileInputStream(merge), tempFile); merger.merge(toBeMerged); DifferenceListener differenceListener = new IgnoreTextAndAttributeValuesDifferenceListener(); - Diff diff = new Diff(new ReaderNoSpaces(new FileReader(merge)), new ReaderNoSpaces(new FileReader(toBeMerged))); + Diff diff = new Diff(new ReaderNoSpaces(new FileReader(tempFile)), new ReaderNoSpaces(new FileReader(toBeMerged))); diff.overrideDifferenceListener(differenceListener); assertTrue("Test that identity " + diff, diff.similar()); + tempFile.delete(); } /** @@ -103,6 +114,7 @@ */ @Test public void test_mergeWithSubNodeAndAttribute() throws Exception { + File tempFile = File.createTempFile("merge-out", ".xml"); File merge = createTextFile("\n"); File toBeMerged1 = createTextFile("\n\n" + "
\n" + @@ -132,14 +144,15 @@ "1\n" + "
\n" + "
"); - XMLMerger merger = new XMLMerger(merge); + XMLMerger merger = new XMLMerger(new FileInputStream(merge), tempFile); merger.merge(toBeMerged1); merger.merge(toBeMerged2); merger.merge(toBeMerged3); merger.merge(toBeMerged4); - Diff diff = new Diff(new ReaderNoSpaces(new FileReader(merge)), new ReaderNoSpaces(new FileReader(expected))); + Diff diff = new Diff(new ReaderNoSpaces(new FileReader(tempFile)), new ReaderNoSpaces(new FileReader(expected))); //System.out.println(readTextFile(merge.getAbsolutePath())); assertTrue("test XML matches control skeleton XML " + diff, diff.similar()); + tempFile.delete(); } /** @@ -147,29 +160,35 @@ */ @Test(expected=XMLMergerException.class) public void test_mergeWithNoRootNode() throws Exception{ - File merge = createTextFile("\n"); - XMLMerger merger = new XMLMerger(merge); - } + File tempFile = File.createTempFile("merge-out", ".xml"); + File merge = createTextFile("\n"); + XMLMerger merger = new XMLMerger(new FileInputStream(merge), tempFile); + tempFile.delete(); +} /** * Test the XMLMerger with xml files with different root nodes to merge. */ @Test(expected=XMLMergerException.class) public void test_mergeWithDifferentRootNodes() throws Exception{ - File merge = createTextFile("\n"); - File toBeMerged = createTextFile("\n\n"); - XMLMerger merger = new XMLMerger(merge); - merger.merge(toBeMerged); - } + File tempFile = File.createTempFile("merge-out", ".xml"); + File merge = createTextFile("\n"); + File toBeMerged = createTextFile("\n\n"); + XMLMerger merger = new XMLMerger(new FileInputStream(merge), tempFile); + merger.merge(toBeMerged); + tempFile.delete(); + } /** * Test the XMLMerger with xml files with Wrong xml format */ @Test(expected=XMLMergerException.class) public void test_mergeWithWrongXML() throws Exception{ - File merge = createTextFile("\n"); - File toBeMerged = createTextFile("\n\n"); - XMLMerger merger = new XMLMerger(merge); - merger.merge(toBeMerged); - } + File tempFile = File.createTempFile("merge-out", ".xml"); + File merge = createTextFile("\n"); + File toBeMerged = createTextFile("\n\n"); + XMLMerger merger = new XMLMerger(new FileInputStream(merge), tempFile); + merger.merge(toBeMerged); + tempFile.delete(); + } /** * Load file content into a string. @@ -188,9 +207,8 @@ } reader.close(); - return sb.toString(); - } + } public class ReaderNoSpaces extends BufferedReader { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ + + + + Helium Antlib build file. + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/ivy.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,40 @@ + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/Environment.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/Environment.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,330 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileFilter; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.tools.ant.Project; + +import com.nokia.helium.environment.ant.types.ExecutableInfo; + +/** + * Represents the environment of the computer in terms of executables, etc. Typically scans for + * executables that have been run during the build. + */ +public class Environment { + private static final String[] WINDOWS_EXE_EXTENSIONS = { ".exe", ".bat", ".cmd" }; + private static final String STDERR_OUTPUT = "stderr"; + private static final String[] DEFAULT_EXECUTABLES = { "java", "ant" }; + + private Project project; + /** List of known executables. */ + private List executables = new ArrayList(); + /** List of meta information about executables. */ + private Map defs = new HashMap(); + + public Environment(Project project) { + this.project = project; + } + + public void setExecutableDefs(List executableDefs) { + for (Iterator iterator = executableDefs.iterator(); iterator.hasNext();) { + ExecutableInfo execDef = (ExecutableInfo) iterator.next(); + defs.put(execDef.getName(), execDef); + } + } + + public List getExecutables() { + return executables; + } + + public void scan(List execCalls) throws IOException { + addDefaultExecutables(); + parseExecLog(execCalls); + addExecsWithInfo(); + populateExecutables(executables); + } + + /** + * Adds default executables to the list that must have been run because Ant is running. + */ + private void addDefaultExecutables() { + + for (int i = 0; i < DEFAULT_EXECUTABLES.length; i++) { + Executable exe = new Executable(DEFAULT_EXECUTABLES[i]); + exe.setExecuted(true); + executables.add(exe); + } + } + + /** + * Parses a log of calls to executables in CSV format. + * + * @param execLog + * @throws IOException + */ + private void parseExecLog(List execCalls) throws IOException { + for (Iterator iterator = execCalls.iterator(); iterator.hasNext();) { + String execCall = (String) iterator.next(); + + File execFile = new File(execCall); + String name = execFile.getName(); + String path = null; + // See if the full path is available in the exec call + if (execFile.getParentFile() != null) { + path = execFile.getCanonicalPath(); + } + Executable runExec = new Executable(name); + runExec.setPath(path); + runExec.setExecuted(true); + if (!executables.contains(runExec)) { + executables.add(runExec); + } + } + } + + /** + * Adds executables to the list based on the meta-information given in the configuration. + */ + private void addExecsWithInfo() { + for (Iterator iterator = defs.keySet().iterator(); iterator.hasNext();) { + String execName = (String) iterator.next(); + Executable exec = new Executable(execName); + if (!executables.contains(exec)) { + executables.add(exec); + } + } + } + + private void populateExecutables(List executables) throws IOException { + for (Iterator iterator = executables.iterator(); iterator.hasNext();) { + Executable exec = (Executable) iterator.next(); + project.log("Checking executable: " + exec.toString(), Project.MSG_INFO); + File executableFile = findExecutableFile(exec); + + if (executableFile != null) { + if (!findVersion(exec)) { + calculateAdditionalVersioningInfo(exec); + } + } + else { + project.log("Cannot find path for executable: " + exec.toString(), Project.MSG_DEBUG); + } + } + } + + /** + * Finds an executable file based on the executable definition. + * + * @param exec An executable definition. + * @return The executable file. + * @throws IOException + */ + private File findExecutableFile(final Executable exec) throws IOException { + File executableFile = null; + + // See if the executable has a full path + String path = exec.getPath(); + if (path != null) { + File file = new File(path); + executableFile = file; + exec.setPath(executableFile.getCanonicalPath()); + } + // Or search the PATH + else { + String[] pathDirs = getPaths(); + // Filter object to match executable filenames + FileFilter filter = new FileFilter() { + public boolean accept(File file) { + if (isFileExecutable(file)) { + // Find the first file in the directory that has the same start of the name + String exeNameNoExt = exec.getNameNoExt(); + + String name = file.getName(); + if (name.contains(".")) { + name = name.substring(0, name.indexOf(".")); + } + + if (name.equals(exeNameNoExt) || name.startsWith(exeNameNoExt + ".")) { + return true; + } + } + return false; + } + }; + for (int i = 0; i < pathDirs.length; i++) { + File pathDir = new File(pathDirs[i]); + File[] executableFiles = pathDir.listFiles(filter); + if (executableFiles != null && executableFiles.length > 0) { + executableFile = executableFiles[0]; + exec.setPath(executableFile.getCanonicalPath()); + } + } + } + return executableFile; + } + + private boolean isFileExecutable(File file) { + if (file.canExecute()) { + String os = System.getProperty("os.name").toLowerCase(); + if (os.contains("windows") || os.contains("win32")) { + for (int i = 0; i < WINDOWS_EXE_EXTENSIONS.length; i++) { + if (file.getName().endsWith(WINDOWS_EXE_EXTENSIONS[i])) { + return true; + } + } + } + else { + return true; + } + } + return false; + } + + private String[] getPaths() { + String pathEnvVar = System.getenv("Path"); + String[] pathDirs = null; + if (pathEnvVar == null) { + pathEnvVar = System.getenv("PATH"); + } + if (pathEnvVar != null) { + pathDirs = pathEnvVar.split(File.pathSeparator); + } + else { + pathDirs = new String[0]; + } + return pathDirs; + } + + private boolean findVersion(Executable exec) throws IOException { + // Get the executable additional data for this execution + ExecutableInfo def = defs.get(exec.getNameNoExt()); + if (def != null && def.getVersionArgs() != null) { + String path = exec.getPath(); + if (path == null) { + path = ""; + } + String[] versionArgs = def.getVersionArgs().split(" "); + String[] commands = new String[versionArgs.length + 1]; + commands[0] = path; + for (int i = 0; i < versionArgs.length; i++) { + commands[i + 1] = versionArgs[i].trim(); + } + Process commandProcess = Runtime.getRuntime().exec(commands); + + String output = def.getOutput(); + StringBuilder text = new StringBuilder(); + int dataRead = 0; + char[] chars = new char[1000]; + if (output == null || !output.equals(STDERR_OUTPUT)) { + InputStream in = commandProcess.getInputStream(); + InputStreamReader textIn = new InputStreamReader(in); + while (dataRead != -1) { + dataRead = textIn.read(chars, 0, chars.length); + if (dataRead != -1) { + text.append(chars, 0, dataRead); + } + } + } + InputStream err = commandProcess.getErrorStream(); + InputStreamReader textErr = new InputStreamReader(err); + dataRead = 0; + while (dataRead != -1) { + dataRead = textErr.read(chars, 0, chars.length); + if (dataRead != -1) { + text.append(chars, 0, dataRead); + } + } + String versionText = text.toString(); + if (def.getVersionRegex() != null) { + Pattern versionPattern = Pattern.compile(def.getVersionRegex()); + Matcher versionMatch = versionPattern.matcher(versionText); + if (versionMatch.find()) { + String version = versionMatch.group(1); + exec.setVersion(version); + return true; + } + } + } + return false; + } + + /** + * Calculate extra versioning info for the executable file. Used if cannot find a version value. + * + * @param exec The executable. + * @throws IOException If file cannot be read. + */ + private void calculateAdditionalVersioningInfo(Executable exec) throws IOException { + calculateHash(exec); + File file = new File(exec.getPath()); + exec.setLastModified(file.lastModified()); + exec.setLength(file.length()); + } + + /** + * Calculate a hash value for the executable file. + * + * @param exec The executable. + * @throws IOException If file cannot be read. + */ + private void calculateHash(Executable exec) throws IOException { + FileInputStream in = new FileInputStream(exec.getPath()); + byte[] bytes = new byte[1000]; + ByteArrayOutputStream fileBytes = new ByteArrayOutputStream(); + int bytesRead = 0; + bytesRead = in.read(bytes); + while (bytesRead != -1) { + fileBytes.write(bytes, 0, bytesRead); + bytesRead = in.read(bytes); + } + MessageDigest digest; + String hash = ""; + try { + digest = MessageDigest.getInstance("MD5"); + digest.update(fileBytes.toByteArray()); + byte[] hashBytes = digest.digest(); + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < hashBytes.length; i++) { + builder.append(Byte.toString(hashBytes[i])); + } + hash = new String(builder.toString()); + exec.setHash(hash); + + } + catch (NoSuchAlgorithmException e) { + // Not expected to occur + e.printStackTrace(); + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/EnvironmentXMLWriter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/EnvironmentXMLWriter.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.Iterator; +import java.util.List; + +import org.dom4j.Document; +import org.dom4j.DocumentFactory; +import org.dom4j.Element; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.XMLWriter; + + +/** + * Writes the definition of an environment to an output stream. + */ +public class EnvironmentXMLWriter { + private OutputStream out; + private Document doc; + + public EnvironmentXMLWriter(OutputStream out) { + this.out = out; + } + + /** + * Writes an environment definition in XML to output. + * @param environment Enviroment definition. + * @throws IOException If I/O error occurs. + */ + public void write(Environment environment) throws IOException { + doc = DocumentFactory.getInstance().createDocument(); + doc.addElement("environment"); + List executables = environment.getExecutables(); + for (Iterator iterator = executables.iterator(); iterator.hasNext();) { + Executable executable = (Executable) iterator.next(); + write(executable); + } + XMLWriter writer = new XMLWriter(out, OutputFormat.createPrettyPrint()); + writer.write(doc); + writer.close(); + } + + private void write(Executable executable) { + Element toolsNode = doc.getRootElement(); + Element toolNode = toolsNode.addElement("tool"); + toolNode.addElement("name").setText(executable.getName()); + toolNode.addElement("version").setText(getItem(executable.getVersion())); + toolNode.addElement("path").setText(getItem(executable.getPath())); + if (executable.getHash() != null) { + toolNode.addElement("hash").setText(getItem(executable.getHash())); + toolNode.addElement("length").setText(Long.toString(executable.getLength())); + toolNode.addElement("lastModified").setText(Long.toString(executable.getLastModified())); + } + toolNode.addElement("executed").setText(Boolean.toString(executable.isExecuted())); + } + + private String getItem(String content) + { + if (content == null) { + return ""; + } + return content; + } +} + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/Executable.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/Executable.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment; + +import java.io.File; + +/** + * An executable on the file system. + */ +public class Executable { + + private String name; + private String version = "unknown"; + private String path; + private String hash; + private long lastModified; + private long length; + private boolean executed; + + public Executable(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNameNoExt() { + String nameNoExt = name; + if (nameNoExt.contains(".")) { + nameNoExt = nameNoExt.substring(0, nameNoExt.indexOf(".")); + } + return nameNoExt; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getHash() { + return hash; + } + + public void setHash(String hash) { + this.hash = hash; + } + + public long getLastModified() { + return lastModified; + } + + public void setLastModified(long lastModified) { + this.lastModified = lastModified; + } + + public long getLength() { + return length; + } + + public void setLength(long length) { + this.length = length; + } + + public boolean isExecuted() { + return executed; + } + + public void setExecuted(boolean executed) { + this.executed = executed; + } + + public boolean equals(Object object) { + if (object != null && object instanceof Executable) { + Executable executable = (Executable) object; + if (executable.getPath() != null && path != null) { + return executable.getPath().toLowerCase().equals(path.toLowerCase()); + } + return executable.getName().equals(name); + } + return false; + } + + public int hashCode() { + return name.hashCode(); + } + + public String toString() { + if (path != null) { + return path + File.separator + name; + } + return name; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/antlib.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/listener/ExecListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/listener/ExecListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment.ant.listener; + +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; + +import org.apache.log4j.Logger; +import org.apache.tools.ant.BuildEvent; +import org.apache.tools.ant.BuildListener; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.RuntimeConfigurable; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.UnknownElement; + +/** + * Checks for uses of the task and logs them to a CSV file. + * + * The ExecListener.file property should be used to define a file to log the output to. + */ +public class ExecListener implements BuildListener { + private static List execCalls = new ArrayList(); + + private Logger logger = Logger.getLogger(this.getClass()); + + public static List getExecCalls() { + return execCalls; + } + + @Override + public void buildStarted(BuildEvent event) { + logger.debug("ExecListener started"); + } + + @Override + public void buildFinished(BuildEvent event) { + try { + String file = event.getProject().getProperty("ExecListener.file"); + if (file != null && file.length() > 0) { + FileWriter out = new FileWriter(file); + for (Iterator iterator = execCalls.iterator(); iterator.hasNext();) { + String execCall = (String) iterator.next(); + out.write(execCall + "\n"); + } + out.close(); + } + } + catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void messageLogged(BuildEvent event) { + } + + @Override + public void targetStarted(BuildEvent event) { + } + + @Override + public void targetFinished(BuildEvent event) { + } + + @Override + public void taskStarted(BuildEvent event) { + } + + /** + * Attempt to log the name of the an exec task if one is executed. + */ + @SuppressWarnings("unchecked") + @Override + public void taskFinished(BuildEvent event) { + Task task = event.getTask(); + String taskName = task.getTaskName(); + if (taskName != null && taskName.equals("exec")) { + logger.debug("Found exec task"); + if (task instanceof UnknownElement) { + RuntimeConfigurable configurable = ((UnknownElement) task).getRuntimeConfigurableWrapper(); + Hashtable map = configurable.getAttributeMap(); + String executable = (String) map.get("executable"); + Project project = event.getProject(); + executable = project.replaceProperties(executable); + logger.debug("ExecListener: executable is run: " + executable); + execCalls.add(executable); + } + } + } +} + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/taskdefs/EnvironmentTask.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/taskdefs/EnvironmentTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment.ant.taskdefs; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; + +import com.nokia.helium.environment.Environment; +import com.nokia.helium.environment.EnvironmentXMLWriter; +import com.nokia.helium.environment.ant.listener.ExecListener; +import com.nokia.helium.environment.ant.types.EnvData; +import com.nokia.helium.environment.ant.types.ExecutableInfo; + +/** + * Checks the environment and logs executable information. Can validate tools versions if needed. + * + * @ant.task name="environment" category="Environment" + */ +public class EnvironmentTask extends Task { + private File outputFile; + private List envDataList = new ArrayList(); + + public EnvironmentTask() { + setTaskName("environment"); + } + + /** + * Set the output file path. + * + * @param outputFile + */ + public void setOutput(File outputFile) { + this.outputFile = outputFile; + } + + /** + * Add envdata types. + * + * @ant.required + */ + public void add(EnvData envData) { + envDataList.add(envData); + } + + @Override + public void execute() { + Project project = getProject(); + project.log("Scanning environment...", Project.MSG_DEBUG); + OutputStream out = System.out; + try { + if (outputFile != null) { + out = new FileOutputStream(outputFile); + } + List executableDefs = new ArrayList(); + for (Iterator iterator = envDataList.iterator(); iterator.hasNext();) { + EnvData envData = (EnvData) iterator.next(); + envData.getExecutableDefs(executableDefs); + } + + Environment environment = new Environment(project); + environment.setExecutableDefs(executableDefs); + environment.scan(ExecListener.getExecCalls()); + EnvironmentXMLWriter writer = new EnvironmentXMLWriter(out); + writer.write(environment); + } + + catch (FileNotFoundException e) { + e.printStackTrace(); + throw new BuildException("Could not find output file."); + } + catch (IOException e) { + e.printStackTrace(); + throw new BuildException("Error reading version."); + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/types/EnvData.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/types/EnvData.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment.ant.types; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.apache.tools.ant.types.DataType; +import org.apache.tools.ant.types.DirSet; + +/** + * Environmental data configuration for the task. + * + * @ant.task name="envdata" category="Environment" + */ +public class EnvData extends DataType { + + private List executables = new ArrayList(); + private List dirsets = new ArrayList(); + + public void add(ExecutableInfo executable) { + if (isReference()) { + throw noChildrenAllowed(); + } + executables.add(executable); + } + + public void add(DirSet dirset) { + if (isReference()) { + throw noChildrenAllowed(); + } + dirsets.add(dirset); + } + + public void getExecutableDefs(List executableDefs) throws IOException { + if (isReference()) { + EnvData envDataSource = (EnvData) getCheckedRef(); + envDataSource.getExecutableDefs(executableDefs); + } + else { + for (Iterator iterator = this.executables.iterator(); iterator.hasNext();) { + ExecutableInfo executableDef = (ExecutableInfo) iterator.next(); + if (!executableDefs.contains(executableDef)) { + executableDefs.add(executableDef); + } + + } + } + } + + @SuppressWarnings("unchecked") + public void getDirectories(List directories) throws IOException { + if (isReference()) { + EnvData envDataSource = (EnvData) getCheckedRef(); + envDataSource.getDirectories(directories); + } + else { + for (Iterator iterator = this.dirsets.iterator(); iterator.hasNext();) { + DirSet dirset = (DirSet) iterator.next(); + Iterator dirsetIterator = dirset.iterator(); + while (dirsetIterator.hasNext()) { + File file = (File) dirsetIterator.next(); + directories.add(file); + } + } + } + } +} + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/types/ExecutableInfo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/src/com/nokia/helium/environment/ant/types/ExecutableInfo.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.environment.ant.types; + +import org.apache.tools.ant.types.DataType; + +/** + * Provides information about an executable. + * + * @ant.task name="executableinfo" category="Environment" + */ +public class ExecutableInfo extends DataType { + private String name; + private String dir; + private String versionArgs; + private String versionRegex; + private String output; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDir() { + return dir; + } + + public void setDir(String dir) { + this.dir = dir; + } + + public String getVersionArgs() { + return versionArgs; + } + + public void setVersionArgs(String versionArgs) { + this.versionArgs = versionArgs; + } + + public String getVersionRegex() { + return versionRegex; + } + + public void setVersionRegex(String versionRegex) { + this.versionRegex = versionRegex; + } + + public String getOutput() { + return output; + } + + public void setOutput(String output) { + this.output = output; + } + + public boolean equals(Object obj) { + if (obj == null || !(obj instanceof ExecutableInfo)) { + return false; + } + ExecutableInfo def = (ExecutableInfo) obj; + if (this.name.equals(def.getName())) { + if ((this.dir == null && def.getDir() == null) + || (this.dir != null && def.getDir() != null && this.dir.toLowerCase().equals(def.getDir().toLowerCase()))) { + return true; + } + } + return false; + } + + public int hashCode() { + return name.hashCode(); + } + + public String toString() { + return name + " " + versionArgs; + } +} + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/tests/antunit/listener/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/tests/antunit/listener/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/tests/antunit/test_environment.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/tests/antunit/test_environment.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,51 @@ + + + + Helium Antlib environment unittests. + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/tests/antunit/test_listener.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/tests/antunit/test_listener.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,86 @@ + + + + Helium Antlib logger unittests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/tests/bld.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/tests/bld.sh Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,23 @@ +#!/bin/bash + +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +if [ -f ~/.bashrc ] ; then + . ~/.bashrc +fi + +ant -Dant.executor.class="com.nokia.helium.core.ant.HeliumExecutor" $* diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/tests/build.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/tests/build.bat Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ +@echo off + +rem +rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +rem All rights reserved. +rem This component and the accompanying materials are made available +rem under the terms of the License "Eclipse Public License v1.0" +rem which accompanies this distribution, and is available +rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +rem +rem Initial Contributors: +rem Nokia Corporation - initial contribution. +rem +rem Contributors: +rem +rem Description: +rem + +setlocal +if not defined JAVA_6_HOME ( +set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 +) ELSE set TESTED_JAVA=%JAVA_6_HOME% +if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%) +call ant -d -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor %* +if "%ERRORLEVEL%" neq "0" (goto error) +endlocal +goto :eof + +:error +endlocal +if "%OS%"=="Windows_NT" color 00 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/environment/tests/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/environment/tests/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,33 @@ + + + + Helium Antlib environment tests. + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/imaker.rst --- a/buildframework/helium/sf/java/imaker/imaker.rst Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/imaker.rst Mon Sep 13 13:11:19 2010 +0800 @@ -5,7 +5,8 @@ Configuring ROM creation ======================== -Called by ``build-roms`` target. +Called by :hlm-t:`build-roms` target. + .. index:: single: imakerconfigurationset type @@ -17,21 +18,21 @@ The imakerconfigurationset supports imakerconfiguration nested elements. -'''imakerconfiguration''' element: +**imakerconfiguration** element: -.. csv-table:: Ant properties to modify +.. csv-table:: Attributes to modify :header: "Attribute", "Description", "Values" - "``regionalVariation``", "Enable regional variation switching. - Deprecated (always false)", "false" + ":hlm-p:`regionalVariation`", "Enable regional variation switching. - Deprecated (always false)", "false" The imakerconfiguration supports three sub-types: -.. csv-table:: Ant properties to modify +.. csv-table:: Attributes to modify :header: "Sub-type", "Description" - "``makefileset``", "Defines the list of iMaker configuration to run image creation on." - "``targetset``", "List of regular expression used to match which target need to be executed." - "``variableset``", "List of variable to set when executing iMaker." + ":hlm-p:`makefileset`", "Defines the list of iMaker configuration to run image creation on." + ":hlm-p:`targetset`", "List of regular expression used to match which target need to be executed." + ":hlm-p:`variableset`", "List of variable to set when executing iMaker." Example of configuration: @@ -94,7 +95,7 @@ How to configure the target --------------------------- -The target can be configured by defining an hlm:imakerconfigurationset element with the '''imaker.rom.config''' reference. +The target can be configured by defining an hlm:imakerconfigurationset element with the **imaker.rom.config** reference. .. code-block:: xml @@ -102,10 +103,66 @@ ... -The other configurable element is the engine. The '''imaker.engine''' property defines the reference +The other configurable element is the engine. The :hlm-p:`imaker.engine` property defines the reference to the engine configuration to use for building the roms. Helium defines two engines by default: -* imaker.engine.default: multithreaded engine (hlm:defaultEngine type) -* imaker.engine.ec: ECA engine - cluster base execution (hlm:emakeEngine type) + + - imaker.engine.default: multithreaded engine (hlm:defaultEngine type) + - imaker.engine.ec: ECA engine - cluster base execution (hlm:emakeEngine type) -If the property is not defined Helium will guess the best engine to used based on the build.system property. - \ No newline at end of file +If the property is not defined Helium will guess the best engine to used based on the :hlm-p:`build.system` property. + + + +The imakerconfiguration +----------------------- + +The imakerconfiguration enables the build manager to configure his iMaker builds based on introspection. +The makefileset element will configure the filtering of the "imaker help-config" command. +Then for each of the configuration found the targetset elements will be used to filter the output from +the "imaker -f configuration.mk help-target-*-list" command. Finally a set of command will be generated. + +Each command will then be configure using the set of variables defined by the variableset elements. +Only the WORKDIR variable is under the task control to ensure call safety during the parallelization. +The usage of the variablegroup will allow you to duplicate the common set of commands and apply +additional variables. Example: + + + .. code-block:: xml + + + + + + + + + + + + + + + + + + + + + + + + + + +This configuration might produce the following calls : + + .. code-block:: xml + + imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=rnd USE_FOTI=0 USE_FOTA=1 core + imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 core + imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=rnd USE_FOTI=0 USE_FOTA=1 langpack_01 + imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 langpack_01 + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/IMaker.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/IMaker.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/IMaker.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,38 +1,34 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.imaker; import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.log4j.Logger; import com.nokia.helium.core.plexus.CommandBase; import com.nokia.helium.core.plexus.StreamRecorder; -import org.apache.log4j.Logger; - /** - * This class implements a wrapper around iMaker. - * It helps to introspect: - *
  • variables - *
  • targets - *
  • configurations - * + * This class implements a wrapper around iMaker. It helps to introspect:
  • variables
  • targets + *
  • configurations + * */ public class IMaker extends CommandBase { private static final String TEMP_ROMBUILD_DIR = "epoc32/rombuild/temp"; @@ -41,15 +37,17 @@ /** * Create an iMaker wrapper class with a specific epocroot. + * * @param epocroot */ public IMaker(File epocroot) { this.epocroot = epocroot; - + } - + /** * Creates a temp working dir for the rom image creation. + * * @return * @throws IOException */ @@ -61,13 +59,15 @@ tempDir.delete(); tempDir.mkdirs(); return tempDir; - } catch (IOException e) { + } + catch (IOException e) { throw new IMakerException(e.getMessage(), e); } } - + /** * Epocroot location. + * * @return the epocroot location */ public File getEpocroot() { @@ -76,6 +76,7 @@ /** * Get the iMaker version. + * * @return the current iMaker version. * @throws IMakerException is thrown in case of an iMaker execution error. */ @@ -90,6 +91,7 @@ /** * Get the value of a particular variable from iMaker configuration. + * * @param name the variable name * @return the value or null if the variable does not exist. * @throws IMakerException @@ -106,6 +108,7 @@ /** * Get the value of a particular variable from iMaker configuration for a particular * configuration. + * * @param name the variable name * @return the value or null if the variable does not exist. * @throws IMakerException @@ -123,6 +126,7 @@ /** * Get the list of available iMaker configurations. + * * @return a list of configurations * @throws IMakerException */ @@ -134,9 +138,10 @@ execute(args, consumer); return consumer.getConfigurations(); } - + /** - * Get the a list of target supported by a specific configuration. + * Get the a list of target supported by a specific configuration. + * * @param configuration the configuration to use * @return the list of targets. * @throws IMakerException @@ -154,6 +159,7 @@ /** * Get the target list for the configuration. + * * @param configuration a File object representing the configuration location. * @return a list of targets. * @throws IMakerException @@ -161,7 +167,7 @@ public List getTargets(File configuration) throws IMakerException { return getTargets(configuration.getAbsolutePath()); } - + /** * {@inheritDoc} */ @@ -182,9 +188,8 @@ * {@inheritDoc} */ @Override - protected void throwException(String message, Throwable t) - throws IMakerException { - throw new IMakerException(message, t); + protected void throwException(String message, Throwable t) throws IMakerException { + throw new IMakerException(message, t); } - + } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/PrintVarSteamConsumer.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/PrintVarSteamConsumer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/PrintVarSteamConsumer.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,6 +18,7 @@ import org.codehaus.plexus.util.cli.StreamConsumer; + /** * Parsing iMaker printvar calls. * Output from iMaker should match: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/EmakeEngine.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/EmakeEngine.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/EmakeEngine.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,25 +1,25 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.imaker.ant.engines; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.io.FileNotFoundException; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.net.MalformedURLException; @@ -47,14 +47,16 @@ import freemarker.template.TemplateException; /** - * + * * Simplest possible definition of the type, e.g: + * *
      * <emakeEngine id="imaker.ec" />
      * 
    * * Emake engine with some custom configuration. - *
     
    + * 
    + * 
      * <emakeEngine id="imaker.ec" >
      *     <arg value="--emake-annofile=imaker.anno.xml" />
      * </emakeEngine>
    @@ -65,17 +67,18 @@
     public class EmakeEngine extends DataType implements Engine {
         private Logger log = Logger.getLogger(getClass());
         private IMakerTask task;
    -    private List customArgs = new ArrayList(); 
    +    private List customArgs = new ArrayList();
         private File template;
    -    
    +
         /**
    -     * Holder for emake custom args. 
    +     * Holder for emake custom args.
          */
         public class Arg {
             private String value;
     
             /**
              * Get the value of the argument.
    +         * 
              * @return the argument
              */
             public String getValue() {
    @@ -83,8 +86,8 @@
             }
     
             /**
    -         * Define the additional command line parameter you want to add to emake
    -         * invocation.
    +         * Define the additional command line parameter you want to add to emake invocation.
    +         * 
              * @param value the additional command line parameter
              * @ant.required
              */
    @@ -101,10 +104,11 @@
             try {
                 // Writing the makefile.
                 makefile = writeMakefile(cmdSet);
    -            
    +
                 // Running Emake
                 runEmake(makefile);
    -        } finally {
    +        }
    +        finally {
                 if (makefile != null) {
                     makefile.delete();
                 }
    @@ -113,24 +117,29 @@
     
         /**
          * Returns the jar file name containing this class
    +     * 
          * @return a File object or null if not found.
          * @throws IMakerException
          */
         protected File getJarFile() throws IMakerException {
    -        URL url = this.getClass().getClassLoader().getResource(this.getClass().getName().replace('.', '/') + ".class");
    +        URL url = this.getClass().getClassLoader().getResource(this.getClass().getName().replace('.', '/')
    +            + ".class");
             if (url.getProtocol().equals("jar") && url.getPath().contains("!/")) {
                 String fileUrl = url.getPath().split("!/")[0];
                 try {
                     return new File(new URL(fileUrl).getPath());
    -            } catch (MalformedURLException e) {
    +            }
    +            catch (MalformedURLException e) {
                     throw new IMakerException("Error determining the jar file where "
    -                        + this.getClass().getName() + " is located.", e);
    +                    + this.getClass().getName() + " is located.", e);
                 }
             }
             return null;
         }
    +
         /**
          * Run emake using defined makefile.
    +     * 
          * @param makefile the makefile to build
          * @throws IMakerException
          */
    @@ -139,7 +148,8 @@
             if (task.getOutput() != null) {
                 try {
                     output = new FileStreamConsumer(task.getOutput());
    -            } catch (FileNotFoundException e) {
    +            }
    +            catch (FileNotFoundException e) {
                     throw new IMakerException("Error creating the stream recorder: " + e.getMessage(), e);
                 }
             }
    @@ -164,20 +174,23 @@
                     emake.addErrorLineHandler(output);
                 }
                 emake.execute(args.toArray(new String[args.size()]));
    -        } catch (IMakerException e) {
    +        }
    +        catch (IMakerException e) {
                 throw new IMakerException("Error executing emake: " + e.getMessage(), e);
    -        } finally {
    +        }
    +        finally {
                 if (output != null) {
                     output.close();
                 }
             }
         }
    -    
    +
         /**
    -     * Create the Makefile based on the cmdSet build sequence. 
    +     * Create the Makefile based on the cmdSet build sequence.
    +     * 
          * @param cmdSet
          * @return
    -     * @throws IMakerException 
    +     * @throws IMakerException
          * @throws IOException
          */
         private File writeMakefile(List> cmdSet) throws IMakerException {
    @@ -186,12 +199,14 @@
                 Template template = null;
                 if (this.template != null) {
                     if (!this.template.exists()) {
    -                    throw new IMakerException("Could not find template file: " + this.template.getAbsolutePath());
    +                    throw new IMakerException("Could not find template file: "
    +                        + this.template.getAbsolutePath());
                     }
                     task.log("Loading template: " + this.template.getAbsolutePath());
                     cfg.setTemplateLoader(new FileTemplateLoader(this.template.getParentFile()));
                     template = cfg.getTemplate(this.template.getName());
    -            } else {
    +            }
    +            else {
                     cfg.setTemplateLoader(new ClassTemplateLoader(this.getClass(), ""));
                     template = cfg.getTemplate("build_imaker_roms_signing.mk.ftl");
                 }
    @@ -204,25 +219,31 @@
                 data.put("java_home", System.getProperty("java.home"));
                 File jar = getJarFile();
                 if (jar != null) {
    -                task.log("Using " + jar + " as the utility container, make sure the file is available under an emake root.");
    +                task.log("Using "
    +                    + jar
    +                    + " as the utility container, make sure the file is available under an emake root.");
                     data.put("java_utils_classpath", jar.getAbsolutePath());
                 }
                 template.process(data, out);
                 log.debug(out.getBuffer().toString());
    -        
    +
                 OutputStreamWriter output = new OutputStreamWriter(new FileOutputStream(makefile));
                 output.append(out.getBuffer().toString());
                 output.close();
                 return makefile;
    -        } catch (IOException e) {
    -           throw new IMakerException("Error generating the makefile: " + e.getMessage(), e);
    -        } catch (TemplateException e) {
    -            throw new IMakerException("Error while rendering the makefile template: " + e.getMessage(), e);
    +        }
    +        catch (IOException e) {
    +            throw new IMakerException("Error generating the makefile: " + e.getMessage(), e);
    +        }
    +        catch (TemplateException e) {
    +            throw new IMakerException("Error while rendering the makefile template: "
    +                + e.getMessage(), e);
             }
         }
    -    
    +
         /**
          * Add custom parameters for the emake invocation.
    +     * 
          * @return a new Arg object.
          */
         public Arg createArg() {
    @@ -230,8 +251,7 @@
             customArgs.add(arg);
             return arg;
         }
    -    
    -    
    +
         /**
          * {@inheritDoc}
          */
    @@ -239,9 +259,10 @@
         public void setTask(IMakerTask task) {
             this.task = task;
         }
    -    
    +
         /**
          * Defines an alternate template to use to generate the build sequence for emake.
    +     * 
          * @ant.not-required
          */
         public void setTemplate(File template) {
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/JavaEngine.java
    --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/JavaEngine.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/engines/JavaEngine.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -29,8 +29,8 @@
     import java.util.concurrent.ThreadPoolExecutor;
     import java.util.concurrent.TimeUnit;
     
    +import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Project;
    -import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.types.DataType;
     
     import com.nokia.helium.core.plexus.StreamRecorder;
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Configuration.java
    --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Configuration.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Configuration.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -16,6 +16,14 @@
     */
      
     package com.nokia.helium.imaker.ant.types;
    +import java.io.File;
    +import java.util.ArrayList;
    +import java.util.HashSet;
    +import java.util.List;
    +import java.util.Set;
    +import java.util.Vector;
    +import java.util.regex.Pattern;
    +
     import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.DirectoryScanner;
     import org.apache.tools.ant.Project;
    @@ -27,14 +35,6 @@
     import com.nokia.helium.imaker.ant.Command;
     import com.nokia.helium.imaker.ant.IMakerCommandSet;
     
    -import java.io.File;
    -import java.util.ArrayList;
    -import java.util.HashSet;
    -import java.util.List;
    -import java.util.Set;
    -import java.util.Vector;
    -import java.util.regex.Pattern;
    -
     /**
      * The imakerconfiguration enables the build manager to configure his iMaker
      * builds based on introspection.
    @@ -84,6 +84,8 @@
      * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 langpack_01
      * 
    * + * Remember to update helium/sf/java/imaker/imaker.rst if you change this + * * @ant.type name="imakerconfiguration" category="imaker" */ public class Configuration extends DataType implements IMakerCommandSet { @@ -324,7 +326,6 @@ if (makefiles.size() > 0) { Matcher matcher = getMakefileMatcher(imaker); for (String configuration : configurations) { - System.out.println("configuration: " + configuration); if (matcher.match(configuration)) { result.add(configuration); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/ConfigurationSet.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/ConfigurationSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/ConfigurationSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,16 +17,16 @@ package com.nokia.helium.imaker.ant.types; +import java.util.ArrayList; +import java.util.List; +import java.util.Vector; + import org.apache.tools.ant.types.DataType; import com.nokia.helium.imaker.IMaker; import com.nokia.helium.imaker.ant.Command; import com.nokia.helium.imaker.ant.IMakerCommandSet; -import java.util.ArrayList; -import java.util.List; -import java.util.Vector; - /** * Set of iMaker configuration. * diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Variable.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Variable.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Variable.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,8 @@ package com.nokia.helium.imaker.ant.types; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.DataType; -import org.apache.tools.ant.BuildException; /** * Configure a variable for iMaker. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/VariableSet.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/VariableSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/VariableSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,12 @@ */ package com.nokia.helium.imaker.ant.types; -import org.apache.tools.ant.types.DataType; - import java.util.Hashtable; import java.util.Map; import java.util.Vector; +import org.apache.tools.ant.types.DataType; + /** * This type is a container for variable configuration. * diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/utils/ParallelExecutor.java --- a/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/utils/ParallelExecutor.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/utils/ParallelExecutor.java Mon Sep 13 13:11:19 2010 +0800 @@ -20,14 +20,14 @@ import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.StringTokenizer; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import java.util.Date; -import java.text.SimpleDateFormat; /** * Simple application which will execute each line from a text file @@ -37,6 +37,7 @@ * The implementation must not rely on any external dependencies except JVM and owning jar. * */ +@SuppressWarnings("PMD.SystemPrintln") public final class ParallelExecutor { /** diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestHelpConfigStreamConsumer.java --- a/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestHelpConfigStreamConsumer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestHelpConfigStreamConsumer.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,14 +16,14 @@ */ package com.nokia.helium.imaker.tests; +import static org.junit.Assert.assertArrayEquals; + import java.io.File; -import org.junit.*; +import org.junit.Test; import com.nokia.helium.imaker.HelpConfigStreamConsumer; -import static org.junit.Assert.*; - /** * Test the HelpTargetStreamConsumer. * diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestIMaker.java --- a/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestIMaker.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestIMaker.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,7 +16,9 @@ */ package com.nokia.helium.imaker.tests; -import static org.junit.Assert.*; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; import java.io.File; import java.util.List; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestParallelExecutor.java --- a/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestParallelExecutor.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestParallelExecutor.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,7 +17,9 @@ package com.nokia.helium.imaker.tests; import java.io.File; + import org.junit.Test; + import com.nokia.helium.imaker.utils.ParallelExecutor; /** diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestPrintVarStreamConsumer.java --- a/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestPrintVarStreamConsumer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/imaker/tests/src/com/nokia/helium/imaker/tests/TestPrintVarStreamConsumer.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,12 @@ */ package com.nokia.helium.imaker.tests; -import org.junit.*; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; import com.nokia.helium.imaker.PrintVarSteamConsumer; -import static org.junit.Assert.*; - public class TestPrintVarStreamConsumer { @Test diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/AssertNode.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/AssertNode.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/AssertNode.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,40 +1,40 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + package com.nokia.helium.internaldata.ant.listener; //import com.nokia.ant.taskdefs.HlmAssertMessage; import com.nokia.helium.internaldata.ant.taskdefs.HlmAssertMessageTask; + /** * Object to set end time for a task. - * + * */ public class AssertNode extends DataNode { private String name; - - + // location private String filename; private String message; private int line = -1; private String assertName; - - public AssertNode(DataNode parent, HlmAssertMessageTask task) { + + public AssertNode(DataNode parent, HlmAssertMessageTask task) { super(parent, task); name = task.getTaskName(); this.setFilename(task.getLocation().getFileName()); @@ -42,51 +42,64 @@ message = task.getMessage(); assertName = task.getAssertName(); } + /** * Return the assert message + * * @return */ - public String getMessage() { + public String getMessage() { return message; } + /** * Return the assert task name. + * * @return */ public String getName() { return name; - } + } + /** * Return the assert name. + * * @return */ - public String getAssertName() - { + public String getAssertName() { return assertName; } + /** * Return the path to file name. + * * @return */ public String getFilename() { return filename; } + /** * Sets the path to file name. + * * @param filename */ public void setFilename(String filename) { this.filename = filename; } + /** * Return the line number. + * * @return */ public int getLine() { return line; } + /** * Sets the line number. + * * @param line */ public void setLine(int line) { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/BuildNode.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/BuildNode.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/BuildNode.java Mon Sep 13 13:11:19 2010 +0800 @@ -33,8 +33,9 @@ } public String getName() { - if (name != null) + if (name != null) { return name; + } return "build"; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/DataNode.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/DataNode.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/DataNode.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,9 +16,9 @@ */ package com.nokia.helium.internaldata.ant.listener; +import java.util.Date; import java.util.Iterator; import java.util.Vector; -import java.util.Date; /** * Data node object to iterate, keep timing, name, maintain parallel tasks for the node. @@ -108,10 +108,11 @@ * Make is reliable: if end time doesn't exists let's use the start time. */ public Date getEndTime() { - if (endTime != null) + if (endTime != null) { return endTime; - else + } else { return this.getStartTime(); + } } public void setEndTime(Date endTime) { @@ -144,13 +145,15 @@ * @return */ public DataNode find(Object reference) { - if (this.reference == reference) - return this; + if (this.reference == reference) { + return this; + } for (Iterator i = children.iterator() ; i.hasNext() ; ) { DataNode node = i.next(); DataNode result = node.find(reference); - if (result != null) + if (result != null) { return result; + } } return null; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/EmailDataSender.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/EmailDataSender.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/EmailDataSender.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,19 +17,30 @@ package com.nokia.helium.internaldata.ant.listener; -import java.util.Properties; -import java.util.Hashtable; -import java.util.zip.GZIPOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import javax.mail.*; -import javax.mail.internet.*; -import javax.naming.*; -import javax.naming.directory.*; +import java.util.Hashtable; +import java.util.Properties; +import java.util.zip.GZIPOutputStream; import javax.activation.DataHandler; +import javax.mail.BodyPart; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; import javax.mail.util.ByteArrayDataSource; +import javax.naming.Context; +import javax.naming.NamingEnumeration; import javax.naming.NamingException; +import javax.naming.directory.DirContext; +import javax.naming.directory.InitialDirContext; +import javax.naming.directory.SearchControls; +import javax.naming.directory.SearchResult; import org.apache.log4j.Logger; @@ -68,8 +79,9 @@ * Get the smtp server address. */ public String getSMTPServer() { - if (smtpServer != null) + if (smtpServer != null) { return smtpServer; + } return SMTP_SERVER; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/EndLessStack.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/EndLessStack.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/EndLessStack.java Mon Sep 13 13:11:19 2010 +0800 @@ -51,8 +51,9 @@ */ public E pop() { E element = super.pop(); - if (element != null) + if (element != null) { return element; + } return defaultElement; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/Listener.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/Listener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/Listener.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,18 +17,20 @@ package com.nokia.helium.internaldata.ant.listener; -import java.util.Hashtable; +import java.lang.management.ManagementFactory; +import java.lang.management.MemoryMXBean; +import java.lang.management.MemoryUsage; import java.util.Date; -import com.nokia.helium.internaldata.ant.taskdefs.HlmAssertMessageTask; +import java.util.Hashtable; + +import org.apache.log4j.Logger; import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.BuildListener; import org.apache.tools.ant.Project; import org.apache.tools.ant.SubBuildListener; import org.dom4j.Document; -import org.apache.log4j.Logger; -import java.lang.management.ManagementFactory; -import java.lang.management.MemoryMXBean; -import java.lang.management.MemoryUsage; + +import com.nokia.helium.internaldata.ant.taskdefs.HlmAssertMessageTask; /** * Listener class for the Logger. @@ -46,7 +48,10 @@ private EndLessStack buildEventStack = new EndLessStack(); // default list of properties to extract. - private String[] propList = {"os.name", "user.name", "build.name", "build.number", "build.id", "build.family", "build.system", "env.NUMBER_OF_PROCESSORS", "helium.version", "env.SYMSEE_VERSION", "diamonds.build.id"}; + private String[] propList = {"os.name", "user.name", "build.name", + "build.number", "build.id", "build.family", "build.system", + "env.NUMBER_OF_PROCESSORS", "helium.version", + "env.SYMSEE_VERSION", "diamonds.build.id"}; // Memory bean private MemoryMXBean mbean; @@ -62,8 +67,6 @@ public void sendData(String smtpServer, BuildEvent event) { if (buildNode != null) { Document database = null; - //TreeDumper dumper = new TreeDumper(buildNode); - //dumper.dump(); log.debug("Creating the XML log."); XMLRenderer writer = new XMLRenderer(buildNode, database, this.extractProperties(), event); EmailDataSender sender = new EmailDataSender(); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/TreeDumper.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/TreeDumper.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -package com.nokia.helium.internaldata.ant.listener; - -import java.util.Iterator; -/** - * Helper class to fix indentation of the xml. - * - */ -public class TreeDumper { - - private DataNode rootNode; - - public TreeDumper(DataNode root) { - this.rootNode = root; - } - - public void dump() { - dump(rootNode, ""); - } - - public void dump(DataNode root, String indent) { - System.out.println(indent + " + " + root); - for (Iterator i = root.iterator(); i.hasNext() ;) { - DataNode node = i.next(); - dump(node, indent + " "); - } - } - -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/XMLRenderer.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/XMLRenderer.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/listener/XMLRenderer.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,21 +17,20 @@ package com.nokia.helium.internaldata.ant.listener; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.Enumeration; +import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; -import java.util.Hashtable; -import java.util.Enumeration; -import java.io.ByteArrayOutputStream; -import java.io.UnsupportedEncodingException; -import java.io.IOException; +import org.apache.tools.ant.BuildEvent; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; +import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; -import org.dom4j.io.OutputFormat; - -import org.apache.tools.ant.BuildEvent; /** * This xml render object does the following - * Generates target only for TargetNode type of node diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/taskdefs/HlmAssertMessageTask.java --- a/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/taskdefs/HlmAssertMessageTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/taskdefs/HlmAssertMessageTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,9 @@ package com.nokia.helium.internaldata.ant.taskdefs; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; -import org.apache.tools.ant.BuildException; + import com.nokia.helium.internaldata.ant.listener.Listener; @@ -42,10 +43,12 @@ */ public void execute() { - if (assertName == null) + if (assertName == null) { throw new BuildException("'assertName' attribute is not defined"); - if (message == null) + } + if (message == null) { throw new BuildException("'message' attribute is not defined"); + } for (int i = 0 ; i < getProject().getBuildListeners().size() ; i++) { if (getProject().getBuildListeners().get(i) instanceof Listener) { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/tests/src/com/nokia/helium/internaldata/tests/TestEmailDataSender.java --- a/buildframework/helium/sf/java/internaldata/tests/src/com/nokia/helium/internaldata/tests/TestEmailDataSender.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/tests/src/com/nokia/helium/internaldata/tests/TestEmailDataSender.java Mon Sep 13 13:11:19 2010 +0800 @@ -22,15 +22,11 @@ import java.io.File; import java.io.FileReader; - import org.apache.log4j.Level; -import org.apache.log4j.Logger; import org.apache.log4j.LogManager; +import org.apache.log4j.Logger; import org.junit.Test; - - - import com.nokia.helium.internaldata.ant.listener.EmailDataSender; public class TestEmailDataSender { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/internaldata/tests/src/com/nokia/helium/internaldata/tests/TestListener.java --- a/buildframework/helium/sf/java/internaldata/tests/src/com/nokia/helium/internaldata/tests/TestListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/internaldata/tests/src/com/nokia/helium/internaldata/tests/TestListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,12 +17,12 @@ package com.nokia.helium.internaldata.tests; import static org.junit.Assert.assertFalse; + import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; -import java.io.IOException; import org.apache.log4j.Level; import org.apache.log4j.LogManager; @@ -31,6 +31,7 @@ import org.apache.tools.ant.Target; import org.apache.tools.ant.taskdefs.Ant; import org.junit.Test; + import com.nokia.helium.internaldata.ant.listener.Listener; public class TestListener { diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/build.xml --- a/buildframework/helium/sf/java/jpa/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - Helium Antlib JPA build file. - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/ivy.xml --- a/buildframework/helium/sf/java/jpa/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/META-INF/persistence.xml --- a/buildframework/helium/sf/java/jpa/src/META-INF/persistence.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - - - - - org.eclipse.persistence.jpa.PersistenceProvider - - - - com.nokia.helium.jpa.entity.metadata.LogFile - com.nokia.helium.jpa.entity.metadata.Priority - com.nokia.helium.jpa.entity.metadata.Component - com.nokia.helium.jpa.entity.metadata.Metadata - com.nokia.helium.jpa.entity.metadata.MetadataEntry - com.nokia.helium.jpa.entity.metadata.ComponentTime - com.nokia.helium.jpa.entity.metadata.WhatLogEntry - com.nokia.helium.jpa.entity.metadata.ExecutionTime - com.nokia.helium.jpa.entity.Version - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMCommitCount.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMCommitCount.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa; - -import org.apache.log4j.Logger; -import javax.persistence.EntityManager; - -/** - * This class is used to keep track of number of objects - * remaining to be commited to the database. - */ -public class ORMCommitCount { - - private static Logger log = Logger.getLogger(ORMCommitCount.class); - - private static final int PERSISTANCE_COUNT_LIMIT = 1000; - - private static EntityManager entityManager; - - private int count; - - /** Constructor. - */ - public ORMCommitCount() { - count = PERSISTANCE_COUNT_LIMIT; - } - - /** - * Reduce the commit count value by one. - */ - public void decreaseCount() { - count --; - } - - /** - * Reset to maximum limit - */ - public void reset() { - count = PERSISTANCE_COUNT_LIMIT; - } - - /** - * Returns whether the commit is required or not. - * @return if commit required returns true otherwise false. - */ - public boolean isCommitRequired() { - return count == 0; - } - - /** - * Returns whether if there are any data to commit - * @return true if any data there to commit, otherwise false. - */ - public boolean isDatatoCommit() { - //log.debug("isDatatoCommit: " + (count < PERSISTANCE_COUNT_LIMIT)); - return count < PERSISTANCE_COUNT_LIMIT; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMEntityManager.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMEntityManager.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,256 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa; - -import org.apache.log4j.Logger; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import java.util.Hashtable; -import javax.persistence.Persistence; -import org.eclipse.persistence.config.PersistenceUnitProperties; -import java.io.File; -import org.apache.commons.io.FileUtils; -import com.nokia.helium.jpa.entity.Version; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.Statement; -import java.sql.ResultSet; -import java.sql.SQLException; -import org.apache.tools.ant.BuildException; -import java.io.IOException; - -/** - * This class handles the generic ORM entity management. - */ -public class ORMEntityManager { - - private static Logger log = Logger.getLogger(ORMEntityManager.class); - - private EntityManager entityManager; - private EntityManagerFactory factory; - - private ORMCommitCount commitCountObject = new ORMCommitCount(); - - private String urlPath; - /** - * Constructor. - * @param urlPath path for which entity manager to be - * created. - */ - @SuppressWarnings("unchecked") - public ORMEntityManager(String urlPath) throws IOException { - this.urlPath = urlPath; - String name = "metadata"; - Hashtable persistProperties = new Hashtable(); - persistProperties.put("javax.persistence.jdbc.driver", - "org.apache.derby.jdbc.EmbeddedDriver"); - System.setProperty("derby.stream.error.file", System.getProperty("java.io.tmpdir") + File.separator + "derby.log"); - persistProperties.put("javax.persistence.jdbc.url", - "jdbc:derby:" + urlPath); - persistProperties.put( - PersistenceUnitProperties.PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT, - "false"); - persistProperties.put( - PersistenceUnitProperties.PERSISTENCE_CONTEXT_REFERENCE_MODE, - "WEAK"); - persistProperties.put(PersistenceUnitProperties.BATCH_WRITING, - "JDBC"); - persistProperties.put("eclipselink.read-only", "true"); - persistProperties.put(PersistenceUnitProperties.LOGGING_LEVEL, "warning"); - File dbFile = new File(urlPath); - if (dbFile.exists()) { - log.debug("checking db integrity for :" + urlPath); - if (!checkDatabaseIntegrity(urlPath)) { - log.debug("db integrity failed cleaning up old db"); - try { - log.debug("deleting the url path" + urlPath); - FileUtils.forceDelete(dbFile); - log.debug("successfully removed the urlpath" + urlPath); - } catch (java.io.IOException iex) { - log.debug("deleting the db directory failed", iex); - throw new BuildException("failed deleting corrupted db", iex); - } - } else { - log.debug("db exists and trying to create entity manager"); - factory = - Persistence.createEntityManagerFactory( - name, - persistProperties); - entityManager = factory.createEntityManager(); - entityManager.getTransaction().begin(); - return; - } - } - log.debug("url path not exists" + urlPath + "creating it"); - persistProperties.put("javax.persistence.jdbc.url", - "jdbc:derby:" + urlPath + ";create=true"); - persistProperties.put(PersistenceUnitProperties.DDL_GENERATION, - "create-tables"); - persistProperties.put( - PersistenceUnitProperties.DDL_GENERATION_MODE, - "database"); - persistProperties.put( - PersistenceUnitProperties.PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT, - "false"); - persistProperties.put( - PersistenceUnitProperties.PERSISTENCE_CONTEXT_REFERENCE_MODE, - "WEAK"); - persistProperties.put(PersistenceUnitProperties.BATCH_WRITING, - "JDBC"); - persistProperties.put("eclipselink.read-only", "true"); - factory = Persistence.createEntityManagerFactory( - name, - persistProperties); - entityManager = factory.createEntityManager(); - entityManager.getTransaction().begin(); - entityManager.persist(new Version()); - entityManager.getTransaction().commit(); - entityManager.clear(); - entityManager.getTransaction().begin(); - } - - /** - * Helper function to get the entity manager. - * @return entity manager - */ - public EntityManager getEntityManager() { - //log.debug("ORMEntityManager: getEntityManager: " + entityManager); - return entityManager; - } - - /** - * Helper function to get commit count object - * @return commit count object used for cached persisting. - */ - public ORMCommitCount getCommitCountObject() { - return commitCountObject; - } - - /** - * If Any data to be commited, then this function - * commits the data to the database. - */ - public void commitToDB() { - log.debug("commitToDB"); - if (entityManager.getTransaction().isActive()) { - if (commitCountObject.isDatatoCommit()) { - entityManager.getTransaction().commit(); - commitCountObject.reset(); - entityManager.clear(); - entityManager.getTransaction().begin(); - } - } - } - - /** - * Finalizes the entity manager. - */ - public void finalizeEntityManager() { - log.debug("finalizeEntitymanager:" + entityManager); - try { - log.debug("finalizeEntitymanager: in a transaction."); - if (entityManager != null && entityManager.getTransaction().isActive()) { - log.debug("finalizeEntitymanager: committing pending transaction."); - entityManager.getTransaction().commit(); - } - } finally { - log.debug("cleaning up entity manager instance" + entityManager); - commitCountObject.reset(); - if (entityManager != null) { - log.debug("Closing the entityManager"); - entityManager.clear(); - entityManager.close(); - entityManager = null; - } - if (factory != null) { - log.debug("closing the factory"); - factory.close(); - factory = null; - } - // Shutting down the derby database access, so files get unlocked. - try { - log.debug("shutting down the db"); - DriverManager.getConnection("jdbc:derby:" + urlPath + ";shutdown=true"); - } catch (SQLException e) { - log.debug(e.getMessage()); - } - } - } - - /** - * Checks the database integrity. - * @param urlPath - database path to be connected to. - * @return boolean - true if db is valid false otherwise. - */ - private boolean checkDatabaseIntegrity(String urlPath) { - boolean result = false; - loadDriver(); - Connection connection = null; - try { - connection = DriverManager.getConnection("jdbc:derby:" + urlPath); - if (connection != null) { - Statement stmt = connection.createStatement(); - ResultSet rs = stmt.executeQuery("select version from version"); - int version = -1; - log.debug("result set executed"); - if ( rs.next()) { - version = rs.getInt(1); - } - log.debug("result set executed : " + version); - rs.close(); - stmt.close(); - if (version == Version.DB_VERSION) { - result = true; - } else { - DriverManager.getConnection("jdbc:derby:;shutdown= true"); - } - } - } catch (SQLException ex) { - log.debug("exception while checking database integrity: ", ex); - log.debug("shutting down embedded db"); - try { - DriverManager.getConnection("jdbc:derby:;shutdown= true"); - } catch (java.sql.SQLException sex) { - log.debug("normal exception during db shutdown"); - } - } finally { - try { - log.debug("closing the connection"); - if (connection != null) { - connection.close(); - } - } catch (java.sql.SQLException sex) { - log.debug("normal exception during db shutdown"); - } - connection = null; - } - //shutdown unloads the driver, driver need to be loaded again. - return result; - } - private void loadDriver() { - try - { - Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); - } - catch (java.lang.ClassNotFoundException e) - { - throw new BuildException("JDBC Driver could not be found"); - } - } - -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMReader.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMReader.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa; - - -import org.apache.log4j.Logger; -import java.util.List; -import javax.persistence.Query; -import javax.persistence.FlushModeType; -/** - * This class provides an interface to read data from the - * database using JPA. - */ -public class ORMReader { - - private static Logger log = Logger.getLogger(ORMReader.class); - - private static final int READ_CACHE_LIMIT = 30000; - - private ORMEntityManager manager; - - private int startPos; - - private String dbPath; - - /**Constructor: - * @param dbPath - path of the database to connect to. - */ - public ORMReader(String path) { - dbPath = path; - ORMUtil.initializeORM(dbPath); - manager = ORMUtil.getEntityManager(dbPath); - } - - /** - * Executes native sql query and returns List of objects - * of return type mentioned by type. - * @param queryString - sql query to be executed. - * @param type - return type. - * @return List of objects of return type. - */ - public List executeNativeQuery(String queryString, String type) { - int maxResults = READ_CACHE_LIMIT; - Object mutexObject = ORMUtil.getMutexObject(); - synchronized (mutexObject) { - String queryWithSubSet = queryString + " OFFSET " + startPos + - " ROWS FETCH FIRST " + maxResults + " ROW ONLY"; - Query query = null; - if (type != null) { - try { - query = manager.getEntityManager().createNativeQuery(queryWithSubSet, - Class.forName(type)); - } catch (ClassNotFoundException ex) { - log.debug("Exception during native query", ex); - } - } else { - query = manager.getEntityManager().createNativeQuery(queryWithSubSet); - } - query.setHint("eclipselink.maintain-cache", "false"); - List results = query.getResultList(); - int resultsSize = results.size(); - if (resultsSize == 0 || resultsSize < READ_CACHE_LIMIT) { - startPos += resultsSize; - } else { - startPos += maxResults; - } - return results; - } - } - - /** - * Executes sql query which results in single result. - * @param queryString - sql query to be executed. - * @param type - return type. - * @return an Object of return type. - */ - public Object executeSingleResult(String queryString, String type) { - Object mutexObject = ORMUtil.getMutexObject(); - synchronized (mutexObject) { - Query query = manager.getEntityManager().createQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setHint("eclipselink.read-only", "true"); - query.setFlushMode(FlushModeType.COMMIT); - Object obj = null; - try { - obj = query.getSingleResult(); - } catch (javax.persistence.NoResultException nex) { - log.debug("no results:", nex); - } catch (javax.persistence.NonUniqueResultException nux) { - log.debug("more than one result returned:", nux); - } - return obj; - } - } - - /** - * Executes query using JPQL. - * @param queryString - jpa query string - * @return List of objects read from database. - */ - public List executeQuery(String queryString) { - Object mutexObject = ORMUtil.getMutexObject(); - synchronized (mutexObject) { - int maxResults = READ_CACHE_LIMIT; - Query query = manager.getEntityManager().createQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setHint("eclipselink.read-only", "true"); - query.setFirstResult(startPos); - query.setMaxResults(maxResults); - List results = (List) query.getResultList(); - int resultsSize = results.size(); - log.debug("result size: " + resultsSize); - if (results.size() == 0 || resultsSize < READ_CACHE_LIMIT) { - startPos += resultsSize; - } else { - startPos += maxResults; - } - return results; - } - } - - public void close() { - ORMUtil.finalizeORM(dbPath); - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMUtil.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/ORMUtil.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa; - -import org.apache.log4j.Logger; -import java.util.HashMap; -import org.apache.tools.ant.BuildException; -import java.io.IOException; - -/** - * Utility class to communicate to the database using JPA entity - * manager. - */ -public final class ORMUtil { - - private static Logger log = Logger.getLogger(ORMUtil.class); - - private static final int PERSISTANCE_COUNT_LIMIT = 1000; - - private static final int READ_CACHE_LIMIT = 30000; - - private static HashMap emMap = - new HashMap(); - - private static HashMap emMapCount = - new HashMap(); - - private static Object mutexObject = new Object(); - private ORMUtil() { - } - - /** - * Initializes the entity manager and begins the transcations. - * @param urlPath - database path to be connected to. - */ - public static synchronized void initializeORM(String urlPath) { - ORMEntityManager manager = emMap.get(urlPath); - log.debug("initializeORM: urlpath: " + urlPath); - if (manager == null) { - try { - log.debug("initializing for the first time"); - manager = new ORMEntityManager(urlPath); - emMap.put(urlPath, manager); - Integer countObj = new Integer(1); - emMapCount.put(urlPath, countObj); - log.debug("initializeORM: manager: " + manager); - log.debug("initializeORM: manager: " + manager.getEntityManager()); - } catch ( IOException ex ) { - throw new BuildException("Entity Manager creation failure"); - } - } else { - Integer countObj = emMapCount.get(urlPath); - log.debug("object exists and incrementing the value"); - countObj = new Integer(countObj.intValue() + 1); - log.debug("object exists count value: " + countObj.intValue()); - emMapCount.put(urlPath, countObj); - } - } - - /** - * Helper Function to return the entity manager. - * @return entity manager created during initialization. - */ - public static synchronized ORMEntityManager getEntityManager(String urlPath) { - log.debug("getEntityManager: urlpath: " + urlPath); - ORMEntityManager manager = emMap.get(urlPath); - if (manager != null) { - log.debug("getEntityManager: manager: " + manager); - log.debug("getEntityManager: manager.entityManager: " + manager.getEntityManager()); - return manager; - } else { - log.debug("getEntityManager: manager: is null"); - throw new BuildException("ORM entity manager is null"); - } - } - - /** - * Finalize the entity manager and release all the objects. - */ - public static synchronized void finalizeORM(String urlPath) { - ORMEntityManager manager = emMap.get(urlPath); - log.debug("finalizeORM: urlpath: " + urlPath); - if (manager != null) { - Integer countObj = emMapCount.get(urlPath); - if (countObj != null) { - int count = countObj.intValue(); - count = count - 1; - if (count > 0) { - countObj = new Integer(count); - log.debug("countOBj value: " + countObj.intValue()); - emMapCount.put(urlPath, countObj); - } else { - manager.finalizeEntityManager(); - manager = null; - log.debug("finalizeORM: manager" + manager); - emMap.remove(urlPath); - emMapCount.remove(urlPath); - } - } - } - } - - public static Object getMutexObject() { - return mutexObject; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/Version.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/Version.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ -package com.nokia.helium.jpa.entity; - -import javax.persistence.Entity; - - -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Column; -import javax.persistence.Basic; - - -/** - * Entity Version to store the db version. - */ -@Entity -public class Version { - - public static final transient int DB_VERSION = 3; - - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "VERSION_ID") - private int id; - - //DB_VERSION to set as default if version changes - @Basic - @Column(unique = true, nullable = false) - private int version = DB_VERSION; - - /** - * Helper function to set the identifier for the log file. - * @param identifier for the log file. - */ - public void setId(int identifier) { - id = identifier; - } - - /** - * Helper function to get the identifier for the db schema version. - * @return identifier for this log file. - */ - public int getId() { - return id; - } - - /** - * Helper function to set the db schema version. - * @param location of the log file. - */ - public void setVersion(int ver) { - version = ver; - } - - /** - * Helper function to return the current db schema version. - * @return path of the log file.. - */ - public int getVersion() { - return version; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Component.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Component.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa.entity.metadata; - - -import javax.persistence.Entity; -import javax.persistence.CascadeType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Column; -import javax.persistence.Basic; -import javax.persistence.JoinColumn; - - -/** - * Entity class to store the component information. - */ -@Entity -public class Component { - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "COMPONENT_ID") - private int id; - - @Basic - @Column(nullable = false, length = 500) - private String component; - - @Basic - @Column(name = "LOGPATH_ID", insertable = false, updatable = false) - private int logPathID; - - @ManyToOne(cascade = CascadeType.REMOVE) - @JoinColumn(name = "LOGPATH_ID", referencedColumnName = "LOGPATH_ID") - private LogFile logFile; - - @ManyToOne - private Metadata metadata; - - /** - * Helper function to set the identifier. - * @param identifier to set the identifier for the component. - */ - public void setId(int identifier) { - id = identifier; - } - - /** - * Helper function to set the identifier. - * @return the identifier of the component. - */ - public int getId() { - return id; - } - - /** - * Helper function to set component name. - * @param cmp string to be set to. - */ - public void setComponent(String cmp) { - component = cmp; - } - - /** - * Helper function to set log file associated - * with this component. - * @param file associated file to this component. - */ - public void setLogFile(LogFile file) { - logFile = file; - } - - /** - * Helper function to return component string. - * @return component name of this component. - */ - public String getComponent() { - return component; - } - - /** - * Helper function to return log file associated with this component. - * @return component name of this component. - */ - public LogFile getLogFile() { - return logFile; - } - - /** - * Helper function to return logpath id. - * @return log path id associated with this component. - */ - public int getLogPathID() { - return logPathID; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ComponentTime.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ComponentTime.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa.entity.metadata; - - -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Column; -import javax.persistence.Basic; -import javax.persistence.JoinColumn; - - -/** - * Entity component time to store the time taken for each - * component to build. - */ -@Entity -public class ComponentTime { - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "COMPONENTTIME_ID") - private int id; - - @Basic - private double componentTime; - - @Basic - @Column(name = "COMPONENT_ID", insertable = false, updatable = false) - private int componentId; - - - @ManyToOne(cascade = CascadeType.REMOVE) - @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") - - private Component component; - - /** - * Helper function to set the associated component. - * @param cmpt for which the time to be recorded. - */ - public void setComponent(Component cmpt) { - component = cmpt; - } - - - /**Helper function to return the time taken for this component - * to build. - * @return duration to build this component. - */ - public double getDuration() { - return componentTime; - } - - /** - * Helper function to set the duration for this component to build. - * @param duration to build this component. - */ - - public void setDuration(double duration) { - componentTime = duration; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ExecutionTime.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/ExecutionTime.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ -package com.nokia.helium.jpa.entity.metadata; - -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; - -/** - * Entity to store execution of some step/log. - * - */ -@Entity -public class ExecutionTime { - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "EXECUTIONTIME_ID") - private int id; - - @Basic - private int time; - - @Basic - @Column(name = "LOGPATH_ID", insertable = false, updatable = false) - private int logPathID; - - @ManyToOne(cascade = CascadeType.REMOVE) - @JoinColumn(name = "LOGPATH_ID", referencedColumnName = "LOGPATH_ID") - private LogFile logFile; - - /** - * Set record id. - * @param id - */ - public void setId(int id) { - this.id = id; - } - - /** - * Get The record id. - * @return - */ - public int getId() { - return id; - } - - /** - * Set the execution time in seconds. - * @param time - */ - public void setTime(int time) { - this.time = time; - } - - /** - * Get the execution time in seconds. - * @return - */ - public int getTime() { - return time; - } - - /** - * Set the logPathId. - * @param logPathID - */ - public void setLogPathID(int logPathID) { - this.logPathID = logPathID; - } - - /** - * Get the logPathId. - * @return - */ - public int getLogPathID() { - return logPathID; - } - - /** - * Set the logFile. - * @param logFile - */ - public void setLogFile(LogFile logFile) { - this.logFile = logFile; - } - - /** - * Get the logFile. - * @return - */ - public LogFile getLogFile() { - return logFile; - } - -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/LogFile.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/LogFile.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ -package com.nokia.helium.jpa.entity.metadata; - -import javax.persistence.Entity; - - -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Column; -import javax.persistence.Basic; - - -/** - * Entity LogFile to store the information about the log for - * which the data to be written to database. - */ -@Entity -public class LogFile { - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "LOGPATH_ID") - private int id; - - @Basic - @Column(unique = true, nullable = false, length = 500) - private String path; - - @ManyToOne - private Metadata metadata; - - /** - * Helper function to set the identifier for the log file. - * @param identifier for the log file. - */ - public void setId(int identifier) { - id = identifier; - } - - /** - * Helper function to get the identifier for the log file. - * @return identifier for this log file. - */ - public int getId() { - return id; - } - - /** - * Helper function to set the path of the log file. - * @param location of the log file. - */ - public void setPath(String location) { - path = location; - } - - /** - * Helper function to get the path. - * @return path of the log file.. - */ - public String getPath() { - return path; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Metadata.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Metadata.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,783 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa.entity.metadata; - -import java.util.ArrayList; -import javax.persistence.FlushModeType; -import org.apache.log4j.Logger; -import java.util.List; -import javax.persistence.MapKeyColumn; -import javax.persistence.Column; -import javax.persistence.Basic; -import javax.persistence.FetchType; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.EntityManager; -import java.util.Hashtable; -import javax.persistence.Query; -import javax.persistence.CascadeType; -import com.nokia.helium.jpa.ORMCommitCount; -import com.nokia.helium.jpa.ORMUtil; -import com.nokia.helium.jpa.ORMEntityManager; - -/** - * Interface Class to store all the metadata information. - */ - -@Entity -public class Metadata { - - private static Logger log = Logger.getLogger(Metadata.class); - - private static String[] priorityNames = {"FATAL", "ERROR", "WARNING", "INFO", - "REAMARK", "CRITICAL", "DEFAULT"}; - - private transient ORMEntityManager manager; - - private transient String logPath; - - @Basic - @Column(unique = true, nullable = false) - private String name; - - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - private int id; - - @OneToMany(mappedBy = "metadata", - fetch = FetchType.LAZY, cascade = CascadeType.ALL) - private Hashtable logFiles; - - @OneToMany(mappedBy = "metadata", - fetch = FetchType.LAZY, cascade = CascadeType.ALL) - @MapKeyColumn(name = "PRIORITY", insertable = false, updatable = false) - private Hashtable priorities; - - - private Hashtable components; - - private List entries; - - /** - * Default Constructor. - */ - public Metadata() { - } - - /** Constructor. - * @param nm - name to be looked for in the persistence.xml file - * for database information. - */ - public Metadata(String nm) { - name = nm; - } - - /** Constructor. - * @param mgr - entity manager using which the data to be - * written to database. - * @param path - log path for which data to be written to. - */ - public Metadata(ORMEntityManager mgr, String path) { - manager = mgr; - if (logPath == null) { - logPath = path.replace('\'', '/'); - initializeLogPath(); - } - } - - /** - * Helper function to set the name of the JPA entity manager to - * be used. - * @param nm - name to be looked for in the persistence.xml file - * for database information. - */ - public void setName(String nm) { - name = nm; - } - - /** - * Helper function to get the name of the JPA entity manager to - * being used. - * @return nm - name to be looked for in the persistence.xml file - * for database information. - */ - public String getName() { - return name; - } - - - /** - * Helper function to return the list of Logfiles stored - * in the database. - * @return Hash table of logpath with logfile object - * stored in the database. - */ - public Hashtable getLogFiles() { - return logFiles; - } - - /** - * Helper function to persist the components, - * in the database. - * @param componentsList of component name with component object. - * stored in the database. - */ - public void setComponents(Hashtable componentsList) { - components = componentsList; - } - - /** - * Helper function to persist logfile objects in the database. - * @param logFilesList logpath with logfile object. - */ - public void setLogFiles(Hashtable logFilesList) { - logFiles = logFilesList; - } - - public String getLogPath() { - return logPath; - } - /** - * Helper function to persist metadata entry lists in the db. - * @param entriesList List of entries to persist. - */ - public void setEntries(List entriesList) { - entries = entriesList; - } - - /** - * Helper function to return the list of persisted entries currently - * in memory. - * @return list of metadata entries currently in memory. - */ - public List getEntries() { - return entries; - } - - /** - * Helper function to set the logpath of the current entry. - * @param path logpath associated with this entry. - */ - public void setLogPath(String path) { - logPath = path; - } - - /** - * Helper function to set the priority list. - * @param prtList. - */ - public void setPriorities(Hashtable prtList) { - priorities = prtList; - } - - /** - * Helper function to initialize the components currently in - * the database. This is cached in memory so that before persisting - * the cached info is checked for performance optmization. - * @param path - path associated with the component. - * @param logFile - logfile object associated with the component. - */ - @SuppressWarnings("unchecked") - public void initComponents(String path, LogFile logFile) { - logPath = path; - components = new Hashtable(); - if (logFile != null) { - //System.out.println("logfile id: " + logFile.getId()); - List componentList = - (List) manager.getEntityManager().createQuery( - "SELECT c FROM Component c WHERE c.logPathID = :pathId") - .setParameter("pathId", logFile.getId()).getResultList(); - for (Component comp : componentList) { - components.put(comp.getComponent(), comp); - } - } - } - - /** - * Initialize the priority table, caches in memory for - * performance. - */ - @SuppressWarnings("unchecked") - public void initPriorities() { - priorities = new Hashtable(); - List priorityList = - (List) manager.getEntityManager().createQuery( - "SELECT p FROM Priority p") - .getResultList(); - for (Priority priority : priorityList) { - //System.out.println("priority value: " + priority.getPriority()); - priorities.put(priority.getPriority(), priority); - } - } - - /** - * Load the required data to be cached from database. - * @param path - db path. - */ - @SuppressWarnings("unchecked") - private void loadFromDB(String path) { - LogFile logFile = null; - logFiles = new Hashtable(); - Query query = manager.getEntityManager().createQuery("SELECT l FROM LogFile l"); - query.setFlushMode(FlushModeType.COMMIT); - List logFilesList = - (List) query.getResultList(); - for (LogFile file : logFilesList) { - log.debug("getting logfile from db: " + file.getPath()); - logFiles.put(file.getPath(), file); - } - //manager.getEntityManager().clear(); - logFile = logFiles.get(path); - if (logFile == null) { - populateDB(path); - } else { - initComponents(path, logFile); - List entriesList = new ArrayList(); - setEntries(entriesList); - } - initPriorities(); - } - - /** - * Internal function to persist an object into the database. - * @param obj - object to be stored in the data. - */ - private void persist(Object obj) { - Object mutexObject = ORMUtil.getMutexObject(); - synchronized (mutexObject) { - synchronized (manager) { - EntityManager em = manager.getEntityManager(); - ORMCommitCount countObject = manager.getCommitCountObject(); - //log.debug("object: " + em); - em.persist(obj); - countObject.decreaseCount(); - if (countObject.isCommitRequired()) { - countObject.reset(); - em.getTransaction().commit(); - em.clear(); - em.getTransaction().begin(); - } - } - } - } - - /** - * Internal function to populate the priorities into the cache. - */ - private void populatePriorities() { - Hashtable priorityList = new Hashtable(); - setPriorities(priorityList); - for (String priorityName : priorityNames) { - Priority priority = new Priority(); - priority.setPriority(priorityName); - priorityList.put(priorityName, priority); - log.debug("populating priorities: " + priorityName); - persist(priority); - } - } - - /** - * Internal function to load data from database. - * @param path - db path - */ - private void populateDB(String path) { - setLogPath(path); - Hashtable logFileList = - new Hashtable(); - //entityManager.merge(logFileList); - setLogFiles(logFileList); - log.debug("populatedb: " + path); - checkAndAddLogPath(); - Hashtable componentsList = - new Hashtable(); - //entityManager.merge(componentsList); - setComponents(componentsList); - List entriesList = new ArrayList(); - setEntries(entriesList); - } - - /** - * Internal function to cache the logpath for performance. - */ - private void initializeLogPath() { - EntityManager entityManager = manager.getEntityManager(); - Query query = entityManager.createQuery("select m from LogFile m"); - query.setFlushMode(FlushModeType.COMMIT); - - name = "metadata"; - if (query.getResultList().size() == 0) { - log.debug("query result: size" + query.getResultList().size()); - populatePriorities(); - populateDB(logPath); - } else { - log.debug("loading from db: " + logPath); - loadFromDB(logPath); - } - //em.clear(); - } - - /** - * Adds the log entry to the database. - * @param entry - logentry which is to be written to db. - */ - public void addEntry(LogEntry entry) { - - String comp = entry.getComponent(); - Component component = null; - if (comp != null) { - component = checkAndAddComponent(comp); - float elapsedTime = entry.getElapsedTime(); - String priority = entry.getPriorityText(); - int lineNo = entry.getLineNumber(); - String logText = entry.getText(); - log.debug("elapsedTime: " + elapsedTime); - log.debug("comp: " + comp); - if (elapsedTime != -1) { - addElapsedTime(component, elapsedTime); - } else if (!priority.equals("default")) { - addMetadata(priority, component, lineNo, logText); - } else { - WhatEntry whatEntry = entry.getWhatEntry(); - if (whatEntry != null) { - List members = whatEntry.getMembers(); - if (members != null) { - for (WhatLogMember member : members) { - if (member != null) { - addWhatLogMember(component, member.getMember(), - member.getMemberExists()); - } - } - } - } - } - } - } - - - /** - * Internal function to add what log member to the database. - * @param component for which to record the elapsed time - * @param whatLogMember - an entry from whatlog output - * @param memberExists - is the whatlog entry exists in the file system. - */ - private void addWhatLogMember(Component component, - String whatLogMember, boolean memberExists) { - //Todo: handle duplicate whatlog member entry - WhatLogEntry entry = new WhatLogEntry(); - entry.setMember(whatLogMember); - entry.setMissing(!memberExists); - entry.setComponent(component); - persist(entry); - } - - /** - * Internal function to add log path only if it is not already - * there in the cached entry from database. - * @return LogFile object related to the logpath. - */ - private LogFile checkAndAddLogPath() { - LogFile logFile = logFiles.get(logPath); - log.debug("checkandaddlogpath:logpath" + logPath); - log.debug("checkandaddlogpath:logFile" + logFile); - if (logFile == null) { - logFile = new LogFile(); - logFile.setPath(logPath); - persist(logFile); - logFiles.put(logPath, logFile); - } - return logFile; - } - - /** - * Record the execution time in second for a particular log. - * @param time - */ - public void addExecutionTime(int time) { - LogFile logFile = logFiles.get(this.getLogPath()); - if (logFile != null) { - ExecutionTime et = new ExecutionTime(); - et.setTime(time); - et.setLogFile(logFile); - persist(et); - } - } - - /** - * Internal function to add elapsed tim to the database. - * @param component for which to record the elapsed time - * @param elapsedTime - time to be recorded. - */ - private void addElapsedTime(Component component, double elapsedTime) { - ComponentTime componentTime = new ComponentTime(); - componentTime.setComponent(component); - componentTime.setDuration(elapsedTime); - persist(componentTime); - } - - /** - * Internal function to add component if not exist - * in the cached entries from database. - * @param comp - component Name to be added. - * @return either new component / existing component from cache. - */ - private Component checkAndAddComponent(String comp) { - //System.out.println("checkAndAddComponent: comp: "+ comp); - Component component = components.get(comp); - if (component == null) { - component = new Component(); - log.debug("checkandaddcomponent: logpath" + logPath); - log.debug("checkandaddcomponent: logpath" + logFiles); - component.setLogFile(logFiles.get(logPath)); - component.setComponent(comp); - persist(component); - components.put(comp, component); - } - return component; - } - - /** - * Function provides the Priority object for the string - * priority. - * @param prty - priority string - * @return Priority object for the prioirty string. - */ - private Priority getPriority(String prty) { - Priority retValue = priorities.get(prty.toUpperCase()); - if (retValue == null) { - retValue = priorities.get(priorityNames[0]); - } - log.debug("priority:getPriority: " + prty); - return retValue; - } - - /** - * Internal function to add the entry to the database. - * priority. - * @param priority - Priority of the entry - * @param component - component info for the entry - * @param lineNo - line number at which the severity is captured. - * @param logText - text about the severity info to be recorded. - */ - private void addMetadata(String priority, Component component, - int lineNo, String logText) { - MetadataEntry entry = new MetadataEntry(); - log.debug("logfile: " + component.getLogFile().getPath()); - entry.setLogFile(component.getLogFile()); - entry.setComponent(component); - entry.setLineNumber(lineNo); - entry.setPriority(getPriority(priority)); - log.debug("error text message: " + logText); - entry.setText(logText); - persist(entry); - } - - /** - * Removes the entries for a particular log. - * priority. - */ - public final void removeEntries() { - LogFile file = (LogFile)executeSingleQuery("select l from LogFile l where l.path like '%" + logPath + "'"); - if ( file != null ) { - log.debug("removing entries for : " + file.getPath()); - int pathId = file.getId(); - removeEntries("DELETE FROM MetadataEntry AS m where m.COMPONENT_ID in (select COMPONENT_ID from Component where LOGPATH_ID= " + pathId + ")"); - removeEntries("DELETE FROM ComponentTime AS ctime where ctime.COMPONENT_ID in (select COMPONENT_ID from Component where LOGPATH_ID= " + pathId + ")"); - removeEntries("DELETE FROM WhatLogEntry AS wentry where wentry.COMPONENT_ID in (select COMPONENT_ID from Component where LOGPATH_ID= " + pathId + ")"); - removeEntries("DELETE FROM Component AS c where c.LOGPATH_ID = " + pathId); - removeEntries("DELETE FROM ExecutionTime AS e where e.LOGPATH_ID = " + pathId); - removeEntries("DELETE FROM LogFile AS l where l.LOGPATH_ID = " + pathId); - removeEntries("DELETE FROM LogFile l where l.LOGPATH_ID = " + pathId); - } - } - - /** - * Internal function execute query which results in single record. - * @param queryString - query string for whcih the result to be obtained. - * @return object - record from the executed query. - */ - private Object executeSingleQuery (String queryString) { - Object mutexObject = ORMUtil.getMutexObject(); - Object obj = null; - synchronized (mutexObject) { - EntityManager em = manager.getEntityManager(); - Query query = em.createQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setHint("eclipselink.read-only", "true"); - query.setFlushMode(FlushModeType.COMMIT); - try { - obj = query.getSingleResult(); - } catch (javax.persistence.NoResultException nex) { - log.debug("no results for query: " + queryString, nex); - } catch (javax.persistence.NonUniqueResultException nux) { - log.debug("more than one result returned by query: " + queryString, nux); - } - } - return obj; - } - - /** - * Internal function to remove the entries from db. - * @param queryString - query string for whcih the result to be obtained. - */ - private void removeEntries(String queryString) { - Object mutexObject = ORMUtil.getMutexObject(); - synchronized (mutexObject) { - EntityManager em = manager.getEntityManager(); - Query query = em.createNativeQuery(queryString); - query.setHint("eclipselink.persistence-context.reference-mode", "WEAK"); - query.setHint("eclipselink.maintain-cache", "false"); - query.setFlushMode(FlushModeType.COMMIT); - try { - int deletedRecords = query.executeUpdate(); - log.debug("total records deleted " + deletedRecords - + "for query:" + queryString); - } catch (javax.persistence.NoResultException nex) { - log.debug("no results:", nex); - } catch (javax.persistence.NonUniqueResultException nux) { - log.debug("more than one result returned:", nux); - } - } - } - - /** - * Helper class to store the log entry , used to write to the database - * - * @param databasePath The path to the database - */ - public static class LogEntry - { - private String text; - - private PriorityEnum priority; - - private String component; - - private int lineNumber; - - private String logPath; - - private float elapsedTime; - - private String priorityText; - - private WhatEntry whatEntry; - - /** - * Constructor for the helper class - */ - public LogEntry(String text, PriorityEnum priority, String component, - String logPath, int lineNumber, - float time, WhatEntry entry) - { - this.text = text; - this.priority = priority; - this.component = component; - this.lineNumber = lineNumber; - this.logPath = logPath.replace('\'', '/'); - this.elapsedTime = time; - whatEntry = entry; - } - - /** - * Constructor for the helper class - */ - public LogEntry(String text, PriorityEnum priority, String component, - String logPath, int lineNumber) - { - this(text, priority, component, logPath, lineNumber, -1, null); - } - - - /** - * Constructor for the helper class. - */ - public LogEntry(String text, String priorityTxt, String component, String logPath, - int lineNumber, float time, WhatEntry entry) { - PriorityEnum prty = null; - String prtyText = priorityTxt.trim().toLowerCase(); - priorityText = prtyText; - if (prtyText.equals("error")) { - prty = PriorityEnum.ERROR; - } else if (prtyText.equals("warning")) { - prty = PriorityEnum.WARNING; - } else if (prtyText.equals("fatal")) { - prty = PriorityEnum.FATAL; - } else if (prtyText.equals("info")) { - prty = PriorityEnum.INFO; - } else if (prtyText.equals("remark")) { - prty = PriorityEnum.REMARK; - } else if (prtyText.equals("default")) { - prty = PriorityEnum.DEFAULT; - } else if (prtyText.equals("critical")) { - prty = PriorityEnum.CRITICAL; - } else { - log.debug("Error: priority " + prtyText + " is not acceptable by metadata and set to Error"); - prty = PriorityEnum.ERROR; - priorityText = "error"; - //throw new Exception("priority should not be null"); - } - - this.logPath = logPath.replace('\\', '/'); - this.text = text; - priority = prty; - this.component = component; - this.lineNumber = lineNumber; - this.elapsedTime = time; - whatEntry = entry; - } - - public void setElapsedTime(float time) { - this.elapsedTime = time; - } - /** - * Helper function to return to getLogPath - * @ - */ - - public String getLogPath() - { - return logPath; - } - - public int getLineNumber() - { - return lineNumber; - } - - public String getText() - { - return text; - } - - public void setText(String text) - { - this.text = text; - } - - public PriorityEnum getPriority() - { - return priority; - } - - public String getPriorityText() { - return priorityText; - } - - public float getElapsedTime() { - return elapsedTime; - } - - public void setPriority(PriorityEnum priority) - { - this.priority = priority; - } - - public String getComponent() - { - return component; - } - - public void setComponent(String component) - { - this.component = component; - } - - public WhatEntry getWhatEntry() { - return whatEntry; - } - - public String toString() { - return "file:" + logPath + "[" + lineNumber + "], component:" + component + ", priority:" + - priorityText + " \n" + text; - } - } - - /** Levels of log entry types. */ - public enum PriorityEnum - { - // The values assigned to these enums should match the - // automatically assigned values created in the database table - FATAL(1), ERROR(2), WARNING(3), INFO(4), REMARK(5), DEFAULT(6), CRITICAL(7); - private final int value; - PriorityEnum(int value) - { - this.value = value; - } - public int getValue() { - return value; - } - - public static PriorityEnum getPriorityEnum( int i ) { - final PriorityEnum[] values = values(); - return i >= 0 && i < values .length ? values[i] : FATAL; - } - }; - - /** - * Helper class to store the Component and output association. - */ - public static class WhatEntry - { - private String component; - private List members; - - /** - * Constructor for the helper class - */ - public WhatEntry(String comp, List mbrs) - { - component = comp; - members = mbrs; - } - - public String getComponent() { - return component; - } - - public List getMembers() { - return members; - } - } - - - /** - * Helper class to store the what log output into orm. - */ - public static class WhatLogMember { - private String member; - private boolean memberExists; - - public WhatLogMember(String mbr, boolean exists) { - member = mbr; - memberExists = exists; - } - - public String getMember() { - return member; - } - - public boolean getMemberExists() { - return memberExists; - } - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataEntry.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataEntry.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa.entity.metadata; - - -import javax.persistence.CascadeType; -import javax.persistence.ManyToOne; -import javax.persistence.Column; -import javax.persistence.Basic; -import javax.persistence.JoinColumn; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; - -/** - * Entity class which stores the the mapping of all the other tables - * along with actual error information. - */ -@Entity -public class MetadataEntry { - - /// Maximum size of the text we store in the metadata - public static final int TEXT_LENGTH = 500; - - @Id - @Column(name = "ENTRY_ID") - @GeneratedValue(strategy = GenerationType.SEQUENCE) - private int id; - - @Basic - private int lineNumber; - - @Basic - @Column(length = TEXT_LENGTH) - private String text; - - @Basic - @Column(name = "COMPONENT_ID", insertable = false, updatable = false) - private int componentId; - - @Basic - @Column(name = "PRIORITY_ID", insertable = false, updatable = false) - private int priorityId; - - @ManyToOne(cascade = CascadeType.REMOVE, optional = false) - @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") - private Component component; - - @ManyToOne(cascade = CascadeType.REMOVE, optional = false) - @JoinColumn(name = "PRIORITY_ID", referencedColumnName = "PRIORITY_ID") - private Priority priority; - - @Column(name = "LOGPATH_ID", insertable = false, updatable = false) - private int logPathId; - - @ManyToOne(cascade = CascadeType.REMOVE, optional = false) - @JoinColumn(name = "LOGPATH_ID", referencedColumnName = "LOGPATH_ID") - private LogFile logFile; - - /** - * Helper function to get the identifier of the metadata record - * which is being stored in the database. - * @return id - identifier for the log record. - */ - public int getId() { - return id; - } - - /** - * Helper function to set the logfile associated to the metadata entry. - * @param LogFile object associated to this entry. - */ - public void setLogFile(LogFile file) { - logFile = file; - } - - /** - * Helper function to set the priority object associated to this entry. - * @param priority object associated to this entry. - */ - public void setPriority(Priority prty) { - priority = prty; - } - - /** - * Helper function to set the component object associated to this entry. - * @param component object associated to this entry. - */ - public void setComponent(Component cmpt) { - component = cmpt; - } - - /** - * Helper function to set the identifier for this entry. - * @param id identifier to be set for this entry. - */ - public void setId(int id) { - this.id = id; - } - - /** - * Helper function to set the log text associated to this entry. - * @param txt - text representing this log entry. - */ - public void setText(String txt) { - // Let's trunk ourselves the text we are passing to the - // storage. - if (txt.length() > TEXT_LENGTH) { - txt = txt.substring(0, TEXT_LENGTH); - } - text = txt; - } - - /** - * Helper function to set the line number for this entry. - * @param line number associated to this entry. - */ - public void setLineNumber(int number) { - lineNumber = number; - } - - /** - * Helper function to get the text message associated to this entry. - * @return text message of this entry. - */ - public String getText() { - return text; - } - - /** - * Helper function to get line number of the error message associated - * with this object. - * @return line number associated to this entry. - */ - public int getLineNumber() { - return lineNumber; - } - - /** - * Helper function to get the log path id of this entry. - * @return log path id associated to this entry. - */ - public int getLogPathId() { - return logPathId; - } - - /** - * Helper function to set the logpath id associated to this entry. - * @param id logpath id of this entry. - */ - public void setLogPathId(int id) { - logPathId = id; - } - -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataUtil.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/MetadataUtil.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ -package com.nokia.helium.jpa.entity.metadata; - -import java.util.HashMap; -import com.nokia.helium.jpa.ORMEntityManager; -import com.nokia.helium.jpa.ORMUtil; -import org.apache.log4j.Logger; - -/** - * Utility class for writing metadata information to db - * using JPA. - */ -public final class MetadataUtil { - - private static Logger log = Logger.getLogger(MetadataUtil.class); - - private static Metadata metadata; - - private static HashMap metadataMap = new HashMap(); - - private static Object mutexObject = new Object(); - - /** - * Make sure the class cannot be instantiated - */ - private MetadataUtil() { - } - - /** - * Initialize the orm, calls ORMUtil initialize function to create - * entity manager and commit count objects. - * @param urlPath - url path for which the connection needs to be - * initialized. - */ - public static void initializeORM(String urlPath) { - synchronized (mutexObject) { - ORMUtil.initializeORM(urlPath); - } - } - - /** - * Finalize the orm, calls ORMUtil finalize function to close - * entity manager. - */ - public static void finalizeORM(String urlPath) { - synchronized (mutexObject) { - log.debug("finalizing orm"); - ORMUtil.finalizeORM(urlPath); - } - } - - /** - * Finalize the orm, calls ORMUtil finalize function to close - * entity manager. - */ - public static void finalizeMetadata(String urlPath, String logPath) { - synchronized (mutexObject) { - ORMEntityManager manager = ORMUtil.getEntityManager(urlPath); - manager.commitToDB(); - log.debug("finalizing metadata: " + logPath); - metadataMap.remove(logPath); - } - } - - /** - * Adding entry to the database. - * @param entry - Adding a log entry - */ - public static void addEntry(String urlPath, Metadata.LogEntry entry) { - synchronized (mutexObject) { - metadata = getMetadata(entry.getLogPath(), urlPath); - metadata.addEntry(entry); - } - } - - /** - * - */ - public static void addEntry(String urlPath, String logPath, int time) { - synchronized (mutexObject) { - metadata = getMetadata(logPath, urlPath); - metadata.addExecutionTime(time); - } - } - - /** - * Remove entry from the database for specific log file. - * @param urlPath - db path - * @param logPath - log file for which all the entries to be removed. - */ - public static void removeEntries(String urlPath, String logPath) { - synchronized (mutexObject) { - metadata = getMetadata(logPath, urlPath); - metadata.removeEntries(); - finalizeMetadata(urlPath, logPath); - } - } - - /** - * Returns the metadata associated with the log path, if metadata doesn't - * exists in the cache, creates it. - * @param urlPath - db path - * @param logPath - log file for which all the entries to be removed. - */ - private static Metadata getMetadata(String logPath, String urlPath) { - ORMEntityManager manager = ORMUtil.getEntityManager(urlPath); - metadata = metadataMap.get(logPath); - if (metadata == null) { - log.debug("initializing metadatamap for logpath" + logPath); - metadata = new Metadata(manager, logPath); - - metadataMap.put(logPath, metadata); - } - return metadata; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Priority.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/Priority.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ - -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ -package com.nokia.helium.jpa.entity.metadata; - - -import javax.persistence.Entity; -//import org.apache.tools.ant.BuildException; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Column; -import javax.persistence.Basic; - -/** - * Entity Class stores the priority. - */ -@Entity -public class Priority { - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "PRIORITY_ID") - private int id; - - @Basic - @Column(name = "PRIORITY") - private String priority; - - @ManyToOne - private Metadata metadata; - - /** - * Default constructor. - */ - public Priority() { - - } - - /** - * Helper function to set the priority string. - * @param prty - priority string to be stored for this - * priority object. - */ - public void setPriority(String prty) { - priority = prty; - } - - /* - * Helper function to get the priority of the priority object - * @return priority string of this priority object. - */ - public String getPriority() { - return priority; - } - - /* - * Set the identifier of this priority object in the db. - * @param id for this priority in the db - */ - public void setId(int identifier) { - id = identifier; - } - - /* - * Gets the identifier of the priority object. - * @return id of this priority object. - */ - public int getId() { - return id; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/WhatLogEntry.java --- a/buildframework/helium/sf/java/jpa/src/com/nokia/helium/jpa/entity/metadata/WhatLogEntry.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.jpa.entity.metadata; - - -import javax.persistence.CascadeType; -import javax.persistence.Entity; - -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Column; -import javax.persistence.Basic; -import javax.persistence.JoinColumn; - - -/** - * Entity class to store the component information. - */ -@Entity -public class WhatLogEntry { - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE) - @Column(name = "WHATLOG_ENTRY_ID") - private int id; - - @Basic - @Column(name = "COMPONENT_ID", insertable = false, updatable = false) - private int componentID; - - @Basic - @Column(name = "MEMBER", nullable = false) - private String member; - - @Basic - @Column(name = "MISSING") - private boolean missing; - - @ManyToOne(cascade = CascadeType.REMOVE) - @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") - private Component component; - - /** - * Helper function to set the identifier. - * @param identifier to set the identifier for the component. - */ - public void setId(int identifier) { - id = identifier; - } - - /** - * Helper function to set the identifier. - * @return the identifier of the component. - */ - public int getId() { - return id; - } - - /** - * Helper function to set component name. - * @param cmp string to be set to. - */ - public void setComponent(Component cmp) { - component = cmp; - } - - /** - * Helper function to set log file associated - * with this component. - * @param file associated file to this component. - */ - public void setMember(String mbr) { - member = mbr; - } - - /** - * Helper function to return component string. - * @return component name of this component. - */ - public Component getComponent() { - return component; - } - - /** - * Helper function to return log file associated with this component. - * @return component name of this component. - */ - public String getMember() { - return member; - } - - public void setMissing(boolean nonexistance) { - missing = nonexistance; - } - - public boolean getMissing() { - return missing; - } -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/jpa/src/log4j.xml --- a/buildframework/helium/sf/java/jpa/src/log4j.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/Antlib.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/Antlib.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/Antlib.java Mon Sep 13 13:11:19 2010 +0800 @@ -25,15 +25,14 @@ import java.util.ArrayList; import java.util.List; -import org.apache.tools.ant.TaskContainer; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.ComponentHelper; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.tools.ant.helper.ProjectHelper2; +import org.apache.tools.ant.TaskContainer; import org.apache.tools.ant.UnknownElement; - -import org.apache.tools.ant.taskdefs.*; +import org.apache.tools.ant.helper.ProjectHelper2; +import org.apache.tools.ant.taskdefs.AntlibDefinition; /** * Antlib task. It does not diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/BuildStatusDef.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/BuildStatusDef.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/BuildStatusDef.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,23 +1,22 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + package com.nokia.ant; - import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -31,48 +30,47 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; +import org.apache.tools.ant.types.DataType; import org.dom4j.Comment; import org.dom4j.Document; +import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.Node; import org.dom4j.Visitor; import org.dom4j.VisitorSupport; import org.dom4j.io.SAXReader; -import org.dom4j.DocumentException; -import com.nokia.helium.core.ant.types.HlmPostDefImpl; - +import com.nokia.helium.ant.data.PropertyCommentMeta; import com.nokia.helium.ant.data.PropertyMeta; - +import com.nokia.helium.core.ant.PostBuildAction; /** * Class to store the status of the signal of a particular target. */ -public class BuildStatusDef extends HlmPostDefImpl -{ +public class BuildStatusDef extends DataType implements PostBuildAction { + private static final String DEPRECATED = "deprecated:"; private HashSet output = new HashSet(); - - - public void execute(Project prj, String module, String[] targetNames) - { - //Run after targets execute so dynamic target names are resolved - for (int i = 0; i < targetNames.length; i++) - { + + @Override + public void executeOnPostBuild(Project project, String[] targetNames) { + // Run after targets execute so dynamic target names are resolved + for (int i = 0; i < targetNames.length; i++) { String[] array = { targetNames[i] }; Target target = findTarget(targetNames[i], getProject(), array); targetCallsHeliumTarget(target, getProject()); } checkTargetsProperties(getProject()); - - if (!output.isEmpty()) - { + checkDeprecatedProperties(getProject()); + + if (!output.isEmpty()) { log("*** Configuration report ***", Project.MSG_INFO); - for (String outputStr : output) + for (String outputStr : output) { log(outputStr, Project.MSG_INFO); + } } } - - /** + + /** * @param desiredTarget * Target name to search * @param project @@ -82,8 +80,8 @@ * */ @SuppressWarnings("unchecked") - public Target findTarget(String desiredTarget, Project project, String[] targetNames) - { + public Target findTarget(String desiredTarget, Project project, + String[] targetNames) { Hashtable targets; Vector sorted; @@ -94,100 +92,102 @@ sorted = project.topoSort(targetNames[0], targets); // Find the desiredTarget Target object - for (Target target : sorted) - { - if (target.getName().equals(desiredTarget)) - { + for (Target target : sorted) { + if (target.getName().equals(desiredTarget)) { return target; } } - throw new BuildException("Could not find target matching " + desiredTarget + "\n"); + throw new BuildException("Could not find target matching " + + desiredTarget + "\n"); } - - /** - * If a target defined outside helium are calling a private Helium target then print warning + + /** + * If a target defined outside helium are calling a private Helium target + * then print warning * */ @SuppressWarnings("unchecked") - public void targetCallsHeliumTarget(Target target, Project project) - { + public void targetCallsHeliumTarget(Target target, Project project) { String location = target.getLocation().getFileName(); - + try { - String heliumpath = new File(project.getProperty("helium.dir")).getCanonicalPath(); + String heliumpath = new File(project.getProperty("helium.dir")) + .getCanonicalPath(); String targetpath = new File(location).getCanonicalPath(); - - if (!targetpath.contains(heliumpath)) - { + + if (!targetpath.contains(heliumpath)) { ArrayList antcallTargets = new ArrayList(); - Visitor visitorTarget = new AntTargetVisitor(antcallTargets, project); - + Visitor visitorTarget = new AntTargetVisitor(antcallTargets, + project); + Element element = findTargetElement(target, project); - if (element != null) + if (element != null) { element.accept(visitorTarget); - for (String depTargetString : antcallTargets) - { + } + for (String depTargetString : antcallTargets) { String[] array = { depTargetString }; try { - Target depTarget = findTarget(depTargetString, project, array); - targetCallsHeliumTarget(depTarget, project); - } catch (BuildException x) { - // We are Ignoring the errors as no need to fail the build. - log("Exception occured while target defined outside helium are calling a private Helium target " + x.toString(), Project.MSG_DEBUG); + Target depTarget = findTarget(depTargetString, project, + array); + targetCallsHeliumTarget(depTarget, project); + } catch (BuildException x) { + // We are Ignoring the errors as no need to fail the + // build. + log( + "Exception occured while target defined outside helium are calling a private Helium target " + + x.toString(), Project.MSG_DEBUG); x = null; - } + } } - - - for (Enumeration depsEnum = target.getDependencies(); depsEnum.hasMoreElements();) - { + + for (Enumeration depsEnum = target.getDependencies(); depsEnum + .hasMoreElements();) { String depTargetString = depsEnum.nextElement(); String[] array = { depTargetString }; try { - Target depTarget = findTarget(depTargetString, project, array); - targetCallsHeliumTarget(depTarget, project); + Target depTarget = findTarget(depTargetString, project, + array); + targetCallsHeliumTarget(depTarget, project); } catch (BuildException x) { - //We are Ignoring the errors as no need to fail the build. - log("Exception occured while target defined outside helium are calling a private Helium target " + x.toString(), Project.MSG_DEBUG); + // We are Ignoring the errors as no need to fail the + // build. + log( + "Exception occured while target defined outside helium are calling a private Helium target " + + x.toString(), Project.MSG_DEBUG); x = null; - } + } } - } - else - { + } else { checkIfTargetPrivate(target, project); } } catch (IOException e) { - //We are Ignoring the errors as no need to fail the build. - log("IOException occured while target defined outside helium are calling a private Helium target " + e.getMessage(), Project.MSG_DEBUG); + // We are Ignoring the errors as no need to fail the build. + log( + "IOException occured while target defined outside helium are calling a private Helium target " + + e.getMessage(), Project.MSG_DEBUG); e.printStackTrace(); } } - private class AntTargetVisitor extends VisitorSupport - { + private class AntTargetVisitor extends VisitorSupport { private List targetList; private Project project; - public AntTargetVisitor(List targetList, Project project) - { + public AntTargetVisitor(List targetList, Project project) { this.targetList = targetList; this.project = project; } - public void visit(Element node) - { + public void visit(Element node) { String name = node.getName(); - if (name.equals("antcall") || name.equals("runtarget")) - { + if (name.equals("antcall") || name.equals("runtarget")) { String text = node.attributeValue("target"); extractTarget(text); } } - private void extractTarget(String text) - { + private void extractTarget(String text) { String iText = project.replaceProperties(text); targetList.add(iText); } @@ -197,134 +197,224 @@ /** * Find the xml Element for the target * - */ + */ @SuppressWarnings("unchecked") - public Element findTargetElement(Target target, Project project) - { + public Element findTargetElement(Target target, Project project) { SAXReader xmlReader = new SAXReader(); - + Document antDoc = null; - + String location = target.getLocation().getFileName(); - + try { File file = new File(location); antDoc = xmlReader.read(file); } catch (DocumentException e) { // We are Ignoring the errors as no need to fail the build. - log("Not able read the XML file. " + e.getMessage(), Project.MSG_WARN); + log("Not able read the XML file. " + e.getMessage(), + Project.MSG_WARN); } - + String projectName = antDoc.valueOf("/project/@name"); - for (Iterator iterator = antDoc.selectNodes("//target").iterator(); iterator.hasNext();) - { + for (Iterator iterator = antDoc.selectNodes("//target") + .iterator(); iterator.hasNext();) { Element element = iterator.next(); String targetName = element.attributeValue("name"); - if (targetName.equals(target.getName()) || (projectName + "." + targetName).equals(target.getName())) + if (targetName.equals(target.getName()) + || (projectName + "." + targetName) + .equals(target.getName())) { return element; + } } return null; } - - /** + + /** * If target has comment that says it is private them print warning * */ @SuppressWarnings("unchecked") - public void checkIfTargetPrivate(Target target, Project project) - { + public void checkIfTargetPrivate(Target target, Project project) { Element targetElement = findTargetElement(target, project); - if (targetElement != null) - { - List children = targetElement.selectNodes("preceding-sibling::node()"); - if (children.size() > 0) - { + if (targetElement != null) { + List children = targetElement + .selectNodes("preceding-sibling::node()"); + if (children.size() > 0) { // Scan past the text nodes, which are most likely whitespace int index = children.size() - 1; Node child = children.get(index); - while (index > 0 && child.getNodeType() == Node.TEXT_NODE) - { + while (index > 0 && child.getNodeType() == Node.TEXT_NODE) { index--; child = (Node) children.get(index); } - + // Check if there is a comment node String commentText = null; - if (child.getNodeType() == Node.COMMENT_NODE) - { + if (child.getNodeType() == Node.COMMENT_NODE) { Comment macroComment = (Comment) child; commentText = macroComment.getStringValue().trim(); - //log(macroName + " comment: " + commentText, Project.MSG_DEBUG); + // log(macroName + " comment: " + commentText, + // Project.MSG_DEBUG); } - - if (commentText != null) - { - if (commentText.contains("Private:")) - { - output.add("Warning: " + target.getName() + " is private and should only be called by helium"); + + if (commentText != null) { + if (commentText.contains("Private:")) { + output + .add("Warning: " + + target.getName() + + " is private and should only be called by helium"); } - if (commentText.contains("")) - { - output.add("Warning: " + target.getName() + "\n" + commentText); + if (commentText.contains("")) { + output.add("Warning: " + target.getName() + "\n" + + commentText); } } } } } - - @SuppressWarnings("unchecked") - public void checkTargetsProperties(Project project) - { + + /** + * To check, is the private properties are overridden by customers. + * + * @param project + */ + public void checkTargetsProperties(Project project) { try { - String heliumpath = new File(project.getProperty("helium.dir")).getCanonicalPath(); - com.nokia.helium.ant.data.Database db = new com.nokia.helium.ant.data.Database(project, "private"); + String heliumpath = new File(project.getProperty("helium.dir")) + .getCanonicalPath(); + com.nokia.helium.ant.data.Database db = new com.nokia.helium.ant.data.Database( + project, "private"); ArrayList customerProps = getCustomerProperties(project); - - for (PropertyMeta propertyMeta : db.getProperties()) - { - if (propertyMeta.getLocation().contains(heliumpath) && propertyMeta.getScope().equals("private") && customerProps.contains(propertyMeta.getName())) + + for (PropertyMeta propertyMeta : db.getProperties()) { + if (propertyMeta.getType().equals("boolean")) + { + String value = project.getProperty(propertyMeta.getName()); + if (value != null && !value.equals("true") && !value.equals("false")) + { + output.add("Warning: " + propertyMeta.getName() + " property is boolean type and not set to true or false, value is " + value); + } + } + } + for (PropertyCommentMeta propertyMeta : db.getCommentProperties()) { + if (propertyMeta.getType().equals("boolean")) { - output.add("Warning: " + propertyMeta.getName() + " property has been overridden"); + String value = project.getProperty(propertyMeta.getName()); + if (value != null && !value.equals("true") && !value.equals("false")) + { + output.add("Warning: " + propertyMeta.getName() + " property is boolean type and not set to true or false, value is " + value); + } + } + } + for (PropertyMeta propertyMeta : db.getProperties()) { + if (propertyMeta.getLocation().contains(heliumpath) + && propertyMeta.getScope().equals("private") + && customerProps.contains(propertyMeta.getName())) { + output.add("Warning: " + propertyMeta.getName() + + " property has been overridden"); + } + } + + for (PropertyCommentMeta propertyCommentMeta : db.getCommentProperties()) { + if (propertyCommentMeta.getLocation().contains(heliumpath) + && propertyCommentMeta.getScope().equals("private") + && customerProps + .contains(propertyCommentMeta.getName())) { + output.add("Warning: " + propertyCommentMeta.getName() + + " property has been overridden"); } } - } catch (IOException e) { e.printStackTrace(); } + } catch (IOException e) { + e.printStackTrace(); + } } - + + /** + * To display the warnings for deprecated properties. + * + * @param project + */ + public void checkDeprecatedProperties(Project project) { + try { + String heliumpath = new File(project.getProperty("helium.dir")) + .getCanonicalPath(); + com.nokia.helium.ant.data.Database db = new com.nokia.helium.ant.data.Database( + project, "private"); + ArrayList customerProps = getCustomerProperties(project); + + for (PropertyMeta propertyMeta : db.getProperties()) { + if (propertyMeta.getLocation().contains(heliumpath) + && (!propertyMeta.getDeprecated().equals("")) + && customerProps.contains(propertyMeta.getName())) { + output.add("Warning: " + + propertyMeta.getName() + + " property has been deprecated " + + propertyMeta.getDeprecated() + + "." + + propertyMeta.getSummary().substring( + propertyMeta.getSummary().lastIndexOf( + DEPRECATED) + + DEPRECATED.length())); + } + } + + for (PropertyCommentMeta propertyCommentMeta : db + .getCommentProperties()) { + if (propertyCommentMeta.getLocation().contains(heliumpath) + && (!propertyCommentMeta.getDeprecated().equals("")) + && customerProps + .contains(propertyCommentMeta.getName())) { + output.add("Warning: " + + propertyCommentMeta.getName() + + " property has been deprecated " + + propertyCommentMeta.getDeprecated() + + "." + + propertyCommentMeta.getSummary().substring( + propertyCommentMeta.getSummary() + .lastIndexOf(DEPRECATED) + + DEPRECATED.length())); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + } + @SuppressWarnings("unchecked") - public ArrayList getCustomerProperties(Project project) - { + public ArrayList getCustomerProperties(Project project) { ArrayList props = new ArrayList(); Database db = new Database(null, null, null); try { - String heliumpath = new File(project.getProperty("helium.dir")).getCanonicalPath(); + String heliumpath = new File(project.getProperty("helium.dir")) + .getCanonicalPath(); - for (Object object : db.getAntFiles(project)) - { - String antFile = (String)object; + for (Object object : db.getAntFiles(project)) { + String antFile = (String) object; antFile = new File(antFile).getCanonicalPath(); - if (!antFile.contains(heliumpath)) - { + if (!antFile.contains(heliumpath)) { SAXReader xmlReader = new SAXReader(); Document antDoc = xmlReader.read(new File(antFile)); - - List propertyNodes = antDoc.selectNodes("//property | //param"); - for (Element propertyNode : propertyNodes) - { + + List propertyNodes = antDoc + .selectNodes("//property | //param"); + for (Element propertyNode : propertyNodes) { props.add(propertyNode.attributeValue("name")); } } } } catch (IOException e) { // We are Ignoring the errors as no need to fail the build. - log("IOException: Not able read the Customer Properties " + e.getMessage(), Project.MSG_WARN); + log("IOException: Not able read the Customer Properties " + + e.getMessage(), Project.MSG_WARN); } catch (DocumentException e) { // We are Ignoring the errors as no need to fail the build. - log("DocumentException: Not able read the Customer Properties " + e.getMessage(), Project.MSG_WARN); + log("DocumentException: Not able read the Customer Properties " + + e.getMessage(), Project.MSG_WARN); } - + return props; } - + } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/Database.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/Database.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/Database.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,20 +1,20 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + package com.nokia.ant; import info.bliki.wiki.model.WikiModel; @@ -58,13 +58,11 @@ import org.dom4j.io.SAXReader; import org.dom4j.io.XMLWriter; - /** * Reads the current ant project and a fileset and generates a xml file with a summary of targets, * macros and properties. */ -public class Database -{ +public class Database { private Project project; private ResourceCollection rc; private Task task; @@ -73,9 +71,8 @@ private HashMap> globalSignalList = new HashMap>(); private HashMap map = new HashMap(); private Document signaldoc; - - public Database(Project project, ResourceCollection rc, Task task) - { + + public Database(Project project, ResourceCollection rc, Task task) { this.project = project; this.rc = rc; this.task = task; @@ -97,33 +94,29 @@ public void log(String msg, int level) { if (task != null) { task.log(msg, level); - } else if (debug) { + } + else if (debug) { project.log(msg, level); } } - - public void setRefid(Reference r) - { + public void setRefid(Reference r) { Object object = r.getReferencedObject(); - if (!(object instanceof ResourceCollection)) - { + if (!(object instanceof ResourceCollection)) { throw new BuildException(r.getRefId() + " doesn\'t denote a ResourceCollection"); } rc = (ResourceCollection) object; } public Document createDOM() throws DocumentException, IOException { - //log("Building Ant project database", Project.MSG_DEBUG); + // log("Building Ant project database", Project.MSG_DEBUG); Element root = DocumentHelper.createElement("antDatabase"); Document outDoc = DocumentHelper.createDocument(root); ArrayList antFiles = getAntFiles(getProject(), homeFilesOnly); - for (String antFile : antFiles) - { - readSignals(root, antFile); + for (String antFile : antFiles) { + readSignals(antFile); } - for (String antFile : antFiles) - { + for (String antFile : antFiles) { parseAntFile(root, antFile); } @@ -141,53 +134,53 @@ } XMLWriter out = new XMLWriter(outStream, OutputFormat.createPrettyPrint()); out.write(outDoc); - } catch (DocumentException e) { + } + catch (DocumentException e) { throw new BuildException(e.getMessage()); - } catch (IOException e) { + } + catch (IOException e) { throw new BuildException(e.getMessage()); } } @SuppressWarnings("unchecked") - private void readSignals(Element root, String antFile) throws DocumentException, IOException - { + private void readSignals(String antFile) throws DocumentException, IOException { SAXReader xmlReader = new SAXReader(); Document antDoc = xmlReader.read(new File(antFile)); XPath xpath = DocumentHelper.createXPath("//hlm:signalListenerConfig"); xpath.setNamespaceURIs(map); List signalNodes = xpath.selectNodes(antDoc); - for (Element propertyNode : signalNodes) - { + for (Element propertyNode : signalNodes) { signaldoc = antDoc; String signalid = propertyNode.attributeValue("id"); String signaltarget = propertyNode.attributeValue("target"); List existinglist = globalSignalList.get(signaltarget); String failbuild = signalType(signalid, signaldoc); - if (existinglist == null) + if (existinglist == null) { existinglist = new ArrayList(); + } existinglist.add(signalid + "," + failbuild); globalSignalList.put(signaltarget, existinglist); } } @SuppressWarnings("unchecked") - private String signalType(String signalid, Document antDoc) - { - XPath xpath2 = DocumentHelper.createXPath("//hlm:signalListenerConfig[@id='" + signalid + "']/signalNotifierInput/signalInput"); + private String signalType(String signalid, Document antDoc) { + XPath xpath2 = DocumentHelper.createXPath("//hlm:signalListenerConfig[@id='" + signalid + + "']/signalNotifierInput/signalInput"); xpath2.setNamespaceURIs(map); List signalNodes3 = xpath2.selectNodes(antDoc); - for (Element propertyNode3 : signalNodes3) - { + for (Element propertyNode3 : signalNodes3) { String signalinputid = propertyNode3.attributeValue("refid"); - XPath xpath3 = DocumentHelper.createXPath("//hlm:signalInput[@id='" + signalinputid + "']"); + XPath xpath3 = DocumentHelper.createXPath("//hlm:signalInput[@id='" + signalinputid + + "']"); xpath3.setNamespaceURIs(map); List signalNodes4 = xpath3.selectNodes(antDoc); - for (Element propertyNode4 : signalNodes4) - { + for (Element propertyNode4 : signalNodes4) { return propertyNode4.attributeValue("failbuild"); } } @@ -201,8 +194,7 @@ * @throws IOException */ @SuppressWarnings("unchecked") - private void parseAntFile(Element root, String antFile) throws DocumentException, IOException - { + private void parseAntFile(Element root, String antFile) throws DocumentException, IOException { log("Processing Ant file: " + antFile, Project.MSG_DEBUG); SAXReader xmlReader = new SAXReader(); Document antDoc = xmlReader.read(new File(antFile)); @@ -222,8 +214,7 @@ // descriptionElement.setText(description); - if (!antFile.contains("antlib.xml") && description.equals("")) - { + if (!antFile.contains("antlib.xml") && description.equals("")) { log("Project has no comment: " + projectName, Project.MSG_WARN); } @@ -232,78 +223,67 @@ // Project import statements List importNodes = antDoc.selectNodes("//import"); - for (Iterator iterator = importNodes.iterator(); iterator.hasNext();) - { + for (Iterator iterator = importNodes.iterator(); iterator.hasNext();) { Element importCurrentNode = (Element) iterator.next(); - addTextElement(projectElement, "fileDependency", importCurrentNode - .attributeValue("file")); + addTextElement(projectElement, "fileDependency", importCurrentNode.attributeValue("file")); } projectElement.addElement("pythonDependency"); // Project exec statements List execNodes = antDoc.selectNodes("//exec//arg"); - for (Element argNode : execNodes) - { + for (Element argNode : execNodes) { String argValue = argNode.attributeValue("value"); - if (argValue == null) + if (argValue == null) { argValue = argNode.attributeValue("line"); + } - if (argValue != null) - { + if (argValue != null) { Pattern filePattern = Pattern.compile(".pl|.py|.bat|.xml|.txt"); Matcher fileMatcher = filePattern.matcher(argValue); - if (fileMatcher.find()) - { + if (fileMatcher.find()) { addTextElement(projectElement, "fileDependency", argValue); } } } List targetNodes = antDoc.selectNodes("//target"); - for (Element targetNode : targetNodes) - { + for (Element targetNode : targetNodes) { processTarget(targetNode, projectElement); } // Process macrodef and scriptdef tasks // TODO - maybe scriptdefs should be separate? List macroNodes = antDoc.selectNodes("//macrodef | //scriptdef"); - for (Iterator iterator = macroNodes.iterator(); iterator.hasNext();) - { + for (Iterator iterator = macroNodes.iterator(); iterator.hasNext();) { Element macroNode = (Element) iterator.next(); processMacro(macroNode, projectElement, antFile); } // Project properties List propertyNodes = antDoc.selectNodes("//property"); - for (Iterator iterator = propertyNodes.iterator(); iterator.hasNext();) - { + for (Iterator iterator = propertyNodes.iterator(); iterator.hasNext();) { Element propertyNode = (Element) iterator.next(); processProperty(propertyNode, projectElement); } } - public ArrayList getAntFiles() - { + public ArrayList getAntFiles() { return getAntFiles(getProject(), true); } - public ArrayList getAntFiles(Project project) - { + public ArrayList getAntFiles(Project project) { return getAntFiles(project, true); } /** - * Get the list of all Ant files we want to process. These can be project - * and antlib files. + * Get the list of all Ant files we want to process. These can be project and antlib files. * * @return antFiles a list of ant files to be processed */ @SuppressWarnings("unchecked") - public ArrayList getAntFiles(Project project, boolean homeOnly) - { + public ArrayList getAntFiles(Project project, boolean homeOnly) { ArrayList antFiles = new ArrayList(); Map targets = project.getTargets(); @@ -313,61 +293,54 @@ try { projectHome = new File(project.getProperty("helium.dir")).getCanonicalPath(); - while (targetsIter.hasNext()) - { + while (targetsIter.hasNext()) { Target target = targetsIter.next(); String projectPath = new File(target.getLocation().getFileName()).getCanonicalPath(); - if (!antFiles.contains(projectPath)) - { - if (homeOnly) - { - if (!projectPath.contains(projectHome)) - { + if (!antFiles.contains(projectPath)) { + if (homeOnly) { + if (!projectPath.contains(projectHome)) { antFiles.add(projectPath); } - } - else + } else { antFiles.add(projectPath); - } - } - - if (rc != null) - { - Iterator extraFilesIter = rc.iterator(); - while (extraFilesIter.hasNext()) - { - FileResource fileResource = (FileResource) extraFilesIter.next(); - String extrafile = fileResource.getFile().getCanonicalPath(); - - if (!antFiles.contains(fileResource.toString()) && !fileResource.getFile().getName().startsWith("test_")) - { - if (homeOnly) - { - if (!extrafile.contains(projectHome)) - { - antFiles.add(extrafile); - } - } - else - antFiles.add(extrafile); } } } - } catch (IOException e) { - log(e.getMessage(), Project.MSG_ERR); + if (rc != null) { + Iterator extraFilesIter = rc.iterator(); + while (extraFilesIter.hasNext()) { + FileResource fileResource = (FileResource) extraFilesIter.next(); + String extrafile = fileResource.getFile().getCanonicalPath(); + + if (!antFiles.contains(fileResource.toString()) + && !fileResource.getFile().getName().startsWith("test_")) { + if (homeOnly) { + if (!extrafile.contains(projectHome)) { + antFiles.add(extrafile); + } + } + else { + antFiles.add(extrafile); + } + } + } + } + + } + catch (IOException e) { + log(e.getMessage(), Project.MSG_ERR); e.printStackTrace(); } return antFiles; } - //--------------------------------- PRIVATE METHODS ------------------------------------------ + // --------------------------------- PRIVATE METHODS ------------------------------------------ @SuppressWarnings("unchecked") private void processMacro(Element macroNode, Element outProjectNode, String antFile) - throws IOException, DocumentException - { + throws IOException, DocumentException { String macroName = macroNode.attributeValue("name"); log("Processing macro: " + macroName, Project.MSG_DEBUG); @@ -389,29 +362,31 @@ // TODO - Later we should find the line number from the XML input. addTextElement(outmacroNode, "location", antFile + ":1:"); - List statements = macroNode.selectNodes("//scriptdef[@name='" + macroName + "']/attribute | //macrodef[@name='" + macroName + "']/attribute"); + List statements = macroNode.selectNodes("//scriptdef[@name='" + macroName + + "']/attribute | //macrodef[@name='" + macroName + "']/attribute"); String usage = ""; - for (Node statement : statements) - { + for (Node statement : statements) { String defaultval = statement.valueOf("@default"); - if (defaultval.equals("")) + if (defaultval.equals("")) { defaultval = "value"; - else + } else { defaultval = "" + defaultval + ""; + } usage = usage + " " + statement.valueOf("@name") + "=\"" + defaultval + "\""; } String macroElements = ""; - statements = macroNode.selectNodes("//scriptdef[@name='" + macroName + "']/element | //macrodef[@name='" + macroName + "']/element"); - for (Node statement : statements) - { + statements = macroNode.selectNodes("//scriptdef[@name='" + macroName + + "']/element | //macrodef[@name='" + macroName + "']/element"); + for (Node statement : statements) { macroElements = "<" + statement.valueOf("@name") + "/>\n" + macroElements; } - if (macroElements.equals("")) + if (macroElements.equals("")) { addTextElement(outmacroNode, "usage", "<hlm:" + macroName + " " + usage + "/>"); - else - addTextElement(outmacroNode, "usage", "<hlm:" + macroName + " " + usage + ">\n" + macroElements + "</hlm:" + macroName + ">"); - + } else { + addTextElement(outmacroNode, "usage", "<hlm:" + macroName + " " + usage + ">\n" + + macroElements + "</hlm:" + macroName + ">"); + } // Add dependencies // Enumeration dependencies = antmacro.getDependencies(); @@ -423,53 +398,45 @@ // dependencyElement.addAttribute("type","direct"); // } - callAntTargetVisitor(macroNode, outmacroNode, outProjectNode); + callAntTargetVisitor(macroNode, outmacroNode); // Add documentation // Get comment element before the macro element to extract macro doc List children = macroNode.selectNodes("preceding-sibling::node()"); - if (children.size() > 0) - { + if (children.size() > 0) { // Scan past the text nodes, which are most likely whitespace int index = children.size() - 1; Node child = (Node) children.get(index); - while (index > 0 && child.getNodeType() == Node.TEXT_NODE) - { + while (index > 0 && child.getNodeType() == Node.TEXT_NODE) { index--; child = (Node) children.get(index); } // Check if there is a comment node String commentText = null; - if (child.getNodeType() == Node.COMMENT_NODE) - { + if (child.getNodeType() == Node.COMMENT_NODE) { Comment macroComment = (Comment) child; commentText = macroComment.getStringValue().trim(); log(macroName + " comment: " + commentText, Project.MSG_DEBUG); } - else - { + else { log("Macro has no comment: " + macroName, Project.MSG_WARN); } insertDocumentation(outmacroNode, commentText); - - Node previousNode = children.get(children.size() - 1); } // Get names of all properties used in this macro ArrayList properties = new ArrayList(); Visitor visitor = new AntPropertyVisitor(properties); macroNode.accept(visitor); - for (Iterator iterator = properties.iterator(); iterator.hasNext();) - { + for (Iterator iterator = properties.iterator(); iterator.hasNext();) { String property = (String) iterator.next(); addTextElement(outmacroNode, "propertyDependency", property); } } - private void callAntTargetVisitor(Element targetNode, Element outTargetNode, Element outProjectNode) - { + private void callAntTargetVisitor(Element targetNode, Element outTargetNode) { // Add antcall/runtarget dependencies ArrayList antcallTargets = new ArrayList(); ArrayList logs = new ArrayList(); @@ -477,34 +444,31 @@ ArrayList executables = new ArrayList(); Visitor visitorTarget = new AntTargetVisitor(antcallTargets, logs, signals, executables); targetNode.accept(visitorTarget); - for (String antcallTarget : antcallTargets) - { + for (String antcallTarget : antcallTargets) { Element dependencyElement = addTextElement(outTargetNode, "dependency", antcallTarget); dependencyElement.addAttribute("type", "exec"); } - for (String log : logs) - { + for (String log : logs) { addTextElement(outTargetNode, "log", log); } - if (globalSignalList.get(targetNode.attributeValue("name")) != null) + if (globalSignalList.get(targetNode.attributeValue("name")) != null) { signals.addAll(globalSignalList.get(targetNode.attributeValue("name"))); + } - for (String signal : signals) - { + for (String signal : signals) { addTextElement(outTargetNode, "signal", signal); } - for (String executable : executables) - { + for (String executable : executables) { addTextElement(outTargetNode, "executable", executable); } } @SuppressWarnings("unchecked") - private void processTarget(Element targetNode, Element outProjectNode) throws IOException, DocumentException - { + private void processTarget(Element targetNode, Element outProjectNode) throws IOException, + DocumentException { String targetName = targetNode.attributeValue("name"); log("Processing target: " + targetName, Project.MSG_DEBUG); @@ -512,35 +476,28 @@ // Get comment element before the target element to extract target doc String commentText = ""; List children = targetNode.selectNodes("preceding-sibling::node()"); - if (children.size() > 0) - { + if (children.size() > 0) { // Scan past the text nodes, which are most likely whitespace int index = children.size() - 1; Node child = children.get(index); - while (index > 0 && child.getNodeType() == Node.TEXT_NODE) - { + while (index > 0 && child.getNodeType() == Node.TEXT_NODE) { index--; child = (Node) children.get(index); } // Check if there is a comment node - if (child.getNodeType() == Node.COMMENT_NODE) - { + if (child.getNodeType() == Node.COMMENT_NODE) { Comment targetComment = (Comment) child; commentText = targetComment.getStringValue().trim(); log(targetName + " comment: " + commentText, Project.MSG_DEBUG); } - else - { + else { log("Target has no comment: " + targetName, Project.MSG_WARN); } - - Node previousNode = children.get(children.size() - 1); } - if (!commentText.contains("Private:")) - { + if (!commentText.contains("Private:")) { Element outTargetNode = outProjectNode.addElement("target"); addTextElement(outTargetNode, "name", targetNode.attributeValue("name")); @@ -553,21 +510,21 @@ Project project = getProject(); Target antTarget = (Target) project.getTargets().get(targetName); - if (antTarget == null) + if (antTarget == null) { return; + } addTextElement(outTargetNode, "location", antTarget.getLocation().toString()); // Add dependencies Enumeration dependencies = antTarget.getDependencies(); - while (dependencies.hasMoreElements()) - { + while (dependencies.hasMoreElements()) { String dependency = (String) dependencies.nextElement(); Element dependencyElement = addTextElement(outTargetNode, "dependency", dependency); dependencyElement.addAttribute("type", "direct"); } - callAntTargetVisitor(targetNode, outTargetNode, outProjectNode); + callAntTargetVisitor(targetNode, outTargetNode); // Process the comment text as MediaWiki syntax and convert to HTML insertDocumentation(outTargetNode, commentText); @@ -576,8 +533,7 @@ ArrayList properties = new ArrayList(); Visitor visitor = new AntPropertyVisitor(properties); targetNode.accept(visitor); - for (Iterator iterator = properties.iterator(); iterator.hasNext();) - { + for (Iterator iterator = properties.iterator(); iterator.hasNext();) { String property = (String) iterator.next(); addTextElement(outTargetNode, "propertyDependency", property); } @@ -591,48 +547,45 @@ } } - private void processProperty(Element propertyNode, Element outProjectNode) throws IOException - { + private void processProperty(Element propertyNode, Element outProjectNode) throws IOException { String propertyName = propertyNode.attributeValue("name"); log("Processing Property: " + propertyName, Project.MSG_DEBUG); Element outPropertyNode = outProjectNode.addElement("property"); addTextElement(outPropertyNode, "name", propertyNode.attributeValue("name")); - if (propertyNode.attributeValue("value") == null) - { + if (propertyNode.attributeValue("value") == null) { addTextElement(outPropertyNode, "defaultValue", propertyNode.attributeValue("location")); } - else - { + else { addTextElement(outPropertyNode, "defaultValue", propertyNode.attributeValue("value")); } } - private void insertDocumentation(Element outNode, String commentText) throws IOException, DocumentException - { - if (commentText != null) - { + private void insertDocumentation(Element outNode, String commentText) throws IOException, + DocumentException { + if (commentText != null) { WikiModel wikiModel = new WikiModel("", ""); - if (!commentText.contains("
    ") && (commentText.contains("**") || commentText.contains("==") || commentText.contains("- -"))) - { + if (!commentText.contains("
  • ") + && (commentText.contains("**") || commentText.contains("==") || commentText.contains("- -"))) { commentText = commentText.replace("**", "").replace("==", "").replace("- -", "").trim(); log("Warning: Comment code has invalid syntax: " + commentText, Project.MSG_WARN); } - if (commentText.startsWith("-")) + if (commentText.startsWith("-")) { commentText = commentText.replace("-", ""); + } commentText = commentText.trim(); String commentTextCheck = commentText.replace("deprecated>", "").replace("tt>", "").replace("todo>", ""); - if (commentTextCheck.contains(">") && !commentTextCheck.contains("
    ")) + if (commentTextCheck.contains(">") && !commentTextCheck.contains("
    ")) { log("Warning: Comment code needs
     tags around it: " + commentText, Project.MSG_WARN);
    +            }
     
                 commentText = filterTextNewlines(commentText);
                 commentText = wikiModel.render(commentText);
     
                 // If  tag exists in the comment, then parse the
                 // deprecated message.
    -            if (commentText.indexOf("<deprecated>") != -1)
    -            {
    +            if (commentText.indexOf("<deprecated>") != -1) {
                     int deprecatedMsgStart = commentText.indexOf("<deprecated>") + 20;
                     int deprecatedMsgEnd = commentText.indexOf("</deprecated>");
     
    @@ -643,55 +596,45 @@
                     // remove  part from description field.
                     int commentTextLength = commentText.length();
                     String documentationMsgStart = commentText.substring(1, deprecatedMsgStart - 20);
    -                String documentationMsgEnd = commentText.substring(deprecatedMsgEnd + 21,
    -                        commentTextLength);
    +                String documentationMsgEnd = commentText.substring(deprecatedMsgEnd + 21, commentTextLength);
                     String documentationMsg = documentationMsgStart.concat(documentationMsgEnd);
                     commentText = documentationMsg.trim();
                 }
             }
    -        else
    -        {
    +        else {
                 commentText = "";
             }
             // Get the documentation element as a document
    -        String documentationText = "" + commentText +
    -                                 "";
    +        String documentationText = "" + commentText + "";
             Document docDoc = DocumentHelper.parseText(documentationText);
             outNode.add(docDoc.getRootElement());
             log("HTML comment: " + commentText, Project.MSG_DEBUG);
         }
     
    -    private Element addTextElement(Element parent, String name, String text)
    -    {
    +    private Element addTextElement(Element parent, String name, String text) {
             Element element = addTextElement(parent, name, text, false);
     
             return element;
         }
     
    -    private Element addTextElement(Element parent, String name, String text, boolean escape)
    -    {
    +    private Element addTextElement(Element parent, String name, String text, boolean escape) {
             Element element = parent.addElement(name);
    -        if (text != null)
    -        {
    -            if (escape)
    -            {
    +        if (text != null) {
    +            if (escape) {
                     element.addCDATA(text);
                 }
    -            else
    -            {
    +            else {
                     element.setText(text);
                 }
             }
             return element;
         }
     
    -    private String filterTextNewlines(String text) throws IOException
    -    {
    +    private String filterTextNewlines(String text) throws IOException {
             BufferedReader in = new BufferedReader(new StringReader(text));
             StringBuilder out = new StringBuilder();
             String line = in.readLine();
    -        while (line != null)
    -        {
    +        while (line != null) {
                 out.append(line.trim());
                 out.append("\n");
                 line = in.readLine();
    @@ -705,20 +648,19 @@
          * @param outProjectNode
          * @throws IOException
          */
    -    private void buildTaskDefs( Element root ) throws DocumentException, IOException
    -    {
    +    private void buildTaskDefs(Element root) throws DocumentException, IOException {
             Element projectElement = root.addElement("project");
             projectElement.addElement("name");
             insertDocumentation(projectElement, "");
    -        HashMap < String, String > tasks = getHeliumAntTasks();
    +        HashMap tasks = getHeliumAntTasks();
     
    -        for ( String taskName : tasks.keySet() ) {
    -            String className = tasks.get( taskName );
    +        for (String taskName : tasks.keySet()) {
    +            String className = tasks.get(taskName);
                 log("Processing TaskDef: " + taskName, Project.MSG_DEBUG);
     
                 Element outTaskDefNode = projectElement.addElement("taskdef");
    -            addTextElement( outTaskDefNode, "name", taskName );
    -            addTextElement( outTaskDefNode, "classname",  className );
    +            addTextElement(outTaskDefNode, "name", taskName);
    +            addTextElement(outTaskDefNode, "classname", className);
             }
         }
     
    @@ -728,31 +670,31 @@
          * @return
          */
         @SuppressWarnings("unchecked")
    -    private HashMap < String, String > getHeliumAntTasks() {
    +    private HashMap getHeliumAntTasks() {
     
             // 1. Get all the task definitions from the project
    -        Hashtable  > allTaskdefs = getProject().getTaskDefinitions();
    +        Hashtable> allTaskdefs = getProject().getTaskDefinitions();
             // 2. Filter the list by applying criteria
    -        return filterTasks( allTaskdefs );
    +        return filterTasks(allTaskdefs);
         }
     
         /**
    -     * Method is used to filter tasks. 
    +     * Method is used to filter tasks.
          * 
          * @param allTaskdefs
          * @param criteria
          */
    -    private HashMap < String, String > filterTasks( Hashtable > allTaskdefs ) {
    -        HashMap  tasks = new HashMap ();
    +    private HashMap filterTasks(Hashtable> allTaskdefs) {
    +        HashMap tasks = new HashMap();
     
    -        Enumeration  taskdefsenum = allTaskdefs.keys();
    -        while ( taskdefsenum.hasMoreElements() ) {
    +        Enumeration taskdefsenum = allTaskdefs.keys();
    +        while (taskdefsenum.hasMoreElements()) {
                 String key = taskdefsenum.nextElement();
                 Class clazz = allTaskdefs.get(key);
                 String className = clazz.getName();
    -            if ( key.contains("nokia.com") && className.startsWith("com.nokia") && 
    -                    className.contains("ant.taskdefs") ) {
    -                tasks.put( getTaskName( key ), clazz.getName() );
    +            if (key.contains("nokia.com") && className.startsWith("com.nokia")
    +                && className.contains("ant.taskdefs")) {
    +                tasks.put(getTaskName(key), clazz.getName());
                 }
             }
             return tasks;
    @@ -764,63 +706,52 @@
          * @param text
          * @return
          */
    -    private String getTaskName( String text ) {
    +    private String getTaskName(String text) {
             int lastIndex = text.lastIndexOf(':');
    -        return text.substring( lastIndex + 1 );
    +        return text.substring(lastIndex + 1);
         }
     
    -    //----------------------------------- PRIVATE CLASSES -----------------------------------------
    +    // ----------------------------------- PRIVATE CLASSES -----------------------------------------
     
    -    private class AntPropertyVisitor extends VisitorSupport
    -    {
    +    private class AntPropertyVisitor extends VisitorSupport {
             private List propertyList;
     
    -        public AntPropertyVisitor(List propertyList)
    -        {
    +        public AntPropertyVisitor(List propertyList) {
                 this.propertyList = propertyList;
             }
     
    -        public void visit(Attribute node)
    -        {
    +        public void visit(Attribute node) {
                 String text = node.getStringValue();
                 extractUsedProperties(text);
             }
     
    -        public void visit(CDATA node)
    -        {
    +        public void visit(CDATA node) {
                 String text = node.getText();
                 extractUsedProperties(text);
             }
     
    -        public void visit(Text node)
    -        {
    +        public void visit(Text node) {
                 String text = node.getText();
                 extractUsedProperties(text);
             }
     
    -        public void visit(Element node)
    -        {
    -            if (node.getName().equals("property"))
    -            {
    +        public void visit(Element node) {
    +            if (node.getName().equals("property")) {
                     String propertyName = node.attributeValue("name");
    -                if (!propertyList.contains(propertyName))
    -                {
    +                if (!propertyList.contains(propertyName)) {
                         propertyList.add(propertyName);
                         log("property matches :" + propertyName, Project.MSG_DEBUG);
                     }
                 }
             }
     
    -        private void extractUsedProperties(String text)
    -        {
    +        private void extractUsedProperties(String text) {
                 Pattern p1 = Pattern.compile("\\$\\{([^@$}]*)\\}");
                 Matcher m1 = p1.matcher(text);
                 log(text, Project.MSG_DEBUG);
    -            while (m1.find())
    -            {
    +            while (m1.find()) {
                     String group = m1.group(1);
    -                if (!propertyList.contains(group))
    -                {
    +                if (!propertyList.contains(group)) {
                         propertyList.add(group);
                     }
                     log("property matches: " + group, Project.MSG_DEBUG);
    @@ -829,11 +760,9 @@
                 Pattern p2 = Pattern.compile("\\$\\{([^\n]*\\})\\}");
                 Matcher m2 = p2.matcher(text);
                 log(text, Project.MSG_DEBUG);
    -            while (m2.find())
    -            {
    +            while (m2.find()) {
                     String group = m2.group(1);
    -                if (!propertyList.contains(group))
    -                {
    +                if (!propertyList.contains(group)) {
                         propertyList.add(group);
                     }
                     log("property matches: " + group, Project.MSG_DEBUG);
    @@ -842,11 +771,9 @@
                 Pattern p3 = Pattern.compile("\\$\\{(\\@\\{[^\n]*)\\}");
                 Matcher m3 = p3.matcher(text);
                 log(text, Project.MSG_DEBUG);
    -            while (m3.find())
    -            {
    +            while (m3.find()) {
                     String group = m3.group(1);
    -                if (!propertyList.contains(group))
    -                {
    +                if (!propertyList.contains(group)) {
                         propertyList.add(group);
                     }
                     log("property matches: " + group, Project.MSG_DEBUG);
    @@ -854,32 +781,28 @@
             }
         }
     
    -    private class AntTargetVisitor extends VisitorSupport
    -    {
    +    private class AntTargetVisitor extends VisitorSupport {
             private List targetList;
             private List logList;
             private List signalList;
             private List executableList;
     
    -        public AntTargetVisitor(List targetList, List logList, List signalList, List executableList)
    -        {
    +        public AntTargetVisitor(List targetList, List logList,
    +            List signalList, List executableList) {
                 this.targetList = targetList;
                 this.logList = logList;
                 this.signalList = signalList;
                 this.executableList = executableList;
             }
     
    -        public void visit(Element node)
    -        {
    +        public void visit(Element node) {
                 String name = node.getName();
    -            if (name.equals("antcall") || name.equals("runtarget"))
    -            {
    +            if (name.equals("antcall") || name.equals("runtarget")) {
                     String text = node.attributeValue("target");
                     extractTarget(text);
                 }
     
    -            if (!name.equals("include") && !name.equals("exclude"))
    -            {
    +            if (!name.equals("include") && !name.equals("exclude")) {
                     String text = node.attributeValue("name");
                     addLog(text);
                     text = node.attributeValue("output");
    @@ -894,37 +817,32 @@
                     addLog(text);
                 }
     
    -            if (name.equals("signal") || name.equals("execSignal"))
    -            {
    +            if (name.equals("signal") || name.equals("execSignal")) {
                     String signalid = getProject().replaceProperties(node.attributeValue("name"));
                     String failbuild = signalType(signalid, signaldoc);
     
    -                if (signalList != null)
    -                {
    -                    if (failbuild != null)
    +                if (signalList != null) {
    +                    if (failbuild != null) {
                             signalList.add(signalid + "," + failbuild);
    -                    else
    +                    } else {
                             signalList.add(signalid);
    +                    }
                     }
                 }
     
    -            if (name.equals("exec") || name.equals("preset.exec"))
    -            {
    +            if (name.equals("exec") || name.equals("preset.exec")) {
                     String text = node.attributeValue("executable");
                     executableList.add(text);
                     log("Executable: " + text, Project.MSG_DEBUG);
                 }
             }
     
    -        private void addLog(String text)
    -        {
    -            if (text != null && logList != null)
    -            {
    -                for (String log : text.split(" "))
    -                {
    +        private void addLog(String text) {
    +            if (text != null && logList != null) {
    +                for (String log : text.split(" ")) {
                         String fulllogname = getProject().replaceProperties(log);
    -                    if (!logList.contains(log) && (fulllogname.endsWith(".log") || fulllogname.endsWith(".html")))
    -                    {
    +                    if (!logList.contains(log)
    +                        && (fulllogname.endsWith(".log") || fulllogname.endsWith(".html"))) {
                             log = log.replace("--log=", "");
                             logList.add(log);
                         }
    @@ -932,12 +850,10 @@
                 }
             }
     
    -        private void extractTarget(String text)
    -        {
    +        private void extractTarget(String text) {
                 String iText = getProject().replaceProperties(text);
                 targetList.add(iText);
             }
     
         }
     }
    -
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/HeliumLogger.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/HeliumLogger.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/HeliumLogger.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -44,9 +44,11 @@
     public class HeliumLogger extends DefaultLogger {
     
         private static boolean stopLogToConsole;
    +    private static final String INTERNALPROPERTY = "internal.";
     
         private Project project;
         private Logger log = Logger.getLogger(this.getClass());
    +    
     
     
         /**
    @@ -78,13 +80,28 @@
             /**if the target is not going to execute (due to 'if' or 'unless' conditions) 
             print a message telling the user why it is not going to execute**/
             if (!testIfCondition(ifCondition) && ifCondition != null) {
    -            project.log("Skipped because property '"
    -                + project.replaceProperties(ifCondition)
    -                + "' not set.", Project.MSG_INFO);
    +            if (ifCondition.startsWith(INTERNALPROPERTY)) {
    +                String enableProperty = ifCondition.substring(INTERNALPROPERTY.length());
    +                project.log("Skipped because property '"
    +                        + enableProperty
    +                        + "' not set to 'true'.", Project.MSG_INFO);
    +            } else {
    +                project.log("Skipped because property '"
    +                        + project.replaceProperties(ifCondition)
    +                        + "' is not set.", Project.MSG_INFO);
    +            }
    +            
             } else if (!testUnlessCondition(unlessCondition) && unlessCondition != null) {
    -            project.log("Skipped because property '"
    -                + project.replaceProperties(unlessCondition)
    -                + "' set.", Project.MSG_INFO);
    +            if (unlessCondition.startsWith(INTERNALPROPERTY)) {
    +                String enableProperty = unlessCondition.substring(INTERNALPROPERTY.length());
    +                project.log("Skipped because property '"
    +                        + enableProperty
    +                        + "' is set.", Project.MSG_INFO);
    +            } else {
    +                project.log("Skipped because property '"
    +                        + project.replaceProperties(unlessCondition)
    +                        + "' set.", Project.MSG_INFO);
    +            }
             }
         }
     
    @@ -129,17 +146,18 @@
          * See if build needs a final cleanup target to be called.
          */
         private void cleanup() {
    -        String loggingoutputfile = project.getProperty("logging.output.file");
    -        if (loggingoutputfile != null) {
    -            File file = new File(loggingoutputfile);
    -            if (file.exists()) {
    -                file.delete();
    +        if (project != null) {
    +            String loggingoutputfile = project.getProperty("logging.output.file");
    +            if (loggingoutputfile != null) {
    +                File file = new File(loggingoutputfile);
    +                if (file.exists()) {
    +                    file.delete();
    +                }
                 }
    -        }
    -
    -        if ((project.getProperty("call.cleanup") != null)
    -                && (project.getProperty("call.cleanup").equals("yes"))) {
    -            project.executeTarget("cleanup-all");
    +            if ((project.getProperty("call.cleanup") != null)
    +                    && (project.getProperty("call.cleanup").equals("yes"))) {
    +                project.executeTarget("cleanup-all");
    +            }
             }
         }
     
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/HelpDef.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/HelpDef.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/HelpDef.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,110 +1,72 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.ant;
     
     import java.util.Iterator;
     
    -import org.apache.tools.ant.BuildEvent;
    -import org.apache.tools.ant.Project;
    -import com.nokia.helium.core.ant.types.*;
    -
     import org.apache.tools.ant.BuildListener;
     import org.apache.tools.ant.BuildLogger;
    +import org.apache.tools.ant.Project;
    +import org.apache.tools.ant.types.DataType;
    +
    +import com.nokia.helium.core.ant.PostBuildAction;
     
     /**
      * 
      */
    -public class HelpDef extends HlmPostDefImpl
    -{
    +public class HelpDef extends DataType implements PostBuildAction {
     
         /**
          * 
    -     * @param project
    -     *            Object of the project
    -     * @param targetNames
    -     *            Array of target names to execute
    +     * @param project Object of the project
    +     * @param targetNames Array of target names to execute
          * 
          */
    -    public void execute(Project project, String module, String[] targetNames)
    -    {
    +    public void executeOnPostBuild(Project project, String[] targetNames) {
             String firstTarget;
    -
             // take target
    -        if (targetNames != null && targetNames.length > 0)
    -        {
    +        if (targetNames != null && targetNames.length > 0) {
                 firstTarget = targetNames[0];
             }
    -        else
             // no target, so set the default one
    -        {
    +        else {
                 firstTarget = "help";
             }
     
             // If 'help' target is called, just run that and set other
             // target names as a property
    -        if (firstTarget.equals("help"))
    -        {
    +        if (firstTarget.equals("help")) {
                 displayHelp(project, targetNames, firstTarget);
             }
    -        
    -        project.addBuildListener(new UnsubstListener());
         }
     
    -    class UnsubstListener implements BuildListener {
    -        public void buildFinished(BuildEvent event) {
    -            Project project = event.getProject();
    -            String drivenotdef = project.getProperty("build.drive.notdefined");
    -            if (System.getProperty("os.name").toLowerCase().startsWith("win") && drivenotdef != null && drivenotdef.equals("true"))
    -            {
    -                String drive = project.getProperty("build.drive");
    -                try {
    -                    if (drive != null) {
    -                        Runtime.getRuntime().exec("subst /d " + drive);
    -                    }
    -                } catch (java.io.IOException e) {
    -                    e = null; // ignoring the error
    -                }
    -            }
    +    @SuppressWarnings("unchecked")
    +    private void displayHelp(Project project, String[] targetNames, String firstTarget) {
    +        if (targetNames.length > 1) {
    +            project.setProperty("help.item", targetNames[1]);
             }
    -        
    -        public void buildStarted(BuildEvent event) { }
    -        public void targetStarted(BuildEvent event) { }
    -        public void targetFinished(BuildEvent event) { }
    -        public void taskStarted(BuildEvent event) { }
    -        public void taskFinished(BuildEvent event) { }
    -        public void messageLogged(BuildEvent event) { }
    -    }
     
    -    private void displayHelp(Project project, String[] targetNames, String firstTarget)
    -    {
    -        if (targetNames.length > 1)
    -        {
    -            project.setProperty("help.target", targetNames[1]);
    -        }
    -        
             // Set Emacs mode to true for all listeners, so that help text does
             // not have [echo] at the start of each line
             Iterator iter = project.getBuildListeners().iterator();
    -        while (iter.hasNext())
    -        {
    +        while (iter.hasNext()) {
                 BuildListener listener = (BuildListener) iter.next();
    -            if (listener instanceof BuildLogger)
    -            {
    +            if (listener instanceof BuildLogger) {
                     BuildLogger logger = (BuildLogger) listener;
                     logger.setEmacsMode(true);
                 }
    @@ -113,5 +75,4 @@
             // Run the 'help' target
             project.executeTarget(firstTarget);
         }
    -
     }
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/ModelPropertiesParser.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/ModelPropertiesParser.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/ModelPropertiesParser.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,20 +1,20 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.ant;
     
     import info.bliki.wiki.model.WikiModel;
    @@ -27,99 +27,98 @@
     import java.util.Iterator;
     import java.util.List;
     
    +import org.apache.log4j.Logger;
     import org.dom4j.Document;
     import org.dom4j.DocumentException;
     import org.dom4j.Element;
     import org.dom4j.io.OutputFormat;
     import org.dom4j.io.SAXReader;
     import org.dom4j.io.XMLWriter;
    -import org.apache.log4j.Logger;
    -
     
     /**
      * Renders model property and group description to Wiki Model Syntax
    + * 
      * @author Helium Team
      */
    -public class ModelPropertiesParser
    -{
    +public class ModelPropertiesParser {
         private File inputPath;
         private File outputPath;
         private Document doc;
         private Logger log = Logger.getLogger(ModelPropertiesParser.class);
    -    
    -    public ModelPropertiesParser(File inputPath, File outputPath)
    -    {
    +
    +    public ModelPropertiesParser(File inputPath, File outputPath) {
             this.inputPath = inputPath;
             this.outputPath = outputPath;
         }
     
         /**
          * Reads model xml file, changes description format.
    +     * 
          * @throws DocumentException
          * @throws IOException
          */
    -    public void parsePropertiesDescription() throws IOException, DocumentException
    -    {
    +    public void parsePropertiesDescription() throws IOException, DocumentException {
             SAXReader xmlReader = new SAXReader();
             doc = xmlReader.read(inputPath);
             List importNodes = doc.selectNodes("//description");
    -        for (Iterator iterator = importNodes.iterator(); iterator.hasNext();)
    -        {
    +        for (Iterator iterator = importNodes.iterator(); iterator.hasNext();) {
                 Element importCurrentNode = (Element) iterator.next();
                 importCurrentNode.setText(renderWikiModel(importCurrentNode.getText()));
                 writeXMLFile();
             }
         }
    -    
    -     /**
    +
    +    /**
          * Writes Document object as xml file
          */
    -    private void writeXMLFile()
    -    {
    +    private void writeXMLFile() {
             try {
                 if (outputPath != null) {
    -            XMLWriter out = new XMLWriter(new FileOutputStream(outputPath), OutputFormat.createPrettyPrint());
    -            out.write(doc);
    -          }
    -        } catch (FileNotFoundException  e) {
    -            //We are Ignoring the errors as no need to fail the build.
    +                XMLWriter out = new XMLWriter(new FileOutputStream(outputPath), OutputFormat.createPrettyPrint());
    +                out.write(doc);
    +            }
    +        }
    +        catch (FileNotFoundException e) {
    +            // We are Ignoring the errors as no need to fail the build.
                 log.debug("Not able to write into XML Document " + e.getMessage());
    -        } catch (UnsupportedEncodingException e) {
    -            //We are Ignoring the errors as no need to fail the build.
    +        }
    +        catch (UnsupportedEncodingException e) {
    +            // We are Ignoring the errors as no need to fail the build.
                 log.debug("Not able to write into XML Document " + e.getMessage());
    -        } catch (IOException e) {
    -            //We are Ignoring the errors as no need to fail the build.
    +        }
    +        catch (IOException e) {
    +            // We are Ignoring the errors as no need to fail the build.
                 log.debug("Not able to write into XML Document " + e.getMessage());
             }
         }
    -    
    -     /**
    +
    +    /**
          * Render the description as Wiki model
    +     * 
          * @param String descriptionText
          * @return String
          */
    -    private String renderWikiModel(String descriptionText) throws IOException, DocumentException
    -    {
    -        if (descriptionText != null)
    -        {
    +    private String renderWikiModel(String descriptionText) throws IOException, DocumentException {
    +        if (descriptionText != null) {
                 WikiModel wikiModel = new WikiModel("", "");
    -            //If description contains unwanted symbols like "**", "==" and "- -", remove those from description.
    -            if (descriptionText.contains("**") || descriptionText.contains("==") || descriptionText.contains("- -"))
    -            {
    +            // If description contains unwanted symbols like "**", "==" and "- -", remove those from
    +            // description.
    +            if (descriptionText.contains("**") || descriptionText.contains("==")
    +                || descriptionText.contains("- -")) {
                     descriptionText = descriptionText.replace("**", "").replace("==", "").replace("- -", "").trim();
                 }
    -            //If description starts with "-", remove it. As wiki have special meaning for this symbol
    -            if (descriptionText.startsWith("-"))
    +            // If description starts with "-", remove it. As wiki have special meaning for this
    +            // symbol
    +            if (descriptionText.startsWith("-")) {
                     descriptionText = descriptionText.replace("-", "");
    +            }
                 descriptionText = descriptionText.trim();
    -            //Render description with wiki model syntax
    +            // Render description with wiki model syntax
                 descriptionText = wikiModel.render(descriptionText);
             }
    -        else
    -        {
    +        else {
                 descriptionText = "";
             }
    -      return descriptionText;
    -     }
    +        return descriptionText;
    +    }
     }
    -
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/TypedefURIFix.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/TypedefURIFix.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/TypedefURIFix.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -24,19 +24,25 @@
     import java.io.File;
     import java.io.IOException;
     import java.io.InputStream;
    +import java.net.MalformedURLException;
     import java.net.URL;
    -import java.net.MalformedURLException;
    +import java.util.Enumeration;
    +import java.util.HashMap;
    +import java.util.Locale;
     import java.util.Map;
    -import java.util.HashMap;
    -import java.util.Enumeration;
    -import java.util.Locale;
     import java.util.NoSuchElementException;
     import java.util.Properties;
     
    -import org.apache.tools.ant.*;
    -import org.apache.tools.ant.taskdefs.*;
    +import org.apache.tools.ant.AntTypeDefinition;
    +import org.apache.tools.ant.BuildException;
    +import org.apache.tools.ant.ComponentHelper;
    +import org.apache.tools.ant.Location;
    +import org.apache.tools.ant.MagicNames;
    +import org.apache.tools.ant.Project;
    +import org.apache.tools.ant.ProjectHelper;
    +import org.apache.tools.ant.taskdefs.Definer;
    +import org.apache.tools.ant.types.EnumeratedAttribute;
     import org.apache.tools.ant.util.FileUtils;
    -import org.apache.tools.ant.types.EnumeratedAttribute;
     
     /**
      * Base class for Taskdef and Typedef - handles all
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/XmlLogger.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/XmlLogger.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/XmlLogger.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,20 +1,20 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.ant;
     
     import java.io.FileOutputStream;
    @@ -23,63 +23,58 @@
     import java.io.OutputStreamWriter;
     import java.io.PrintStream;
     import java.io.Writer;
    +import java.util.Enumeration;
     import java.util.Hashtable;
     import java.util.Stack;
    -import java.util.Enumeration;
    +
     import javax.xml.parsers.DocumentBuilder;
     import javax.xml.parsers.DocumentBuilderFactory;
     import javax.xml.parsers.ParserConfigurationException;
    +
    +import org.apache.tools.ant.BuildEvent;
    +import org.apache.tools.ant.BuildException;
    +import org.apache.tools.ant.BuildLogger;
    +import org.apache.tools.ant.Project;
    +import org.apache.tools.ant.Target;
    +import org.apache.tools.ant.Task;
    +import org.apache.tools.ant.UnknownElement;
     import org.apache.tools.ant.util.DOMElementWriter;
    +import org.apache.tools.ant.util.DateUtils;
     import org.apache.tools.ant.util.StringUtils;
    -import org.apache.tools.ant.*;
    -import org.apache.tools.ant.util.DateUtils;
     import org.w3c.dom.Document;
     import org.w3c.dom.Element;
     import org.w3c.dom.Text;
     
     /**
    - * Generates a file in the current directory with
    - * an XML description of what happened during a build.
    - * The default filename is "log.xml", but this can be overridden
    - * with the property XmlLogger.file.
    - *
    - * This implementation assumes in its sanity checking that only one
    - * thread runs a particular target/task at a time. This is enforced
    - * by the way that parallel builds and antcalls are done - and
    - * indeed all but the simplest of tasks could run into problems
    - * if executed in parallel.
    - *
    - * @see Project#addBuildListener(BuildListener)
    + * Generates a file in the current directory with an XML description of what happened during a
    + * build. The default filename is "log.xml", but this can be overridden with the property
    + * XmlLogger.file.
    + * 
    + * This implementation assumes in its sanity checking that only one thread runs a particular
    + * target/task at a time. This is enforced by the way that parallel builds and antcalls are done -
    + * and indeed all but the simplest of tasks could run into problems if executed in parallel.
      */
     public class XmlLogger implements BuildLogger {
     
         /** XML element name for a build. */
         private static final String BUILD_TAG = "build";
    -    /** XML element name for a target. */
    -    private static final String TARGET_TAG = "target";
    -    /** XML element name for a task. */
    -    private static final String TASK_TAG = "task";
         /** XML element name for a message. */
         private static final String MESSAGE_TAG = "message";
    -    /** XML attribute name for a name. */
    -    private static final String NAME_ATTR = "name";
         /** XML attribute name for a time. */
         private static final String TIME_ATTR = "time";
         /** XML attribute name for a message priority. */
         private static final String PRIORITY_ATTR = "priority";
    -    /** XML attribute name for a file location. */
    -    private static final String LOCATION_ATTR = "location";
         /** XML attribute name for an error description. */
         private static final String ERROR_ATTR = "error";
         /** XML element name for a stack trace. */
         private static final String STACKTRACE_TAG = "stacktrace";
    -    
    +
         /** DocumentBuilder to use when creating the document to start with. */
         private static DocumentBuilder builder = getDocumentBuilder();
    -    
    +
         private int msgOutputLevel = Project.MSG_ERR;
         private PrintStream outStream;
    -    
    +
         /** The complete log document for this build. */
         private Document doc = builder.newDocument();
         /** Mapping for when tasks started (Task to TimedElement). */
    @@ -87,31 +82,25 @@
         /** Mapping for when targets started (Task to TimedElement). */
         private Hashtable targets = new Hashtable();
         /**
    -     * Mapping of threads to stacks of elements
    -     * (Thread to Stack of TimedElement).
    +     * Mapping of threads to stacks of elements (Thread to Stack of TimedElement).
          */
         private Hashtable threadStacks = new Hashtable();
         /**
          * When the build started.
          */
         private TimedElement buildElement;
    -    
    +
         /**
    -     *  Constructs a new BuildListener that logs build events to an XML file.
    -     */
    -    public XmlLogger() {
    -    }
    -    
    -    /**
    -     * Returns a default DocumentBuilder instance or throws an
    -     * ExceptionInInitializerError if it can't be created.
    -     *
    +     * Returns a default DocumentBuilder instance or throws an ExceptionInInitializerError if it
    +     * can't be created.
    +     * 
          * @return a default DocumentBuilder instance.
          */
         private static DocumentBuilder getDocumentBuilder() {
             try {
                 return DocumentBuilderFactory.newInstance().newDocumentBuilder();
    -        } catch (ParserConfigurationException exc) {
    +        }
    +        catch (ParserConfigurationException exc) {
                 throw new ExceptionInInitializerError(exc.getMessage());
             }
         }
    @@ -119,21 +108,21 @@
         /** Utility class representing the time an element started. */
         private static class TimedElement {
             /**
    -         * Start time in milliseconds
    -         * (as returned by System.currentTimeMillis()).
    +         * Start time in milliseconds (as returned by System.currentTimeMillis()).
              */
             private long startTime;
             /** Element created at the start time. */
             private Element element;
    +
             public String toString() {
                 return element.getTagName() + ":" + element.getAttribute("name");
             }
         }
     
         /**
    -     * Fired when the build starts, this builds the top-level element for the
    -     * document and remembers the time of the start of the build.
    -     *
    +     * Fired when the build starts, this builds the top-level element for the document and remembers
    +     * the time of the start of the build.
    +     * 
          * @param event Ignored.
          */
         public void buildStarted(BuildEvent event) {
    @@ -143,20 +132,17 @@
         }
     
         /**
    -     * Fired when the build finishes, this adds the time taken and any
    -     * error stacktrace to the build element and writes the document to disk.
    -     *
    -     * @param event An event with any relevant extra information.
    -     *              Will not be null.
    +     * Fired when the build finishes, this adds the time taken and any error stacktrace to the build
    +     * element and writes the document to disk.
    +     * 
    +     * @param event An event with any relevant extra information. Will not be null.
          */
         public void buildFinished(BuildEvent event) {
             long totalTime = System.currentTimeMillis() - buildElement.startTime;
    -        buildElement.element.setAttribute(TIME_ATTR,
    -                DateUtils.formatElapsedTime(totalTime));
    +        buildElement.element.setAttribute(TIME_ATTR, DateUtils.formatElapsedTime(totalTime));
     
             if (event.getException() != null) {
    -            buildElement.element.setAttribute(ERROR_ATTR,
    -                    event.getException().toString());
    +            buildElement.element.setAttribute(ERROR_ATTR, event.getException().toString());
                 // print the stacktrace in the build file it is always useful...
                 // better have too much info than not enough.
                 Throwable exception = event.getException();
    @@ -170,8 +156,7 @@
             if (outFilename == null) {
                 outFilename = "log.xml";
             }
    -        String xslUri
    -                = event.getProject().getProperty("ant.XmlLogger.stylesheet.uri");
    +        String xslUri = event.getProject().getProperty("ant.XmlLogger.stylesheet.uri");
             if (xslUri == null) {
                 xslUri = "log.xsl";
             }
    @@ -186,18 +171,20 @@
                 out = new OutputStreamWriter(stream, "UTF8");
                 out.write("\n");
                 if (xslUri.length() > 0) {
    -                out.write("\n\n");
    +                out.write("\n\n");
                 }
                 (new DOMElementWriter()).write(buildElement.element, out, 0, "\t");
                 out.flush();
    -        } catch (IOException exc) {
    +        }
    +        catch (IOException exc) {
                 throw new BuildException("Unable to write log file" + exc.getMessage());
    -        } finally {
    +        }
    +        finally {
                 if (out != null) {
                     try {
                         out.close();
    -                } catch (IOException e) {
    +                }
    +                catch (IOException e) {
                         // We are Ignoring the errors as no need to fail the build.
                         event.getProject().log("Not able to close the file handler " + e.getMessage(), Project.MSG_WARN);
                         e = null; // ignore
    @@ -208,70 +195,47 @@
         }
     
         /**
    -     * Returns the stack of timed elements for the current thread.
    -     * @return the stack of timed elements for the current thread
    -     */
    -    private Stack getStack() {
    -        Stack threadStack = threadStacks.get(Thread.currentThread());
    -        if (threadStack == null) {
    -            threadStack = new Stack();
    -            threadStacks.put(Thread.currentThread(), threadStack);
    -        }
    -        /* For debugging purposes uncomment:
    -        org.w3c.dom.Comment s = doc.createComment("stack=" + threadStack);
    -        buildElement.element.appendChild(s);
    -         */
    -        return threadStack;
    -    }
    -
    -    /**
    -     * Fired when a target starts building, this pushes a timed element
    -     * for the target onto the stack of elements for the current thread,
    -     * remembering the current time and the name of the target.
    -     *
    -     * @param event An event with any relevant extra information.
    -     *              Will not be null.
    +     * Fired when a target starts building, this pushes a timed element for the target onto the
    +     * stack of elements for the current thread, remembering the current time and the name of the
    +     * target.
    +     * 
    +     * @param event An event with any relevant extra information. Will not be null.
          */
         public void targetStarted(BuildEvent event) {
         }
     
         /**
    -     * Fired when a target finishes building, this adds the time taken
    -     * and any error stacktrace to the appropriate target element in the log.
    -     *
    -     * @param event An event with any relevant extra information.
    -     *              Will not be null.
    +     * Fired when a target finishes building, this adds the time taken and any error stacktrace to
    +     * the appropriate target element in the log.
    +     * 
    +     * @param event An event with any relevant extra information. Will not be null.
          */
         public void targetFinished(BuildEvent event) {
         }
     
         /**
    -     * Fired when a task starts building, this pushes a timed element
    -     * for the task onto the stack of elements for the current thread,
    -     * remembering the current time and the name of the task.
    -     *
    -     * @param event An event with any relevant extra information.
    -     *              Will not be null.
    +     * Fired when a task starts building, this pushes a timed element for the task onto the stack of
    +     * elements for the current thread, remembering the current time and the name of the task.
    +     * 
    +     * @param event An event with any relevant extra information. Will not be null.
          */
         public void taskStarted(BuildEvent event) {
         }
     
         /**
    -     * Fired when a task finishes building, this adds the time taken
    -     * and any error stacktrace to the appropriate task element in the log.
    -     *
    -     * @param event An event with any relevant extra information.
    -     *              Will not be null.
    +     * Fired when a task finishes building, this adds the time taken and any error stacktrace to the
    +     * appropriate task element in the log.
    +     * 
    +     * @param event An event with any relevant extra information. Will not be null.
          */
         public void taskFinished(BuildEvent event) {
         }
     
    -
         /**
          * Get the TimedElement associated with a task.
    -     *
    -     * Where the task is not found directly, search for unknown elements which
    -     * may be hiding the real task
    +     * 
    +     * Where the task is not found directly, search for unknown elements which may be hiding the
    +     * real task
          */
         private TimedElement getTaskElement(Task task) {
             TimedElement element = (TimedElement) tasks.get(task);
    @@ -292,12 +256,10 @@
         }
     
         /**
    -     * Fired when a message is logged, this adds a message element to the
    -     * most appropriate parent element (task, target or build) and records
    -     * the priority and text of the message.
    -     *
    -     * @param event An event with any relevant extra information.
    -     *              Will not be null.
    +     * Fired when a message is logged, this adds a message element to the most appropriate parent
    +     * element (task, target or build) and records the priority and text of the message.
    +     * 
    +     * @param event An event with any relevant extra information. Will not be null.
          */
         public void messageLogged(BuildEvent event) {
             int priority = event.getPriority();
    @@ -346,20 +308,15 @@
             }
     
             /*
    -        if (parentElement == null) {
    -            Stack threadStack
    -                    = (Stack) threadStacks.get(Thread.currentThread());
    -            if (threadStack != null) {
    -                if (!threadStack.empty()) {
    -                    parentElement = (TimedElement) threadStack.peek();
    -                }
    -            }
    -        }
    -        */
    +         * if (parentElement == null) { Stack threadStack = (Stack)
    +         * threadStacks.get(Thread.currentThread()); if (threadStack != null) { if
    +         * (!threadStack.empty()) { parentElement = (TimedElement) threadStack.peek(); } } }
    +         */
     
             if (parentElement != null) {
                 parentElement.element.appendChild(messageElement);
    -        } else {
    +        }
    +        else {
                 buildElement.element.appendChild(messageElement);
             }
         }
    @@ -368,9 +325,8 @@
     
         /**
          * Set the logging level when using this as a Logger
    -     *
    -     * @param level the logging level -
    -     *        see {@link org.apache.tools.ant.Project#MSG_ERR Project}
    +     * 
    +     * @param level the logging level - see {@link org.apache.tools.ant.Project#MSG_ERR Project}
          *        class for level definitions
          */
         public void setMessageOutputLevel(int level) {
    @@ -378,9 +334,8 @@
         }
     
         /**
    -     * Set the output stream to which logging output is sent when operating
    -     * as a logger.
    -     *
    +     * Set the output stream to which logging output is sent when operating as a logger.
    +     * 
          * @param output the output PrintStream.
          */
         public void setOutputPrintStream(PrintStream output) {
    @@ -389,18 +344,16 @@
     
         /**
          * Ignore emacs mode, as it has no meaning in XML format
    -     *
    -     * @param emacsMode true if logger should produce emacs compatible
    -     *        output
    +     * 
    +     * @param emacsMode true if logger should produce emacs compatible output
          */
         public void setEmacsMode(boolean emacsMode) {
         }
     
         /**
    -     * Ignore error print stream. All output will be written to
    -     * either the XML log file or the PrintStream provided to
    -     * setOutputPrintStream
    -     *
    +     * Ignore error print stream. All output will be written to either the XML log file or the
    +     * PrintStream provided to setOutputPrintStream
    +     * 
          * @param err the stream we are going to ignore.
          */
         public void setErrorPrintStream(PrintStream err) {
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/conditions/AtsCondition.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/conditions/AtsCondition.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/conditions/AtsCondition.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,30 +1,29 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.ant.conditions;
     
    -import org.apache.log4j.Logger;
    +import java.net.MalformedURLException;
    +import java.net.URL;
    +import java.util.Iterator;
    +
    +import org.apache.tools.ant.Project;
     import org.apache.tools.ant.ProjectComponent;
     import org.apache.tools.ant.taskdefs.condition.Condition;
    -
    -import java.util.Iterator;
    -import java.net.MalformedURLException;
    -import java.net.URL;
    -
     import org.dom4j.Document;
     import org.dom4j.DocumentException;
     import org.dom4j.Element;
    @@ -32,80 +31,78 @@
     
     /**
      * Condition to read check from diamonds and tell if ats has failed
    + * 
      * @ant.type name="hasAtsPassed"
      */
    -public class AtsCondition extends ProjectComponent implements Condition
    -{
    -    private Logger log = Logger.getLogger(AtsCondition.class);
    +public class AtsCondition extends ProjectComponent implements Condition {
         private int sleeptimesecs = 60;
    -    
    -    public void setSleeptime(int seconds)
    -    {
    +
    +    public void setSleeptime(int seconds) {
             sleeptimesecs = seconds;
         }
    -    
    +
         /** Read from diamonds and signal if ats failed */
    -    public boolean eval()
    -    {
    +    public boolean eval() {
             String bid = getProject().getProperty("diamonds.build.id");
    -        if (bid == null)
    -            log.info("Diamonds not enabled");
    -        else
    -        {
    +        if (bid == null) {
    +            log("Diamonds not enabled");
    +        }
    +        else {
                 boolean testsfound = false;
    -            log.info("Looking for tests in diamonds");
    +            log("Looking for tests in diamonds");
                 SAXReader xmlReader = new SAXReader();
    -            
    -            while (!testsfound)
    -            {
    +
    +            while (!testsfound) {
                     Document antDoc = null;
    -                
    +
                     try {
    -                    URL url = new URL("http://" + getProject().getProperty("diamonds.host") + bid + "?fmt=xml");
    +                    URL url = new URL("http://" + getProject().getProperty("diamonds.host") + bid
    +                        + "?fmt=xml");
                         antDoc = xmlReader.read(url);
    -                } catch (MalformedURLException  e) {
    +                }
    +                catch (MalformedURLException e) {
                         // We are Ignoring the errors as no need to fail the build.
    -                    log.error("Not able to read the Diamonds URL http://" + getProject().getProperty("diamonds.host") + bid + "?fmt=xml: " + e.getMessage());
    -                } catch (DocumentException e) {
    -                    log.error("Not able to read the Diamonds URL http://" + getProject().getProperty("diamonds.host") + bid + "?fmt=xml: " + e.getMessage());
    +                    log("Not able to read the Diamonds URL http://"
    +                        + getProject().getProperty("diamonds.host") + bid + "?fmt=xml: "
    +                        + e.getMessage(), Project.MSG_ERR);
                     }
    -                  
    -                for (Iterator iterator = antDoc.selectNodes("//test/failed").iterator(); iterator.hasNext();)
    -                {
    +                catch (DocumentException e) {
    +                    log("Not able to read the Diamonds URL http://"
    +                        + getProject().getProperty("diamonds.host") + bid + "?fmt=xml: "
    +                        + e.getMessage(), Project.MSG_ERR);
    +                }
    +
    +                for (Iterator iterator = antDoc.selectNodes("//test/failed").iterator(); iterator.hasNext();) {
                         testsfound = true;
                         Element element = (Element) iterator.next();
                         String failed = element.getText();
    -                    if (!failed.equals("0"))
    -                    {
    -                        log.error("ATS tests failed");
    -                        
    -                        for (Iterator iterator2 = antDoc.selectNodes("//actual_result").iterator(); iterator2.hasNext();)
    -                        {
    +                    if (!failed.equals("0")) {
    +                        log("ATS tests failed", Project.MSG_ERR);
    +
    +                        for (Iterator iterator2 = antDoc.selectNodes("//actual_result").iterator(); iterator2.hasNext();) {
                                 Element resultElement = (Element) iterator2.next();
    -                            log.error(resultElement.getText());
    +                            log(resultElement.getText(), Project.MSG_ERR);
                             }
                             return false;
                         }
                     }
    -                
    +
                     int noofdrops = Integer.parseInt(getProject().getProperty("drop.file.counter"));
    -                if (noofdrops > 0)
    -                {
    +                if (noofdrops > 0) {
                         int testsrun = antDoc.selectNodes("//test").size();
    -                    if (testsrun < noofdrops)
    -                    {
    -                        log.info(testsrun + " test completed, " + noofdrops + " total");
    +                    if (testsrun < noofdrops) {
    +                        log(testsrun + " test completed, " + noofdrops + " total");
                             testsfound = false;
                         }
                     }
    -                if (!testsfound)
    -                {
    -                    log.info("Tests not found sleeping for " + sleeptimesecs + " seconds");
    +                if (!testsfound) {
    +                    log("Tests not found sleeping for " + sleeptimesecs + " seconds");
                         try {
    -                    Thread.sleep(sleeptimesecs * 1000);
    -                    } catch (InterruptedException e) {
    +                        Thread.sleep(sleeptimesecs * 1000);
    +                    }
    +                    catch (InterruptedException e) {
                             // This will not affect the build process so ignoring.
    -                        log.debug("Interrupted while reading ATS build status " + e.getMessage());
    +                        log("Interrupted while reading ATS build status " + e.getMessage(), Project.MSG_DEBUG);
                         }
                     }
                 }
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/listener/CoverageRecorderEntry.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/listener/CoverageRecorderEntry.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/listener/CoverageRecorderEntry.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -20,27 +20,37 @@
     
     package com.nokia.ant.listener;
     
    -import java.io.*;
    -import org.apache.tools.ant.util.DOMElementWriter;
    -import org.apache.tools.ant.util.DateUtils;
    +import java.io.FileOutputStream;
    +import java.io.IOException;
    +import java.io.OutputStream;
    +import java.io.OutputStreamWriter;
    +import java.io.PrintStream;
    +import java.io.Writer;
    +import java.util.Hashtable;
    +import java.util.Stack;
    +
     import javax.xml.parsers.DocumentBuilder;
     import javax.xml.parsers.DocumentBuilderFactory;
    -import org.w3c.dom.Document;
    -import org.w3c.dom.Element;
    -import org.apache.tools.ant.*;
    -import java.util.*;
     import javax.xml.parsers.ParserConfigurationException;
     
    +import org.apache.tools.ant.BuildEvent;
    +import org.apache.tools.ant.BuildException;
    +import org.apache.tools.ant.BuildLogger;
    +import org.apache.tools.ant.Project;
    +import org.apache.tools.ant.SubBuildListener;
    +import org.apache.tools.ant.Target;
    +import org.apache.tools.ant.Task;
    +import org.apache.tools.ant.UnknownElement;
    +import org.apache.tools.ant.util.DOMElementWriter;
    +import org.apache.tools.ant.util.DateUtils;
    +import org.w3c.dom.Document;
    +import org.w3c.dom.Element;
    +
     /**
    - * This is a class that represents a XML recorder. This is the listener to the
    - * build process.
    - *
    + * This is a class that represents a XML recorder. This is the listener to the build process.
    + * 
      */
     public class CoverageRecorderEntry implements BuildLogger, SubBuildListener {
    -
    -    //////////////////////////////////////////////////////////////////////
    -    // ATTRIBUTES
    -    
         /** XML element name for a build. */
         private static final String BUILD_TAG = "build";
         /** XML element name for a target. */
    @@ -53,21 +63,21 @@
         private static final String TIME_ATTR = "time";
         /** XML attribute name for a file location. */
         private static final String LOCATION_ATTR = "location";
    -    
    +
         /** DocumentBuilder to use when creating the document to start with. */
         private static DocumentBuilder builder = getDocumentBuilder();
    -    
    +
         private String recordTaskName;
    -    
    -    /** The name of the file associated with this recorder entry.  */
    +
    +    /** The name of the file associated with this recorder entry. */
         private String filename;
    -    /** The state of the recorder (recorder on or off).  */
    +    /** The state of the recorder (recorder on or off). */
         private boolean record = true;
    -    /** The current verbosity level to record at.  */
    +    /** The current verbosity level to record at. */
         private int loglevel = Project.MSG_INFO;
    -    /** The output PrintStream to record to.  */
    +    /** The output PrintStream to record to. */
         private PrintStream outStream;
    -    /** The start time of the last know target.  */
    +    /** The start time of the last know target. */
         private long targetStartTime;
         /** project instance the recorder is associated with */
         private Project project;
    @@ -79,17 +89,13 @@
         /** Mapping for when targets started (Task to TimedElement). */
         private Hashtable targets = new Hashtable();
         /**
    -     * Mapping of threads to stacks of elements
    -     * (Thread to Stack of TimedElement).
    +     * Mapping of threads to stacks of elements (Thread to Stack of TimedElement).
          */
         private Hashtable> threadStacks = new Hashtable>();
         /**
          * When the build started.
          */
         private TimedElement buildElement;
    -    
    -    //////////////////////////////////////////////////////////////////////
    -    // CONSTRUCTORS / INITIALIZERS
     
         /**
          * @param name The name of this recorder (used as the filename).
    @@ -99,37 +105,39 @@
             this.recordTaskName = recordTaskName;
             startBuild();
         }
    -    
    +
         /**
    -     * Returns a default DocumentBuilder instance or throws an
    -     * ExceptionInInitializerError if it can't be created.
    -     *
    +     * Returns a default DocumentBuilder instance or throws an ExceptionInInitializerError if it
    +     * can't be created.
    +     * 
          * @return a default DocumentBuilder instance.
          */
         protected static DocumentBuilder getDocumentBuilder() {
             try {
                 return DocumentBuilderFactory.newInstance().newDocumentBuilder();
    -        } catch (ParserConfigurationException exc) {
    +        }
    +        catch (ParserConfigurationException exc) {
                 throw new ExceptionInInitializerError(exc.getMessage());
             }
         }
    -    
    +
         /** Utility class representing the time an element started. */
         protected static class TimedElement {
             /**
    -         * Start time in milliseconds
    -         * (as returned by System.currentTimeMillis()).
    +         * Start time in milliseconds (as returned by System.currentTimeMillis()).
              */
             private long startTime;
             /** Element created at the start time. */
             private Element element;
    +
             public String toString() {
                 return element.getTagName() + ":" + element.getAttribute("name");
             }
         }
    -    
    +
         /**
          * Returns the stack of timed elements for the current thread.
    +     * 
          * @return the stack of timed elements for the current thread
          */
         protected Stack getStack() {
    @@ -138,15 +146,12 @@
                 threadStack = new Stack();
                 threadStacks.put(Thread.currentThread(), threadStack);
             }
    -        /* For debugging purposes uncomment:
    -        org.w3c.dom.Comment s = doc.createComment("stack=" + threadStack);
    -        buildElement.element.appendChild(s);
    +        /*
    +         * For debugging purposes uncomment: org.w3c.dom.Comment s = doc.createComment("stack=" +
    +         * threadStack); buildElement.element.appendChild(s);
              */
             return threadStack;
         }
    -    
    -    //////////////////////////////////////////////////////////////////////
    -    // ACCESSOR METHODS
     
         /**
          * @return the name of the file the output is sent to.
    @@ -157,7 +162,7 @@
     
         /**
          * Turns off or on this recorder.
    -     *
    +     * 
          * @param state true for on, false for off, null for no change.
          */
         public void setRecordState(Boolean state) {
    @@ -171,7 +176,7 @@
          */
         /** {@inheritDoc}. */
         public void buildStarted(BuildEvent event) {
    -        
    +
         }
     
         /**
    @@ -183,12 +188,11 @@
         }
     
         /**
    -     * Cleans up any resources held by this recorder entry at the end
    -     * of a subbuild if it has been created for the subbuild's project
    -     * instance.
    -     *
    +     * Cleans up any resources held by this recorder entry at the end of a subbuild if it has been
    +     * created for the subbuild's project instance.
    +     * 
          * @param event the buildFinished event
    -     *
    +     * 
          * @since Ant 1.6.2
          */
         public void subBuildFinished(BuildEvent event) {
    @@ -199,9 +203,9 @@
     
         /**
          * Empty implementation to satisfy the BuildListener interface.
    -     *
    +     * 
          * @param event the buildStarted event
    -     *
    +     * 
          * @since Ant 1.6.2
          */
         public void subBuildStarted(BuildEvent event) {
    @@ -229,28 +233,27 @@
             Target target = event.getTarget();
             TimedElement targetElement = (TimedElement) targets.get(target);
             if (targetElement != null) {
    -            long totalTime
    -                    = System.currentTimeMillis() - targetElement.startTime;
    -            targetElement.element.setAttribute(TIME_ATTR,
    -                    DateUtils.formatElapsedTime(totalTime));
    +            long totalTime = System.currentTimeMillis() - targetElement.startTime;
    +            targetElement.element.setAttribute(TIME_ATTR, DateUtils.formatElapsedTime(totalTime));
     
                 TimedElement parentElement = null;
                 Stack threadStack = getStack();
                 if (!threadStack.empty()) {
                     threadStack.pop();
    -//                if (poppedStack != targetElement) {
    -//                    throw new RuntimeException("Mismatch - popped element = "
    -//                            + poppedStack
    -//                            + " finished target element = "
    -//                            + targetElement);
    -//                }
    +                // if (poppedStack != targetElement) {
    +                // throw new RuntimeException("Mismatch - popped element = "
    +                // + poppedStack
    +                // + " finished target element = "
    +                // + targetElement);
    +                // }
                     if (!threadStack.empty()) {
                         parentElement = threadStack.peek();
                     }
                 }
                 if (parentElement == null) {
                     buildElement.element.appendChild(targetElement.element);
    -            } else {
    +            }
    +            else {
                     parentElement.element.appendChild(targetElement.element);
                 }
             }
    @@ -272,8 +275,7 @@
                 name = "";
             }
             taskElement.element.setAttribute(NAME_ATTR, name);
    -        taskElement.element.setAttribute(LOCATION_ATTR,
    -                event.getTask().getLocation().toString());
    +        taskElement.element.setAttribute(LOCATION_ATTR, event.getTask().getLocation().toString());
             tasks.put(task, taskElement);
             getStack().push(taskElement);
         }
    @@ -283,14 +285,13 @@
          */
         /** {@inheritDoc}. */
         public void taskFinished(BuildEvent event) {
    -        
    -//        if (event.getTask().getTaskName() != recordTaskName) {
    +
    +        // if (event.getTask().getTaskName() != recordTaskName) {
             Task task = event.getTask();
             TimedElement taskElement = tasks.get(task);
             if (taskElement != null) {
                 long totalTime = System.currentTimeMillis() - taskElement.startTime;
    -            taskElement.element.setAttribute(TIME_ATTR,
    -                    DateUtils.formatElapsedTime(totalTime));
    +            taskElement.element.setAttribute(TIME_ATTR, DateUtils.formatElapsedTime(totalTime));
                 Target target = task.getOwningTarget();
                 TimedElement targetElement = null;
                 if (target != null) {
    @@ -298,30 +299,31 @@
                 }
                 if (targetElement == null) {
                     buildElement.element.appendChild(taskElement.element);
    -            } else {
    +            }
    +            else {
                     targetElement.element.appendChild(taskElement.element);
                 }
                 Stack threadStack = getStack();
                 if (!threadStack.empty()) {
                     threadStack.pop();
    -//                    if (poppedStack != taskElement) {
    -//                        throw new RuntimeException("Mismatch - popped element = "
    -//                                + poppedStack + " finished task element = "
    -//                                + taskElement);
    -//                    }
    +                // if (poppedStack != taskElement) {
    +                // throw new RuntimeException("Mismatch - popped element = "
    +                // + poppedStack + " finished task element = "
    +                // + taskElement);
    +                // }
                 }
                 tasks.remove(task);
    -//            } else {
    -//                throw new RuntimeException("Unknown task " + task + " not in " + tasks);
    -//            }
    +            // } else {
    +            // throw new RuntimeException("Unknown task " + task + " not in " + tasks);
    +            // }
             }
         }
    -    
    +
         /**
          * Get the TimedElement associated with a task.
    -     *
    -     * Where the task is not found directly, search for unknown elements which
    -     * may be hiding the real task
    +     * 
    +     * Where the task is not found directly, search for unknown elements which may be hiding the
    +     * real task
          */
         protected TimedElement getTaskElement(Task task) {
             TimedElement element = (TimedElement) tasks.get(task);
    @@ -338,13 +340,13 @@
             }
             return null;
         }
    -    
    +
         /**
          * @see org.apache.tools.ant.BuildListener#messageLogged(BuildEvent)
          */
         /** {@inheritDoc}. */
         public void messageLogged(BuildEvent event) {
    -        
    +
         }
     
         /**
    @@ -365,7 +367,6 @@
             outStream = output;
         }
     
    -
         /**
          * @see BuildLogger#setErrorPrintStream(PrintStream)
          */
    @@ -376,9 +377,9 @@
     
         /**
          * Set the project associated with this recorder entry.
    -     *
    +     * 
          * @param project the project instance
    -     *
    +     * 
          * @since 1.6.2
          */
         public void setProject(Project project) {
    @@ -387,7 +388,7 @@
                 project.addBuildListener(this);
             }
         }
    -    
    +
         /**
          * @since 1.6.2
          */
    @@ -398,10 +399,10 @@
             }
             project = null;
         }
    -    
    +
         /**
    -     * Closes the file associated with this recorder.
    -     * Used by Recorder.
    +     * Closes the file associated with this recorder. Used by Recorder.
    +     * 
          * @since 1.6.3
          */
         void closeFile() {
    @@ -418,30 +419,32 @@
                 out.write("\n");
                 (new DOMElementWriter()).write(buildElement.element, out, 0, "\t");
                 out.flush();
    -        } catch (IOException exc) {
    +        }
    +        catch (IOException exc) {
                 throw new BuildException("Unable to write log file " + exc.getMessage(), exc);
    -        } finally {
    +        }
    +        finally {
                 if (out != null) {
                     try {
                         out.close();
    -                } catch (IOException e) {
    +                }
    +                catch (IOException e) {
                         e = null; // ignore
                     }
                 }
             }
             buildElement = null;
         }
    -    
    +
         void startBuild() {
             buildElement = new TimedElement();
             buildElement.startTime = System.currentTimeMillis();
             buildElement.element = doc.createElement(BUILD_TAG);
         }
    -    
    +
         void finishBuild() {
             long totalTime = System.currentTimeMillis() - buildElement.startTime;
    -        buildElement.element.setAttribute(TIME_ATTR,
    -                DateUtils.formatElapsedTime(totalTime));
    +        buildElement.element.setAttribute(TIME_ATTR, DateUtils.formatElapsedTime(totalTime));
         }
     
         @Override
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/AntConfigurationTask.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/AntConfigurationTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/AntConfigurationTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -20,14 +20,17 @@
     import java.io.File;
     import java.util.ArrayList;
     import java.util.Iterator;
    +
    +import org.apache.commons.configuration.Configuration;
    +import org.apache.commons.configuration.ConfigurationException;
    +import org.apache.commons.configuration.PropertiesConfiguration;
    +import org.apache.commons.configuration.XMLConfiguration;
     import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Task;
     import org.apache.tools.ant.types.FileSet;
     import org.apache.tools.ant.types.ResourceCollection;
     import org.apache.tools.ant.types.resources.FileResource;
     
    -import org.apache.commons.configuration.*;
    -
     /**
      * Can load ant configuration file both in .xml and .txt format.
      * In .txt file configuration could be defined like -
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/AntDependencyTask.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/AntDependencyTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/AntDependencyTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,94 +1,111 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.ant.taskdefs;
     
    -import java.io.*;
    -import java.util.*;
    +import java.io.BufferedReader;
    +import java.io.BufferedWriter;
    +import java.io.ByteArrayInputStream;
    +import java.io.File;
    +import java.io.FileNotFoundException;
    +import java.io.FileOutputStream;
    +import java.io.IOException;
    +import java.io.InputStreamReader;
    +import java.io.OutputStreamWriter;
    +import java.io.UnsupportedEncodingException;
    +import java.io.Writer;
    +import java.net.HttpURLConnection;
    +import java.net.URL;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.Enumeration;
    +import java.util.HashSet;
    +import java.util.Hashtable;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.jar.Attributes;
    +import java.util.jar.JarFile;
    +import java.util.jar.Manifest;
    +import java.util.zip.ZipEntry;
     
    +import org.apache.tools.ant.DirectoryScanner;
     import org.apache.tools.ant.Project;
     import org.apache.tools.ant.Task;
     import org.apache.tools.ant.types.FileSet;
    -import org.apache.tools.ant.DirectoryScanner;
    -
    -import java.util.jar.*;
    -import java.util.zip.ZipEntry;
    -import java.net.*;
    +import org.dom4j.Document;
    +import org.dom4j.DocumentException;
    +import org.dom4j.Element;
     import org.dom4j.io.SAXReader;
    -import org.dom4j.Document;
    -import org.dom4j.Element;
    -import org.dom4j.DocumentException;
     
     /**
      * Outputs a directed graph of Ant library dependencies, reads information from dependency jars
      */
    -public class AntDependencyTask extends Task
    -{
    +public class AntDependencyTask extends Task {
         private ArrayList antFileSetList = new ArrayList();
         private String outputFile;
    -    
    -    public AntDependencyTask()
    -    {
    +
    +    public AntDependencyTask() {
             setTaskName("AntDependencyTask");
         }
    -    
    +
         /**
          * Add a set of files to copy.
    +     * 
          * @param set a set of files to AntDependencyTask.
          * @ant.required
          */
         public void addFileset(FileSet set) {
             antFileSetList.add(set);
         }
    -    
    +
         /**
          * Location of graph file to output to
    +     * 
          * @ant.required
          */
    -    public void setOutputFile(String path)
    -    {
    +    public void setOutputFile(String path) {
             outputFile = path;
         }
    -    
    -    public String classToJar(Class aclass)
    -    {
    +
    +    public String classToJar(Class aclass) {
             String name = aclass.getName().replace(".", "/") + ".class";
    -      
    -        for (Iterator iterator = antFileSetList.iterator(); iterator.hasNext();)
    -        {
    +
    +        for (Iterator iterator = antFileSetList.iterator(); iterator.hasNext();) {
                 FileSet fs = (FileSet) iterator.next();
                 DirectoryScanner ds = fs.getDirectoryScanner(getProject());
                 String[] srcFiles = ds.getIncludedFiles();
                 String basedir = ds.getBasedir().getPath();
    -            //log(basedir);
    -            
    -            for (int i = 0; i < srcFiles.length; i++)
    -            {
    +            // log(basedir);
    +
    +            for (int i = 0; i < srcFiles.length; i++) {
                     String fileName = basedir + File.separator + srcFiles[i];
    -                //log(fileName);
    +                // log(fileName);
                     try {
                         JarFile jar = new JarFile(fileName);
    -                    
    -                    //for (Enumeration e = jar.entries(); e.hasMoreElements() ;) {log(e.nextElement().toString()); }
    -                    
    -                    if (jar.getJarEntry(name) != null)
    +
    +                    // for (Enumeration e = jar.entries(); e.hasMoreElements() ;)
    +                    // {log(e.nextElement().toString()); }
    +
    +                    if (jar.getJarEntry(name) != null) {
                             return fileName;
    +                    }
                     }
    -                catch (IOException e) { 
    +                catch (IOException e) {
                         // We are Ignoring the errors as no need to fail the build.
                         log(e.getMessage(), Project.MSG_DEBUG);
                     }
    @@ -97,150 +114,143 @@
             log(name + " not found", Project.MSG_DEBUG);
             return null;
         }
    -    
    -    public String getJarAttr(JarFile jar, String nameOfAttr)
    -    {
    +
    +    public String getJarAttr(JarFile jar, String nameOfAttr) {
             try {
                 String attr = jar.getManifest().getMainAttributes().getValue(nameOfAttr);
    -            if (attr != null)
    +            if (attr != null) {
                     return attr;
    -        
    +            }
    +
                 Manifest manifest = jar.getManifest();
                 Map map = manifest.getEntries();
    -        
    -            for (Iterator it = map.keySet().iterator(); it.hasNext(); ) {
    -                String entryName = (String)it.next();
    -                Attributes attrs = (Attributes)map.get(entryName);
    -        
    -                for (Iterator it2 = attrs.keySet().iterator(); it2.hasNext(); )
    -                {
    -                    Attributes.Name attrName = (Attributes.Name)it2.next();
    -                        if (attrName.toString() == nameOfAttr)
    -                            return attrs.getValue(attrName).replace("\"", "");
    +
    +            for (Iterator it = map.keySet().iterator(); it.hasNext();) {
    +                String entryName = (String) it.next();
    +                Attributes attrs = (Attributes) map.get(entryName);
    +
    +                for (Iterator it2 = attrs.keySet().iterator(); it2.hasNext();) {
    +                    Attributes.Name attrName = (Attributes.Name) it2.next();
    +                    if (attrName.toString() == nameOfAttr) {
    +                        return attrs.getValue(attrName).replace("\"", "");
    +                    }
                     }
                 }
    -        } catch (IOException e) {
    +        }
    +        catch (IOException e) {
                 // We are Ignoring the errors as no need to fail the build.
                 log("Not able to get the JAR file attribute information. " + e.getMessage(), Project.MSG_DEBUG);
             }
             return null;
         }
    -    
    -    public HashSet getJarInfo()
    -    {
    +
    +    public HashSet getJarInfo() {
             HashSet classlist = new HashSet();
    -        
    -        for (Iterator iterator = antFileSetList.iterator(); iterator.hasNext();)
    -        {
    +
    +        for (Iterator iterator = antFileSetList.iterator(); iterator.hasNext();) {
                 FileSet fs = (FileSet) iterator.next();
                 DirectoryScanner ds = fs.getDirectoryScanner(getProject());
                 String[] srcFiles = ds.getIncludedFiles();
                 String basedir = ds.getBasedir().getPath();
    -            //log(basedir);
    -            
    -            for (int i = 0; i < srcFiles.length; i++)
    -            {
    +            // log(basedir);
    +
    +            for (int i = 0; i < srcFiles.length; i++) {
                     String fileName = basedir + File.separator + srcFiles[i];
    -                //log(fileName);
    +                // log(fileName);
                     try {
                         JarFile jar = new JarFile(fileName);
    -                    
    +
                         String vendor = getJarAttr(jar, "Implementation-Vendor");
                         String version = getJarAttr(jar, "Implementation-Version");
    -                    if (version == null)
    +                    if (version == null) {
                             version = getJarAttr(jar, "Specification-Version");
    +                    }
                         String name = convertJarName(fileName);
    -                    
    -                    //findLicense(srcFiles[i], jar);
    -                    
    +
    +                    // findLicense(srcFiles[i], jar);
    +
                         String nameandversion = name;
    -                    
    -                    if (version != null)
    -                    {
    +
    +                    if (version != null) {
                             version = version.replace("$", "");
    -                        if (!digitInString(name))
    +                        if (!digitInString(name)) {
                                 nameandversion = name + " " + version;
    +                        }
                         }
    -                    if (vendor == null)
    +                    if (vendor == null) {
                             vendor = "";
    -                    classlist.add(name + " [style=filled,shape=record,label=\"" + nameandversion + "|" + vendor + "\"];");
    +                    }
    +                    classlist.add(name + " [style=filled,shape=record,label=\"" + nameandversion
    +                        + "|" + vendor + "\"];");
                     }
    -                catch (IOException e) { 
    +                catch (IOException e) {
                         // We are Ignoring the errors as no need to fail the build.
    -                    e.printStackTrace(); 
    +                    e.printStackTrace();
                     }
                 }
             }
     
             return classlist;
         }
    -    
    -    public void findLicense(String name, JarFile jar)
    -    {
    +
    +    public void findLicense(String name, JarFile jar) {
             try {
                 ZipEntry entry = jar.getEntry("META-INF/LICENSE");
    -            if (entry == null)
    +            if (entry == null) {
                     entry = jar.getEntry("META-INF/LICENSE.txt");
    -            if (entry != null)
    -            {
    -              /**/
    +            }
    +            if (entry != null) {
    +                /**/
                     log("File in " + name + " in jar file ", Project.MSG_DEBUG);
                     byte[] data = new byte[1024];
                     jar.getInputStream(entry).read(data);
    -                for (String line : new String(data).split("\n"))
    -                {
    -                    if (line.contains("License") || line.contains("LICENSE ") || line.contains("Copyright"))
    -                    {
    +                for (String line : new String(data).split("\n")) {
    +                    if (line.contains("License") || line.contains("LICENSE ")
    +                        || line.contains("Copyright")) {
                             log("Replace License information with * " + line.replace("*", "").trim(), Project.MSG_INFO);
                             break;
                         }
                     }
                 }
    -            else
    -            {   
    -                //http://mirrors.ibiblio.org/pub/mirrors/maven2/
    +            else {
    +                // http://mirrors.ibiblio.org/pub/mirrors/maven2/
                     String mavenUrl = "http://repo2.maven.org/maven2/";
                     Enumeration jarfiles = jar.entries();
                     boolean found = false;
                     while (!found && jarfiles.hasMoreElements()) {
                         ZipEntry file = (ZipEntry) jarfiles.nextElement();
    -                    if (file.isDirectory())
    -                    {   
    +                    if (file.isDirectory()) {
                             String filename = file.getName();
                             String[] split = file.getName().split("/");
                             String end = split[split.length - 1];
                             String specialfilename = filename + end;
    -                        
    +
                             URL url = new URL(mavenUrl + filename + end + "/maven-metadata.xml");
    -                        if (!end.equals("apache"))
    -                        {
    +                        if (!end.equals("apache")) {
                                 HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    -                            if (connection.getResponseCode() != HttpURLConnection.HTTP_OK)
    -                            {
    +                            if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
                                     filename = filename.replace(end, name.replace(".jar", ""));
                                     end = name.replace(".jar", "");
                                     specialfilename = filename;
                                     url = new URL(mavenUrl + filename + "maven-metadata.xml");
                                     connection = (HttpURLConnection) url.openConnection();
                                 }
    -                            if (connection.getResponseCode() == HttpURLConnection.HTTP_OK)
    -                            {   
    -                                
    +                            if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {
    +
                                     SAXReader xmlReader = new SAXReader();
                                     Document antDoc = xmlReader.read(url.openStream());
                                     List versions = antDoc.selectNodes("//versioning/versions/version");
    -                                //if (version.equals(""))
    -                                //{
    -                                //    version = antDoc.valueOf("/metadata/version");
    -                                //}
    +                                // if (version.equals(""))
    +                                // {
    +                                // version = antDoc.valueOf("/metadata/version");
    +                                // }
                                     Collections.reverse(versions);
    -                                for (Object tmpversion : versions)
    -                                {
    -                                    String version = ((Element)tmpversion).getText();
    -                                    URL url2 = new URL(mavenUrl + specialfilename + "/" + version + "/" + end + "-" + version + ".pom");
    +                                for (Object tmpversion : versions) {
    +                                    String version = ((Element) tmpversion).getText();
    +                                    URL url2 = new URL(mavenUrl + specialfilename + "/" + version
    +                                        + "/" + end + "-" + version + ".pom");
                                         HttpURLConnection connection2 = (HttpURLConnection) url2.openConnection();
    -                                    if (connection2.getResponseCode() == HttpURLConnection.HTTP_OK)
    -                                    {
    +                                    if (connection2.getResponseCode() == HttpURLConnection.HTTP_OK) {
                                             BufferedReader din = new BufferedReader(new InputStreamReader(url2.openStream()));
                                             StringBuffer sb = new StringBuffer();
                                             String line = null;
    @@ -252,31 +262,33 @@
                                             //
                                             Document antDoc2 = xmlReader.read(new ByteArrayInputStream(new String(sb).getBytes()));
                                             String license = antDoc2.valueOf("/project/licenses/license/name");
    -                                        if (!license.equals(""))
    -                                        {
    +                                        if (!license.equals("")) {
                                                 found = true;
                                                 break;
                                             }
    -                                            
    +
                                         }
                                     }
                                 }
                             }
    -                    }   
    -                    
    +                    }
    +
                     }
    -                if (!found)
    +                if (!found) {
                         log(name + " not found in " + jar, Project.MSG_INFO);
    +                }
                 }
    -        } catch (IOException e) {
    +        }
    +        catch (IOException e) {
                 // We are Ignoring the errors as no need to fail the build.
    -            e.printStackTrace(); 
    -        } catch (DocumentException e) {
    +            e.printStackTrace();
    +        }
    +        catch (DocumentException e) {
                 // We are Ignoring the errors as no need to fail the build.
    -            e.printStackTrace(); 
    +            e.printStackTrace();
             }
         }
    -    
    +
         public boolean digitInString(String s) {
             int j = s.length() - 1;
             while (j >= 0 && Character.isDigit(s.charAt(j))) {
    @@ -285,65 +297,69 @@
             return false;
         }
     
    -    
    -    public String convertJarName(String jar)
    -    {
    +    public String convertJarName(String jar) {
             return new File(jar).getName().replace(".jar", "").replace("-", "_").replace(".", "_");
         }
    -    
    -    public final void execute()
    -    {
    +
    +    public final void execute() {
             try {
                 Project project = getProject();
    -            
    +
                 Hashtable taskdefs = project.getTaskDefinitions();
    -            
    +
                 HashSet classlist = new HashSet();
    -            
    +
                 Enumeration taskdefsenum = taskdefs.keys();
                 while (taskdefsenum.hasMoreElements()) {
                     String key = (String) taskdefsenum.nextElement();
                     Class value = (Class) taskdefs.get(key);
    -                if (!key.contains("nokia") && !value.toString().contains("org.apache.tools.ant"))
    -                {
    +                if (!key.contains("nokia") && !value.toString().contains("org.apache.tools.ant")) {
                         String name = value.getPackage().getName();
                         String vendor = value.getPackage().getImplementationVendor();
    -                    
    +
                         name = classToJar(value);
    -                    
    -                    if (name != null)
    -                    {
    +
    +                    if (name != null) {
                             name = convertJarName(name);
    -                      
    +
                             classlist.add("helium_ant -> \"" + name + "\";");
    -                        
    -                        if (vendor == null)
    +
    +                        if (vendor == null) {
                                 vendor = "";
    -                        
    -                        classlist.add(name + " [style=filled,shape=record,label=\"" + name + "|" + vendor + "\"];");
    +                        }
    +
    +                        classlist.add(name + " [style=filled,shape=record,label=\"" + name + "|"
    +                            + vendor + "\"];");
                         }
                     }
                 }
    -            
    +
                 classlist.add("helium_ant -> nokia_ant;");
    -            
    +
                 classlist.addAll(getJarInfo());
    -        
    +
                 Writer output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF8"));
    -            
    -            for (String value : classlist)
    +
    +            for (String value : classlist) {
                     output.write(value + "\n");
    -            
    +            }
    +
                 output.close();
    -        } catch (FileNotFoundException e) {
    +        }
    +        catch (FileNotFoundException e) {
                 // We are Ignoring the errors as no need to fail the build.
    -            log("FileNotFoundException occured while getting the ANT task dependency information. " + e.getMessage(), Project.MSG_DEBUG);
    -        } catch (UnsupportedEncodingException e) {
    +            log("FileNotFoundException occured while getting the ANT task dependency information. "
    +                + e.getMessage(), Project.MSG_DEBUG);
    +        }
    +        catch (UnsupportedEncodingException e) {
                 // We are Ignoring the errors as no need to fail the build.
    -            log("UnsupportedEncodingException occured while getting the ANT task dependency information. " + e.getMessage(), Project.MSG_DEBUG);
    -        } catch (IOException e) {
    +            log("UnsupportedEncodingException occured while getting the ANT task dependency information. "
    +                + e.getMessage(), Project.MSG_DEBUG);
    +        }
    +        catch (IOException e) {
                 // We are Ignoring the errors as no need to fail the build.
    -            log("IOException occured while getting the ANT task dependency information. " + e.getMessage(), Project.MSG_DEBUG);
    +            log("IOException occured while getting the ANT task dependency information. "
    +                + e.getMessage(), Project.MSG_DEBUG);
             }
         }
     
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/CopyParallelTask.java
    --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/CopyParallelTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/CopyParallelTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,125 +1,115 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.ant.taskdefs;
     
    -
    -import org.apache.tools.ant.taskdefs.Copy;
     import java.io.File;
     import java.io.IOException;
     import java.util.Enumeration;
    +import java.util.Vector;
     
    -import java.util.Vector;
    +import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Project;
    -import org.apache.tools.ant.BuildException;
    +import org.apache.tools.ant.taskdefs.Copy;
     import org.apache.tools.ant.types.FilterSet;
     import org.apache.tools.ant.types.FilterSetCollection;
     
     /**
    - * Copies a file(s) or directory(s) to a new file(s)
    - * or directory(s) using parallel threads. Number of parallel
    - * threads can be defined by threadCount. Files are only 
    - * copied if the source file is newer
    - * than the destination file, or when the destination file does not
    - * exist.  It is possible to explicitly overwrite existing files.

    - * - * + * Copies a file(s) or directory(s) to a new file(s) or directory(s) using parallel threads. Number + * of parallel threads can be defined by threadCount. Files are only copied if the source file is + * newer than the destination file, or when the destination file does not exist. It is possible to + * explicitly overwrite existing files.

    + * + * * @ant.task category="Filesystem" * @since Helium 0.21 - * - */ -public class CopyParallelTask extends Copy -{ + * + */ +public class CopyParallelTask extends Copy { static final String LINE_SEPARATOR = System.getProperty("line.separator"); private int copyThreadCount; private int maxThreadCount; + /** * CopyParallelTask task constructor. */ - public CopyParallelTask() - { + public CopyParallelTask() { setTaskName("copy-parallel"); } /** * Perform the copy operation in parallel. + * * @exception BuildException if an error occurs. */ - public final void execute() - { - super.execute(); - //wait until all copy threads are dead - while (copyThreadCount > 0) - { + public final void execute() { + super.execute(); + // wait until all copy threads are dead + while (copyThreadCount > 0) { try { Thread.sleep(500); - } catch (InterruptedException e) { + } + catch (InterruptedException e) { if (failonerror) { - throw new BuildException("Copy parallel task has been interrupted " + e.getMessage()); + throw new BuildException("Copy parallel task has been interrupted " + + e.getMessage()); } log("Copy parallel task has been interrupted " + e.getMessage(), Project.MSG_ERR); } } - + } /** * Set maximum number of thread. + * * @param threadCount maximum number of threads */ - public final void setThreadCount(final int threadCount) - { - // Limit max. threads to 8 otherwise we experience freezing when using the fastcopy task on 8 processor build machines - if (threadCount > 8) - { - this.maxThreadCount = 8; - } else { + public final void setThreadCount(final int threadCount) { + // Limit max. threads to 8 otherwise we experience freezing when using the fastcopy task on + // 8 processor build machines + if (threadCount > 8) { + this.maxThreadCount = 8; + } + else { this.maxThreadCount = threadCount; } } - /** - * Actually does the file (and possibly empty directory) copies. - * This is a good method for subclasses to override. + /** + * Actually does the file (and possibly empty directory) copies. This is a good method for + * subclasses to override. */ - protected final void doFileOperations() - { - Vector filterChains = getFilterChains(); + protected final void doFileOperations() { Vector filterSets = getFilterSets(); - String inputEncoding = getEncoding(); - String outputEncoding = getOutputEncoding(); - long granularity = 0; - + // set default thread count to 1 if it is not set - if ( maxThreadCount < 1 ) - maxThreadCount = 1; - - - if (fileCopyMap.size() > 0) - { - log("Copying " + fileCopyMap.size() - + " file" + (fileCopyMap.size() == 1 ? "" : "s") - + " to " + destDir.getAbsolutePath() + " using " + maxThreadCount + if (maxThreadCount < 1) { + maxThreadCount = 1; + } + + if (fileCopyMap.size() > 0) { + log("Copying " + fileCopyMap.size() + " file" + (fileCopyMap.size() == 1 ? "" : "s") + + " to " + destDir.getAbsolutePath() + " using " + maxThreadCount + " threads in parallel."); Enumeration fileEnum = fileCopyMap.keys(); - while (fileEnum.hasMoreElements()) - { + while (fileEnum.hasMoreElements()) { String fromFile = (String) fileEnum.nextElement(); String[] toFiles = (String[]) fileCopyMap.get(fromFile); @@ -133,20 +123,15 @@ log("Copying " + fromFile + " to " + toFile, verbosity); FilterSetCollection executionFilters = new FilterSetCollection(); - if ( filtering ) - { + if (filtering) { executionFilters.addFilterSet(getProject().getGlobalFilterSet()); } - for (Enumeration filterEnum = filterSets.elements(); - filterEnum.hasMoreElements();) { - executionFilters - .addFilterSet((FilterSet) filterEnum.nextElement()); - } - - while (true) - { - if ( copyThreadCount < maxThreadCount) - { + for (Enumeration filterEnum = filterSets.elements(); filterEnum.hasMoreElements();) { + executionFilters.addFilterSet((FilterSet) filterEnum.nextElement()); + } + + while (true) { + if (copyThreadCount < maxThreadCount) { CopyThread copyThread = new CopyThread(fromFile, toFile, executionFilters); copyThread.start(); copyThreadCount++; @@ -165,74 +150,35 @@ File file = new File(dirs[i]); if (!file.exists()) { if (!file.mkdirs()) { - log("Unable to create directory " - + file.getAbsolutePath(), Project.MSG_ERR); - } else { + log("Unable to create directory " + file.getAbsolutePath(), Project.MSG_ERR); + } + else { createCount++; } } } } if (createCount > 0) { - log("Copied " + dirCopyMap.size() - + " empty director" - + (dirCopyMap.size() == 1 ? "y" : "ies") - + " to " + createCount - + " empty director" - + (createCount == 1 ? "y" : "ies") + " under " + log("Copied " + dirCopyMap.size() + " empty director" + + (dirCopyMap.size() == 1 ? "y" : "ies") + " to " + createCount + + " empty director" + (createCount == 1 ? "y" : "ies") + " under " + destDir.getAbsolutePath()); } } } /** - * Returns a reason for failure based on - * the exception thrown. - * If the exception is not IOException output the class name, - * output the message - * if the exception is MalformedInput add a little note. + * private class to start a new thread to copy a single file or or directory. */ - private String getDueTo(Exception ex) { - boolean baseIOException = ex.getClass() == IOException.class; - StringBuffer message = new StringBuffer(); - if (!baseIOException || ex.getMessage() == null) { - message.append(ex.getClass().getName()); - } - if (ex.getMessage() != null) { - if (!baseIOException) { - message.append(" "); - } - message.append(ex.getMessage()); - } - if (ex.getClass().getName().indexOf("MalformedInput") != -1) { - message.append(LINE_SEPARATOR); - message.append( - "This is normally due to the input file containing invalid"); - message.append(LINE_SEPARATOR); - message.append("bytes for the character encoding used : "); - message.append( - getEncoding() == null - ? fileUtils.getDefaultEncoding() : getEncoding()); - message.append(LINE_SEPARATOR); - } - return message.toString(); - } - - /** - * private class to start a new thread to copy a single file or - * or directory. - */ - private class CopyThread extends Thread - { + private class CopyThread extends Thread { private String fromFile; private String toFile; private FilterSetCollection executionFilters; private Vector filterChains; private String inputEncoding; private String outputEncoding; - - public CopyThread(String fromFile, String toFile, FilterSetCollection executionFilters) - { + + public CopyThread(String fromFile, String toFile, FilterSetCollection executionFilters) { this.fromFile = fromFile; this.toFile = toFile; this.executionFilters = executionFilters; @@ -241,14 +187,11 @@ this.outputEncoding = getOutputEncoding(); } - public void run() - { + public void run() { try { - fileUtils.copyFile(fromFile, toFile, executionFilters, - filterChains, forceOverwrite, - preserveLastModified, inputEncoding, - outputEncoding, getProject()); - } catch (IOException e) { + fileUtils.copyFile(fromFile, toFile, executionFilters, filterChains, forceOverwrite, preserveLastModified, inputEncoding, outputEncoding, getProject()); + } + catch (IOException e) { log("Problem found in parallel copy " + e.toString(), Project.MSG_ERR); } copyThreadCount--; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/CoverageRecorderTask.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/CoverageRecorderTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/CoverageRecorderTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -21,6 +21,7 @@ package com.nokia.ant.taskdefs; import java.util.Hashtable; + import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Recorder; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/HlmExecTask.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/HlmExecTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/HlmExecTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,10 +17,12 @@ package com.nokia.ant.taskdefs; -import org.apache.tools.ant.taskdefs.ExecTask; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.ThreadPoolExecutor; + import org.apache.tools.ant.BuildException; - -import java.util.concurrent.*; +import org.apache.tools.ant.taskdefs.ExecTask; /** * Exec task using shared thread pool @@ -39,8 +41,7 @@ public void execute() { String property = getProject().getProperty("number.of.threads"); - if (property != null) - { + if (property != null) { ((ThreadPoolExecutor)threadPool).setCorePoolSize(Integer.parseInt(property)); ((ThreadPoolExecutor)threadPool).setMaximumPoolSize(Integer.parseInt(property)); } @@ -48,18 +49,20 @@ threadPool.submit(taskRunnable); try { synchronized (semaphore) { - while (!taskRunnable.isFinished()) + while (!taskRunnable.isFinished()) { semaphore.wait(); + } } } catch (InterruptedException e) { e.printStackTrace(); } Throwable exception = taskRunnable.getException(); if (exception != null) { - if (exception instanceof BuildException) + if (exception instanceof BuildException) { throw (BuildException)exception; - else + } else { exception.printStackTrace(); + } } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/ModelPropertiesTask.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/ModelPropertiesTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/ModelPropertiesTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -19,9 +19,10 @@ import java.io.File; import java.io.IOException; + import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.tools.ant.Project; import org.dom4j.DocumentException; import com.nokia.ant.ModelPropertiesParser; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/StopLogToConsoleTask.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/StopLogToConsoleTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/taskdefs/StopLogToConsoleTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -19,9 +19,13 @@ package com.nokia.ant.taskdefs; import org.apache.tools.ant.Task; + import com.nokia.ant.HeliumLogger; /** + * This task is deprecated, please consider using the + * hlm:taskRecorder task from the logging framework. + * * This task will control the outputing of the Helium logger. * * Example of usage, to stop logging to console: @@ -35,7 +39,10 @@ *
    * * @ant.task name="logtoconsole" category="Logging" + * @deprecated This task is deprecated, please consider using the + * hlm:taskRecorder task from the logging framework. */ +@Deprecated public class StopLogToConsoleTask extends Task { private boolean stopLogToConsole; @@ -62,11 +69,13 @@ super.execute(); if (HeliumLogger.getStopLogToConsole() != stopLogToConsole) { - if (stopLogToConsole) - log("Logging to console suspended."); + if (stopLogToConsole) { + log("Logging to console suspended."); + } HeliumLogger.setStopLogToConsole(stopLogToConsole); - if (!stopLogToConsole) - log("Logging to console resumed."); + if (!stopLogToConsole) { + log("Logging to console resumed."); + } } } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/util/Helper.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/util/Helper.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/util/Helper.java Mon Sep 13 13:11:19 2010 +0800 @@ -29,8 +29,9 @@ public static String getProperty(Project project, String val) throws Exception { String prop = project.getProperty(val); - if (prop == null) + if (prop == null) { throw new Exception(val + " not defined"); + } return prop; } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ant/util/ToolsProcess.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ant/util/ToolsProcess.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/ant/util/ToolsProcess.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,18 +17,15 @@ package com.nokia.ant.util; -import java.util.Hashtable; +import org.apache.log4j.Logger; import com.nokia.tools.Tool; import com.nokia.tools.ToolsProcessException; -import org.apache.log4j.Logger; /** * Utility class to read property value, if property is not defined it will raise an exception. * */ public final class ToolsProcess { - private static Hashtable tools = new Hashtable(); - private static Logger log; private ToolsProcess() { } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/ivy/ToolResolver.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/ivy/ToolResolver.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,396 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -package com.nokia.ivy; - -import java.io.*; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; - -import org.apache.ivy.core.IvyPatternHelper; -import org.apache.ivy.core.module.descriptor.Artifact; -import org.apache.ivy.core.module.descriptor.DefaultArtifact; -import org.apache.ivy.core.module.descriptor.DependencyDescriptor; -import org.apache.ivy.core.module.descriptor.ModuleDescriptor; -import org.apache.ivy.core.module.id.ModuleRevisionId; -import org.apache.ivy.core.resolve.ResolveData; -import org.apache.ivy.core.settings.IvyPattern; -import org.apache.ivy.plugins.latest.LatestStrategy; -import org.apache.ivy.plugins.repository.BasicResource; -import org.apache.ivy.plugins.repository.Resource; -import org.apache.ivy.plugins.resolver.BasicResolver; -import org.apache.ivy.plugins.resolver.util.MDResolvedResource; -import org.apache.ivy.plugins.resolver.util.ResolvedResource; -import org.apache.ivy.plugins.resolver.util.ResourceMDParser; -import org.apache.ivy.plugins.version.VersionMatcher; -import org.apache.ivy.util.Message; - - -/** - * Ivy plugin to read tool versions - */ -public class ToolResolver extends BasicResolver -{ - - private static final Map IVY_ARTIFACT_ATTRIBUTES = new HashMap(); - static { - IVY_ARTIFACT_ATTRIBUTES.put(IvyPatternHelper.ARTIFACT_KEY, "ivy"); - IVY_ARTIFACT_ATTRIBUTES.put(IvyPatternHelper.TYPE_KEY, "ivy"); - IVY_ARTIFACT_ATTRIBUTES.put(IvyPatternHelper.EXT_KEY, "xml"); - } - - private List ivyPatterns = new ArrayList(); // List (String pattern) - private List artifactPatterns = new ArrayList(); // List (String pattern) - private boolean m2compatible; - - - public ResolvedResource findIvyFileRef(DependencyDescriptor dd, ResolveData data) { - ModuleRevisionId mrid = dd.getDependencyRevisionId(); - if (isM2compatible()) { - mrid = convertM2IdForResourceSearch(mrid); - } - return findResourceUsingPatterns(mrid, ivyPatterns, DefaultArtifact.newIvyArtifact(mrid, data.getDate()), getRMDParser(dd, data), data.getDate()); - } - - protected ResolvedResource findArtifactRef(Artifact artifact, Date date) { - ModuleRevisionId mrid = artifact.getModuleRevisionId(); - if (isM2compatible()) { - mrid = convertM2IdForResourceSearch(mrid); - } - return findResourceUsingPatterns(mrid, artifactPatterns, artifact, getDefaultRMDParser(artifact.getModuleRevisionId().getModuleId()), date); - } - - @SuppressWarnings("unchecked") - protected ResolvedResource findResourceUsingPatterns(ModuleRevisionId moduleRevision, List patternList, Artifact artifact, ResourceMDParser rmdparser, Date date) { - ResolvedResource rres = null; - - List resolvedResources = new ArrayList(); - boolean dynamic = getSettings().getVersionMatcher().isDynamic(moduleRevision); - boolean stop = false; - for (Iterator iter = patternList.iterator(); iter.hasNext() && !stop;) { - String pattern = (String)iter.next(); - rres = findResourceUsingPattern(moduleRevision, pattern, artifact, rmdparser, date); - if (rres != null) { - resolvedResources.add(rres); - stop = !dynamic; // stop iterating if we are not searching a dynamic revision - } - } - - if (resolvedResources.size() > 1) { - ResolvedResource[] rress = (ResolvedResource[]) resolvedResources.toArray(new ResolvedResource[resolvedResources.size()]); - rres = findResource(rress, getName(), getLatestStrategy(), getSettings().getVersionMatcher(), rmdparser, moduleRevision, date); - } - - return rres; - } - - @SuppressWarnings("unchecked") - public ResolvedResource findResource( - ResolvedResource[] rress, - String name, - LatestStrategy strategy, - VersionMatcher versionMatcher, - ResourceMDParser rmdparser, - ModuleRevisionId mrid, - Date date) { - ResolvedResource found = null; - List sorted = strategy.sort(rress); - List rejected = new ArrayList(); - for (ListIterator iter = sorted.listIterator(sorted.size()); iter.hasPrevious();) { - ResolvedResource rres = (ResolvedResource) iter.previous(); - if (date != null && rres.getLastModified() > date.getTime()) { - Message.verbose("\t" + name + ": too young: " + rres); - rejected.add(rres.getRevision() + " (" + rres.getLastModified() + ")"); - continue; - } - ModuleRevisionId foundMrid = ModuleRevisionId.newInstance(mrid, rres.getRevision()); - if (!versionMatcher.accept(mrid, foundMrid)) { - Message.debug("\t" + name + ": rejected by version matcher: " + rres); - rejected.add(rres.getRevision()); - continue; - } - if (versionMatcher.needModuleDescriptor(mrid, foundMrid)) { - ResolvedResource resolvedResource = rmdparser.parse(rres.getResource(), rres.getRevision()); - ModuleDescriptor md = ((MDResolvedResource)resolvedResource).getResolvedModuleRevision().getDescriptor(); - if (md.isDefault()) { - Message.debug("\t" + name + ": default md rejected by version matcher requiring module descriptor: " + rres); - rejected.add(rres.getRevision() + " (MD)"); - continue; - } else if (!versionMatcher.accept(mrid, md)) { - Message.debug("\t" + name + ": md rejected by version matcher: " + rres); - rejected.add(rres.getRevision() + " (MD)"); - continue; - } else { - found = resolvedResource; - } - } else { - found = rres; - } - - if (found != null) { - if (!found.getResource().exists()) { - Message.debug("\t" + name + ": resource not reachable for " + mrid + ": res=" + found.getResource()); - logAttempt(found.getResource().toString()); - continue; - } - break; - } - } - if (found == null && !rejected.isEmpty()) { - logAttempt(rejected.toString()); - } - - return found; - } - - @SuppressWarnings("unchecked") - protected Collection findNames(Map tokenValues, String token) { - Collection names = new HashSet(); - names.addAll(findIvyNames(tokenValues, token)); - if (isAllownomd()) { - names.addAll(findArtifactNames(tokenValues, token)); - } - return names; - } - - protected Collection findIvyNames(Map tokenValues, String token) { - Collection names = new HashSet(); - tokenValues = new HashMap(tokenValues); - tokenValues.put(IvyPatternHelper.ARTIFACT_KEY, "ivy"); - tokenValues.put(IvyPatternHelper.TYPE_KEY, "ivy"); - tokenValues.put(IvyPatternHelper.EXT_KEY, "xml"); - findTokenValues(names, getIvyPatterns(), tokenValues, token); - getSettings().filterIgnore(names); - return names; - } - - protected Collection findArtifactNames(Map tokenValues, String token) { - Collection names = new HashSet(); - tokenValues = new HashMap(tokenValues); - tokenValues.put(IvyPatternHelper.ARTIFACT_KEY, tokenValues.get(IvyPatternHelper.MODULE_KEY)); - tokenValues.put(IvyPatternHelper.TYPE_KEY, "jar"); - tokenValues.put(IvyPatternHelper.EXT_KEY, "jar"); - findTokenValues(names, getArtifactPatterns(), tokenValues, token); - getSettings().filterIgnore(names); - return names; - } - - // should be overridden by subclasses wanting to have listing features - protected void findTokenValues(Collection names, List patterns, Map tokenValues, String token) { - } - /** - * example of pattern : ~/Workspace/[module]/[module].ivy.xml - * @param pattern - */ - public void addIvyPattern(String pattern) { - ivyPatterns.add(pattern); - } - - public void addArtifactPattern(String pattern) { - artifactPatterns.add(pattern); - } - - public List getIvyPatterns() { - return Collections.unmodifiableList(ivyPatterns); - } - - public List getArtifactPatterns() { - return Collections.unmodifiableList(artifactPatterns); - } - protected void setIvyPatterns(List ivyPatterns) { - this.ivyPatterns = ivyPatterns; - } - protected void setArtifactPatterns(List artifactPatterns) { - this.artifactPatterns = artifactPatterns; - } - - /* - * Methods respecting ivy conf method specifications - */ - public void addConfiguredIvy(IvyPattern p) { - ivyPatterns.add(p.getPattern()); - } - - public void addConfiguredArtifact(IvyPattern p) { - artifactPatterns.add(p.getPattern()); - } - - public void dumpSettings() { - super.dumpSettings(); - Message.debug("\t\tm2compatible: " + isM2compatible()); - Message.debug("\t\tivy patterns:"); - for (ListIterator iter = getIvyPatterns().listIterator(); iter.hasNext();) { - String pattern = (String)iter.next(); - Message.debug("\t\t\t" + pattern); - } - Message.debug("\t\tartifact patterns:"); - for (ListIterator iter = getArtifactPatterns().listIterator(); iter.hasNext();) { - String pattern = (String)iter.next(); - Message.debug("\t\t\t" + pattern); - } - } - - public boolean isM2compatible() { - return m2compatible; - } - - public void setM2compatible(boolean m2compatible) { - this.m2compatible = m2compatible; - } - - protected ModuleRevisionId convertM2IdForResourceSearch(ModuleRevisionId mrid) { - if (mrid.getOrganisation().indexOf('.') == -1) { - return mrid; - } - return ModuleRevisionId.newInstance(mrid.getOrganisation().replace('.', '/'), mrid.getName(), mrid.getBranch(), mrid.getRevision(), mrid.getExtraAttributes()); - } - - - - public void publish(Artifact artifact, File src, boolean overwrite) throws IOException - { - Message.verbose("ToolResolver.publish() start"); - } - - private static File findExecutableOnPath(String executableName) { - String systemPath = System.getenv("PATH"); - String[] pathDirs = systemPath.split(File.pathSeparator); - String[] extensions = {""}; - - // Using PATHEXT to get the supported extenstions on windows platform - if (System.getProperty("os.name").toLowerCase().startsWith("win")) { - extensions = System.getenv("PATHEXT").split(File.pathSeparator); - } - - for (String extension : extensions) { - String checkName = executableName; - if (System.getProperty("os.name").toLowerCase().startsWith("win") && !executableName.toLowerCase().endsWith(extension.toLowerCase())) { - checkName = executableName + extension; - } - - File file = new File(checkName); - if (file.isAbsolute()) { - Message.verbose("Testing: " + file.getAbsolutePath()); - if (file.isFile()) { - return file; - } - } - for (String pathDir : pathDirs) { - file = new File(pathDir, checkName); - Message.verbose("Testing: " + file.getAbsolutePath()); - if (file.isFile()) { - return file; - } - } - } - return null; - } - - protected ResolvedResource findResourceUsingPattern(ModuleRevisionId mrid, String pattern, - Artifact artifact, ResourceMDParser rmdparser, Date date) - { - Message.verbose("ToolResolver.findResourceUsingPattern() start"); - - Message.verbose(artifact.getName()); - Message.verbose(mrid.getRevision()); - Message.verbose(artifact.getAttribute("versionArgs")); - - String toolVersion = mrid.getRevision(); - ResolvedResource resolvedResource = null; - try - { - File executable = findExecutableOnPath(artifact.getName()); - if (executable == null) { - return null; - } - Message.verbose("executable: " + executable.getAbsolutePath()); - String versionText = getToolVersion(executable, artifact.getAttribute("versionArgs")); - Message.verbose(versionText); - - if (versionText.contains(toolVersion) || versionText.matches(artifact.getAttribute("versionExp"))) - { - BasicResource resource = new BasicResource(executable.getAbsolutePath(), true, 0, 0, true); - resolvedResource = new ResolvedResource(resource, toolVersion); - } - } - catch (IOException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return resolvedResource; - } - - @Override - protected long get(Resource resource, File dest) throws IOException - { - Message.verbose("ToolResolver.get() start"); - return 0; - } - - private String getToolVersion(File executable, String versionArgs) throws IOException - { - Runtime runtime = Runtime.getRuntime(); - Message.verbose("'" + executable.getAbsolutePath() + " " + versionArgs + "'"); - //Process toolProcess = runtime.exec(toolName+ "." + toolType + " " + versionArgs); - Process toolProcess = runtime.exec(executable.getAbsolutePath() + " " + versionArgs); - InputStream in = toolProcess.getInputStream(); - InputStream err = toolProcess.getErrorStream(); - String outText = toString(in).trim(); - String errText = toString(err).trim(); - Message.verbose("err: " + errText); - return outText + errText; - } - - private String toString(InputStream inputStream) throws IOException - { - byte[] buffer = new byte[4096]; - OutputStream outputStream = new ByteArrayOutputStream(); - - while (true) { - int read = inputStream.read(buffer); - - if (read == -1) { - break; - } - - outputStream.write(buffer, 0, read); - } - - outputStream.close(); - inputStream.close(); - - return outputStream.toString(); - } - - @Override - protected Resource getResource(String arg0) throws IOException { - // TODO Auto-generated method stub - return null; - } - -} - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/tools/Tool.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/tools/Tool.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/tools/Tool.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,9 @@ package com.nokia.tools; +import org.apache.tools.ant.Project; + import com.nokia.helium.core.ant.types.VariableSet; -import org.apache.tools.ant.Project; /** * Common interface for the command line tool wrapper */ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/tools/cone/CONETool.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/tools/cone/CONETool.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/tools/cone/CONETool.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,19 +1,19 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.tools.cone; @@ -27,50 +27,55 @@ import com.nokia.tools.Tool; import com.nokia.tools.ToolsProcessException; - /** * To generate the cenrep files using ConE tool. - * - * */ public class CONETool implements Tool { - + private Map varMapping = new HashMap(); - public void execute(VariableSet varSet, Project prj) - throws ToolsProcessException { - // TODO Auto-generated method stub + public void execute(VariableSet varSet, Project prj) throws ToolsProcessException { + } - } - - /** * Run the cone command with arguments from hashmap. + * * @param prj * @throws ToolsProcessException */ public void execute(Project prj) throws ToolsProcessException { - + String command = null; + String osType = System.getProperty("os.name"); org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask(); task.setTaskName("ConE"); task.setDir(new java.io.File(varMapping.get("path"))); task.setExecutable("cmd.exe"); + command = "cmd.exe"; task.setOutput(new File(varMapping.get("output"))); task.createArg().setValue("/c"); task.setAppend(true); task.createArg().setValue("cone.cmd"); - task.createArg().setValue("generate"); - for (Map.Entry varEntry : varMapping.entrySet() ) { - if ( !varEntry.getKey().equals("path") && !varEntry.getKey().equals("output")) { + task.createArg().setValue(varMapping.get("command")); + command += " /c cone.cmd " + varMapping.get("command"); + for (Map.Entry varEntry : varMapping.entrySet()) { + if (!varEntry.getKey().equals("path") && !varEntry.getKey().equals("output")) { task.createArg().setValue(varEntry.getKey()); + command += " " + varEntry.getKey(); task.createArg().setValue(varEntry.getValue()); + command += " " + varEntry.getValue(); } } + if (!osType.toLowerCase().startsWith("win")) { + task.log("ConE tool runs only on windows platforms."); + return; + } + task.log("Running ConE command \"" + command + "\""); task.execute(); } - + /** * To Store the variable and it value into hashmap to read them later. + * * @param name * @param value */ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/src/com/nokia/tools/configuration/CONFIGURATIONTool.java --- a/buildframework/helium/sf/java/legacy/src/com/nokia/tools/configuration/CONFIGURATIONTool.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/src/com/nokia/tools/configuration/CONFIGURATIONTool.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,26 +1,28 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.tools.configuration; +import org.apache.tools.ant.Project; + import com.nokia.helium.core.ant.MappedVariable; import com.nokia.helium.core.ant.types.VariableSet; -import com.nokia.tools.*; -import org.apache.tools.ant.Project; +import com.nokia.tools.Tool; +import com.nokia.tools.ToolsProcessException; /** * Command Line wrapper for configuration tools @@ -28,14 +30,12 @@ public class CONFIGURATIONTool implements Tool { /** - * Sets the command line variables to be used to execute and validates for - * the required parameters + * Sets the command line variables to be used to execute and validates for the required + * parameters * - * @param varSet - * variable(name / value list) + * @param varSet variable(name / value list) */ - public void execute(VariableSet varSet, Project prj) - throws ToolsProcessException { + public void execute(VariableSet varSet, Project prj) throws ToolsProcessException { String path = null; String masterConf = null; String confml = null; @@ -50,17 +50,23 @@ value = variable.getValue(); if (varName.equals("path")) { path = value; - } else if (varName.equals("master_conf")) { + } + else if (varName.equals("master_conf")) { masterConf = value; - } else if (varName.equals("confml")) { + } + else if (varName.equals("confml")) { confml = value; - } else if (varName.equals("impl")) { + } + else if (varName.equals("impl")) { impl = value; - } else if (varName.equals("iby")) { + } + else if (varName.equals("iby")) { iby = value; - } else if (varName.equals("keepgoing")) { + } + else if (varName.equals("keepgoing")) { keepGoing = value; - } else if (varName.equals("report")) { + } + else if (varName.equals("report")) { report = value; } } @@ -73,7 +79,8 @@ task.setExecutable(path + java.io.File.separator + "cli_build.cmd"); if (keepGoing.equals("false")) { task.setFailonerror(true); - } else { + } + else { task.createArg().setValue("-ignore_errors"); } task.createArg().setValue("-master_conf"); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/antunit/run-scenario.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/legacy/tests/antunit/run-scenario.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,68 @@ + + + + Helium Antlib feature enabler macro. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/antunit/test_common.ant.xml --- a/buildframework/helium/sf/java/legacy/tests/antunit/test_common.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/tests/antunit/test_common.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -55,19 +55,6 @@
    - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/antunit/test_feature_enabled_flags.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/legacy/tests/antunit/test_feature_enabled_flags.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,73 @@ + + + + + Testing targets. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/data/ivy/ivy.xml --- a/buildframework/helium/sf/java/legacy/tests/data/ivy/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/data/ivy/modules/ant-1.6.2.ivy.xml --- a/buildframework/helium/sf/java/legacy/tests/data/ivy/modules/ant-1.6.2.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - Apache Ant. Used for the core build process. - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/data/ivy/modules/ant-1.7.ivy.xml --- a/buildframework/helium/sf/java/legacy/tests/data/ivy/modules/ant-1.7.ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - Apache Ant. Used for the core build process. - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/data/ivy/tools_ivy_settings.xml --- a/buildframework/helium/sf/java/legacy/tests/data/ivy/tools_ivy_settings.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/scenarii/bld.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/legacy/tests/scenarii/bld.sh Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,22 @@ +#!/bin/bash + +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +if [ -f ~/.bashrc ] ; then + . ~/.bashrc +fi +ant $* diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/scenarii/build.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/legacy/tests/scenarii/build.bat Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ +@echo off + +rem +rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +rem All rights reserved. +rem This component and the accompanying materials are made available +rem under the terms of the License "Eclipse Public License v1.0" +rem which accompanies this distribution, and is available +rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +rem +rem Initial Contributors: +rem Nokia Corporation - initial contribution. +rem +rem Contributors: +rem +rem Description: +rem + +setlocal +if not defined JAVA_6_HOME ( +set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 +) ELSE set TESTED_JAVA=%JAVA_6_HOME% +if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%) +call ant %* +if "%ERRORLEVEL%" neq "0" (goto error) +endlocal +goto :eof + +:error +endlocal +if "%OS%"=="Windows_NT" color 00 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/scenarii/property/feature.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/legacy/tests/scenarii/property/feature.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,62 @@ + + + + Helium Antlib logger unittests. + + + + + + + + + + + + + Inside the temp target + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/scenarii/test/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/legacy/tests/scenarii/test/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,85 @@ + + + + Helium Antlib logger unittests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Running run-target-disabled + + + + Running run-target-enabled + + + + Running run-with-old-flag-enabled + + + + Running run-with-new-flag-enabled + + + + Running run-with-both-enabled + + + + Running run-with-unless-enabled + + + + Running run-with-unless-internal-enabled + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/legacy/tests/src/com/nokia/ant/HeliumLoggerTest.java --- a/buildframework/helium/sf/java/legacy/tests/src/com/nokia/ant/HeliumLoggerTest.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/legacy/tests/src/com/nokia/ant/HeliumLoggerTest.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,7 +17,7 @@ package com.nokia.ant; -import junit.framework.*; +import junit.framework.TestCase; /** * Test class for Helium Logger. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/antlib.xml --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -25,10 +25,10 @@ + - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/AntLoggingHandler.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/AntLoggingHandler.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/AntLoggingHandler.java Mon Sep 13 13:11:19 2010 +0800 @@ -20,22 +20,22 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Enumeration; +import java.util.HashMap; import java.util.Hashtable; -import java.util.HashMap; import java.util.Map; import java.util.Vector; +import java.util.Map.Entry; +import org.apache.log4j.Logger; import org.apache.tools.ant.BuildEvent; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Target; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.LogLevel; -import org.apache.tools.ant.BuildException; -import org.apache.log4j.Logger; +import com.nokia.helium.core.ant.types.Stage; import com.nokia.helium.logger.ant.types.StageLogging; -import com.nokia.helium.logger.ant.types.Stage; /** * Ant logging class for each Stage. @@ -70,7 +70,7 @@ stageRecordMap = new HashMap(); depStartTargetMap = new HashMap>(); stageStartTargetMap = new HashMap(); - initStagesInformation(project); + initialize(project); } /** @@ -87,13 +87,12 @@ */ public void handleTargetFinished(BuildEvent event) { // log.debug("Finished target [" + event.getTarget().getName() + "]"); - if (isEndTarget(event.getTarget().getName()) - && getIsStageRecordingHappening() && (getLoggingStarted())) { - log.debug("Stopping stage logging for [" + currentStageName - + "] for target [" + event.getTarget().getName() + "]"); + if (isEndTarget(event.getTarget().getName()) && getIsStageRecordingHappening() + && (getLoggingStarted())) { + log.debug("Stopping stage logging for [" + currentStageName + "] for target [" + + event.getTarget().getName() + "]"); stopLog(currentStageName, "default"); - if (!isDefaultStageStarted) - { + if (!isDefaultStageStarted) { startLog("default"); isDefaultStageStarted = true; } @@ -116,11 +115,10 @@ if (currentStageName == null && !getIsStageRecordingHappening() && getLoggingStarted()) { String stageName = isStageValid(event.getTarget(), event.getProject()); if (stageName != null) { - log.debug("Started stage logging for [" + stageName - + "] for target [" + event.getTarget().getName() + "]"); + log.debug("Started stage logging for [" + stageName + "] for target [" + + event.getTarget().getName() + "]"); - if (isDefaultStageStarted) - { + if (isDefaultStageStarted) { stopLog("default", stageName); isDefaultStageStarted = false; } @@ -143,13 +141,12 @@ public void handleBuildFinished(BuildEvent event) { /* - * If any stage logging is happening stop logging into stage log file - * and switch to main/default ant log file. + * If any stage logging is happening stop logging into stage log file and switch to + * main/default ant log file. */ if (getLoggingStarted() && getIsStageRecordingHappening()) { stopLog(currentStageName, "default"); - if (!isDefaultStageStarted) - { + if (!isDefaultStageStarted) { startLog("default"); isDefaultStageStarted = true; } @@ -157,8 +154,7 @@ } /* - * If default stage logging happening stop logging into default ant log - * file. + * If default stage logging happening stop logging into default ant log file. */ if (isDefaultStageStarted && getLoggingStarted()) { stopLog("default", null, event); @@ -187,8 +183,7 @@ /** * Sets the level to which this recorder entry should log to. * - * @param level - * the level to set. + * @param level the level to set. * @see VerbosityLevelChoices */ public void setLoglevel(VerbosityLevelChoices level) { @@ -196,8 +191,8 @@ } /** - * A list of possible values for the setLoglevel() method. - * Possible values include: error, warn, info, verbose, debug. + * A list of possible values for the setLoglevel() method. Possible values include: + * error, warn, info, verbose, debug. */ public static class VerbosityLevelChoices extends LogLevel { } @@ -218,8 +213,7 @@ * @return */ private String getDateTime() { - DateFormat dateFormat = new SimpleDateFormat( - "EE yyyy/MM/dd HH:mm:ss:SS aaa"); + DateFormat dateFormat = new SimpleDateFormat("EE yyyy/MM/dd HH:mm:ss:SS aaa"); Date date = new Date(); return dateFormat.format(date); } @@ -241,30 +235,28 @@ * @param message * @param task */ - public void doLoggingAction(String stageName, boolean action, - String message, Task task, Target target) { + public void doLoggingAction(String stageName, boolean action, String message, Task task, + Target target) { String time = getDateTime(); File fileName; if (stageName.equalsIgnoreCase("default")) { - if (stageRecordMap.get("default") == null) + if (stageRecordMap.get("default") == null) { throw new BuildException("stageRecordMap.get('default') is null"); + } fileName = stageRecordMap.get("default").getDefaultOutput(); } else { fileName = stageRecordMap.get(stageName).getOutput(); } if (fileName.exists()) { - for (Map.Entry entry : recorderEntries - .entrySet()) { - if (fileName.equals(entry.getKey()) - && (getRecorderEntry(fileName) != null) - && (fileCreatedMap.get(fileName))) { + for (Map.Entry entry : recorderEntries.entrySet()) { + if (fileName.equals(entry.getKey()) && (getRecorderEntry(fileName) != null) + && (fileCreatedMap.get(fileName))) { RecorderEntry recorderEntry = getRecorderEntry(fileName); - recorderEntry.addLogMessage(message + " logging into " - + fileName + " from " + task.getTaskName() - + " task at " + time); - log.debug(message + " logging into " + fileName + " from " - + task.getTaskName() + " task at " + time); + recorderEntry.addLogMessage(message + " logging into " + fileName + " from " + + task.getTaskName() + " task at " + time); + log.debug(message + " logging into " + fileName + " from " + task.getTaskName() + + " task at " + time); recorderEntry.setRecordState(action); break; } @@ -273,15 +265,13 @@ } /** - * Called by LogReplace task to find and replace any property values which - * are not updated. + * Called by LogReplace task to find and replace any property values which are not updated. * * @param regExp */ public void addRegExp(String regExp) { if (!regExp.equals("")) { - for (Map.Entry entry : recorderEntries - .entrySet()) { + for (Map.Entry entry : recorderEntries.entrySet()) { RecorderEntry recorderEntry = entry.getValue(); recorderEntry.addRegexp(regExp); } @@ -289,57 +279,57 @@ } /** - * To initialize stages information. + * Initializing stage logging data. + * Gathering all stagerecord. * - * @param proj - */ - - @SuppressWarnings("unchecked") - private void initStagesInformation(Project proj) { - log.debug("initStagesInformation: project: " + proj.getName()); - Hashtable references = proj.getReferences(); - Enumeration keyEnum = references.keys(); - validateDefaultStage(references); - while (keyEnum.hasMoreElements()) { - String key = keyEnum.nextElement(); - if (references.get(key) instanceof Stage) { - Stage tempStage = (Stage) references.get(key); - validateStageInformation(key, tempStage); - log.debug("Found stage [" + key + "] for recording"); - stagesMapping.put(key, (Stage) references.get(key)); - getStageRecordInformation(proj, key); - initDependentTargetMap(proj, key, tempStage.getStartTarget(), - tempStage.getEndTarget()); - } - } - } - - /** - * To initialize stage record information. - * - * @param proj - * @param stageKey + * @param project */ @SuppressWarnings("unchecked") - private void getStageRecordInformation(Project proj, String stageKey) { - Hashtable references = proj.getReferences(); - matchStageName(references, stageKey); - Enumeration keyEnum = references.keys(); - while (keyEnum.hasMoreElements()) { - String key = keyEnum.nextElement(); - if (references.get(key) instanceof StageLogging) { - StageLogging tempStageLogging = (StageLogging) references - .get(key); - if ((tempStageLogging.getStageRefID() != null) - && (tempStageLogging.getStageRefID().equals(stageKey))) { - validateStageLogging(key, tempStageLogging); - stageRecordMap.put(stageKey, tempStageLogging); - return; + private void initialize(Project project) { + Map references = (Hashtable)project.getReferences(); + //matchStageName(references, stageKey); + for (Entry entry : references.entrySet()) { + if (entry.getValue() instanceof StageLogging) { + StageLogging tempStageLogging = (StageLogging)entry.getValue(); + // Is the stagerecord having a defaultoutput attribute, + // if yes, it is the default recorder. + if (tempStageLogging.getDefaultOutput() != null) { + stageRecordMap.put("default", tempStageLogging); + registerRecorderEntry(tempStageLogging.getDefaultOutput(), tempStageLogging, StatusAndLogListener.getStatusAndLogListener().getProject()); + } else if (tempStageLogging.getStageRefID() != null) { + if (references.containsKey(tempStageLogging.getStageRefID())) { + if (references.get(tempStageLogging.getStageRefID()) instanceof Stage) { + // Check the stage + Stage stage = (Stage)references.get(tempStageLogging.getStageRefID()); + validateStageInformation(tempStageLogging.getStageRefID(), stage); + log.debug("Found stage [" + tempStageLogging.getStageRefID() + "] for recording"); + stagesMapping.put(tempStageLogging.getStageRefID(), stage); + // check the stage logging. + validateStageLogging(entry.getKey(), tempStageLogging); + stageRecordMap.put(tempStageLogging.getStageRefID(), tempStageLogging); + } else { + throw new BuildException("Invalid stagerecord stageRefId attribute value, " + + "the '" + tempStageLogging.getStageRefID() + "' id doesn't refer to a stage type at " + + tempStageLogging.getLocation().toString()); + + } + } else { + throw new BuildException("Invalid stagerecord stageRefId attribute value, " + + "the '" + tempStageLogging.getStageRefID() + "' id doesn't exist at " + + tempStageLogging.getLocation().toString()); + } + } else { + throw new BuildException("Invalid stagerecord configuration, " + + "the stageRefId attribute is not defined at " + + tempStageLogging.getLocation().toString()); } } } + if (!stageRecordMap.containsKey("default")) { + throw new BuildException("There must be one default stagerecord datatype."); + } } - + /** * To start logging for respective stage. * @@ -355,12 +345,12 @@ fileName = stageRecordMap.get("default").getDefaultOutput(); stageLogging = stageRecordMap.get("default"); message = "Starting logging into " + fileName + " at " + time; - } else { + } + else { fileName = stageRecordMap.get(stageName).getOutput(); stageLogging = stageRecordMap.get(stageName); this.isStageRecordingHappening = true; - message = "Starting logging for " + stageName + " into " + fileName - + " at " + time; + message = "Starting logging for " + stageName + " into " + fileName + " at " + time; } if (getRecorderEntry(fileName) != null) { RecorderEntry recorderEntry = getRecorderEntry(fileName); @@ -379,7 +369,8 @@ * @param stageLogging * @return */ - private boolean isFilePresent(RecorderEntry recorderEntry, File fileName, StageLogging stageLogging) { + private boolean isFilePresent(RecorderEntry recorderEntry, File fileName, + StageLogging stageLogging) { log.debug("isFilePresent? " + fileName); if (!fileCreatedMap.get(fileName)) { if (!fileName.getParentFile().exists()) { @@ -388,13 +379,15 @@ } if (fileName.exists()) { long timestamp = System.currentTimeMillis(); - getProject().log("Backing up of " + fileName + " into " + fileName + "." + timestamp); + getProject().log("Backing up of " + fileName + " into " + fileName + "." + + timestamp); fileName.renameTo(new File(fileName.getAbsoluteFile() + "." + timestamp)); } recorderEntry.openFile(stageLogging.getAppend()); fileCreatedMap.put(fileName, true); return true; - } else { + } + else { return true; } @@ -417,8 +410,7 @@ * @param startStageName * @param event */ - private void stopLog(String stopStageName, String startStageName, - BuildEvent event) { + private void stopLog(String stopStageName, String startStageName, BuildEvent event) { File fileName; String message; String time = getDateTime(); @@ -426,17 +418,19 @@ if (stopStageName.equals("default")) { fileName = stageRecordMap.get("default").getDefaultOutput(); message = "Stopping logging into " + fileName + " at " + time; - if (startStageName != null) + if (startStageName != null) { message = message + "\nStarting logging into " - + stageRecordMap.get(startStageName).getOutput(); - } else { + + stageRecordMap.get(startStageName).getOutput(); + } + } + else { fileName = stageRecordMap.get(stopStageName).getOutput(); this.isStageRecordingHappening = false; - message = "Stopping logging for " + stopStageName + " into " - + fileName + " at " + time; - if (startStageName != null) + message = "Stopping logging for " + stopStageName + " into " + fileName + " at " + time; + if (startStageName != null) { message = message + "\nResuming logging into " - + stageRecordMap.get("default").getDefaultOutput(); + + stageRecordMap.get("default").getDefaultOutput(); + } } if (getRecorderEntry(fileName) != null) { RecorderEntry recorderEntry = getRecorderEntry(fileName); @@ -456,8 +450,7 @@ * @param stageLogging * @param proj */ - private void registerRecorderEntry(File fileName, - StageLogging stageLogging, Project proj) { + private void registerRecorderEntry(File fileName, StageLogging stageLogging, Project proj) { log.debug("Registering recorderentry for log file [" + fileName + "]"); RecorderEntry recorderEntry = getRecorder(fileName); antLogLevel.setValue(stageLogging.getLogLevel()); @@ -465,8 +458,9 @@ recorderEntry.setMessageOutputLevel(loglevel); recorderEntry.setEmacsMode(false); recorderEntry.setRecordState(false); - if (fileCreatedMap.get(fileName) == null) + if (fileCreatedMap.get(fileName) == null) { fileCreatedMap.put(fileName, false); + } } /** @@ -477,29 +471,29 @@ * @return */ private String isStageValid(Target target, Project proj) { - //if (!proj.getName().equals(StatusAndLogListener.getStatusAndLogListener().getProject().getName()) && (StatusAndLogListener.getStatusAndLogListener().getProject().getName() != null)) { - initSubProjectDependentTarget(proj); - //} + // if + // (!proj.getName().equals(StatusAndLogListener.getStatusAndLogListener().getProject().getName()) + // && (StatusAndLogListener.getStatusAndLogListener().getProject().getName() != null)) { + initSubProjectDependentTarget(proj); + // } for (Map.Entry entry : stagesMapping.entrySet()) { Stage stage = entry.getValue(); if (stage.getStartTarget().equals(target.getName()) - && validateStageTargets(proj, stage.getStartTarget(), stage - .getEndTarget())) { - log.debug("Found stage [" + entry.getKey() + "] for target [" - + target.getName() + "]"); + && validateStageTargets(proj, stage.getStartTarget(), stage.getEndTarget())) { + log.debug("Found stage [" + entry.getKey() + "] for target [" + target.getName() + + "]"); return entry.getKey(); } if (stageStartTargetMap.get(entry.getKey()) != null) { - if (stageStartTargetMap.get(entry.getKey()).getName().equals( - target.getName())) { - log.debug("Found stage [" + entry.getKey() - + "] for dependent target [" + target.getName() - + "]"); + if (stageStartTargetMap.get(entry.getKey()).getName().equals(target.getName())) { + log.debug("Found stage [" + entry.getKey() + "] for dependent target [" + + target.getName() + "]"); return entry.getKey(); } - } else if (isDependentTarget(target, entry.getKey())) { - log.debug("Found stage [" + entry.getKey() - + "] for dependent target [" + target.getName() + "]"); + } + else if (isDependentTarget(target, entry.getKey())) { + log.debug("Found stage [" + entry.getKey() + "] for dependent target [" + + target.getName() + "]"); return entry.getKey(); } } @@ -515,15 +509,13 @@ private boolean isEndTarget(String targetName) { if (stagesMapping.get(currentStageName) != null) { - return stagesMapping.get(currentStageName).getEndTarget().equals( - targetName); + return stagesMapping.get(currentStageName).getEndTarget().equals(targetName); } return false; } /** - * To validate is the endtarget and starttarget are present in the current - * project. + * To validate is the endtarget and starttarget are present in the current project. * * @param proj * @param startTarget @@ -532,12 +524,10 @@ */ @SuppressWarnings("unchecked") - private boolean validateStageTargets(Project proj, String startTarget, - String endTarget) { + private boolean validateStageTargets(Project proj, String startTarget, String endTarget) { Hashtable antTargets = proj.getTargets(); - return antTargets.containsKey(startTarget) - && antTargets.containsKey(endTarget); + return antTargets.containsKey(startTarget) && antTargets.containsKey(endTarget); } /** @@ -580,8 +570,8 @@ * @param endTarget */ @SuppressWarnings("unchecked") - private void initDependentTargetMap(Project proj, String stageKey, - String startTarget, String endTarget) { + private void initDependentTargetMap(Project proj, String stageKey, String startTarget, + String endTarget) { Vector arrayList = null; if (validateStageTargets(proj, startTarget, endTarget)) { arrayList = proj.topoSort(startTarget, proj.getTargets(), false); @@ -605,8 +595,7 @@ for (Map.Entry entry : stagesMapping.entrySet()) { if (depStartTargetMap.get(entry.getKey()) == null) { - initDependentTargetMap(proj, entry.getKey(), entry.getValue() - .getStartTarget(), entry.getValue().getEndTarget()); + initDependentTargetMap(proj, entry.getKey(), entry.getValue().getStartTarget(), entry.getValue().getEndTarget()); } } } @@ -621,12 +610,11 @@ if (stage.getStartTarget() == null) { throw new BuildException("'starttarget' for stage '" + stageKey - + "' should not be null."); + + "' should not be null."); } if (stage.getEndTarget() == null) { - throw new BuildException("'endtarget' for stage '" + stageKey - + "' should not be null."); + throw new BuildException("'endtarget' for stage '" + stageKey + "' should not be null."); } } @@ -636,67 +624,13 @@ * @param stagerefid * @param stageLogging */ - private void validateStageLogging(String stagerefid, - StageLogging stageLogging) { + private void validateStageLogging(String stagerefid, StageLogging stageLogging) { if (stageLogging.getOutput() == null) { - throw new BuildException("'output' attribute for stagelogging '" - + stagerefid + "' should not be null."); + throw new BuildException("'output' attribute for stagelogging '" + stagerefid + + "' should not be null."); } - registerRecorderEntry(stageLogging.getOutput(), stageLogging, - StatusAndLogListener.getStatusAndLogListener().getProject()); - } - - /** - * To validate default stage. - * - * @param stageRecord - */ - private void validateDefaultStage(Hashtable stageRecord) { - - Enumeration keyEnum = stageRecord.keys(); - while (keyEnum.hasMoreElements()) { - String key = keyEnum.nextElement(); - if (stageRecord.get(key) instanceof StageLogging) { - StageLogging tempStageLogging = (StageLogging) stageRecord - .get(key); - if ((tempStageLogging.getStageRefID() == null) - && (tempStageLogging.getDefaultOutput() != null)) { - stageRecordMap.put("default", tempStageLogging); - registerRecorderEntry(tempStageLogging.getDefaultOutput(), - tempStageLogging, StatusAndLogListener - .getStatusAndLogListener().getProject()); - return; - } - } - } - throw new BuildException("There should be one default stagerecord datatype."); - } - - /** - * To validate respective stagelogging for stage datatype. - * - * @param stageRecord - * @param stageKey - */ - private void matchStageName(Hashtable stageRecord, - String stageKey) { - - Enumeration keyEnum = stageRecord.keys(); - while (keyEnum.hasMoreElements()) { - String key = keyEnum.nextElement(); - if (stageRecord.get(key) instanceof StageLogging) { - StageLogging tempStageLogging = (StageLogging) stageRecord - .get(key); - if ((tempStageLogging.getStageRefID() != null) - && (tempStageLogging.getStageRefID().equals(stageKey))) { - return; - } - } - } - throw new BuildException( - "there is no stagelogging datatype matching for stage '" - + stageKey + "'"); + registerRecorderEntry(stageLogging.getOutput(), stageLogging, StatusAndLogListener.getStatusAndLogListener().getProject()); } /** diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/RecorderEntry.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/RecorderEntry.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/RecorderEntry.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,70 +1,62 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.logger.ant.listener; -import java.io.PrintStream; - -import org.apache.log4j.Logger; -import org.apache.tools.ant.BuildEvent; -import org.apache.tools.ant.DefaultLogger; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.util.StringUtils; -import org.apache.tools.ant.BuildException; - import java.io.File; import java.io.FileOutputStream; import java.io.IOException; +import java.io.PrintStream; import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.log4j.Logger; +import org.apache.tools.ant.BuildEvent; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.DefaultLogger; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.util.StringUtils; + /** - * This is a class that represents a recorder. This is the listener to the - * build process. - * + * This is a class that represents a recorder. This is the listener to the build process. + * * @since Ant 1.4 */ -public class RecorderEntry implements BuildEventHandler, TargetEventHandler, TaskEventHandler, MessageEventHandler { +public class RecorderEntry implements BuildEventHandler, TargetEventHandler, TaskEventHandler, + MessageEventHandler { - ////////////////////////////////////////////////////////////////////// - // ATTRIBUTES - - /** The name of the file associated with this recorder entry. */ + /** The name of the file associated with this recorder entry. */ private File filename; - /** The state of the recorder (recorder on or off). */ + /** The state of the recorder (recorder on or off). */ private boolean record = true; - /** The current verbosity level to record at. */ + /** The current verbosity level to record at. */ private int loglevel = Project.MSG_INFO; - /** The output PrintStream to record to. */ + /** The output PrintStream to record to. */ private PrintStream out; - /** The start time of the last know target. */ + /** The start time of the last know target. */ private long targetStartTime; - /** Strip task banners if true. */ + /** Strip task banners if true. */ private boolean emacsMode; - + private Pattern pattern; - + private Vector logRegExps = new Vector(); private Logger log = Logger.getLogger(getClass()); - - ////////////////////////////////////////////////////////////////////// - // CONSTRUCTORS / INITIALIZERS - /** * @param name The name of this recorder (used as the filename). */ @@ -73,9 +65,6 @@ filename = name; } - ////////////////////////////////////////////////////////////////////// - // ACCESSOR METHODS - /** * @return the name of the file the output is sent to. */ @@ -85,34 +74,36 @@ /** * Turns off or on this recorder. - * + * * @param state true for on, false for off, null for no change. */ public void setRecordState(boolean state) { - flush(); - record = state; + flush(); + record = state; } /** * Get the current state of the recorder + * * @param state */ public boolean getRecordState() { return record; } - + /** * To set the regexp to filter the logging. + * * @param regexp */ public void addRegexp(String regexp) { logRegExps.add(regexp); } - + /** * To clear all regexp set. */ - public void resetRegExp() { + public void resetRegExp() { logRegExps.clear(); } @@ -136,9 +127,9 @@ if (error == null) { out.println(StringUtils.LINE_SEP + "BUILD SUCCESSFUL"); - } else { - out.println(StringUtils.LINE_SEP + "BUILD FAILED" - + StringUtils.LINE_SEP); + } + else { + out.println(StringUtils.LINE_SEP + "BUILD FAILED" + StringUtils.LINE_SEP); error.printStackTrace(out); } } @@ -146,12 +137,11 @@ } /** - * Cleans up any resources held by this recorder entry at the end - * of a subbuild if it has been created for the subbuild's project - * instance. - * + * Cleans up any resources held by this recorder entry at the end of a subbuild if it has been + * created for the subbuild's project instance. + * * @param event the buildFinished event - * + * * @since Ant 1.6.2 */ public void handleSubBuildFinished(BuildEvent event) { @@ -161,9 +151,9 @@ /** * Empty implementation to satisfy the BuildListener interface. - * + * * @param event the buildStarted event - * + * * @since Ant 1.6.2 */ public void handleSubBuildStarted(BuildEvent event) { @@ -175,8 +165,7 @@ */ public void handleTargetStarted(BuildEvent event) { log(">> TARGET STARTED -- " + event.getTarget(), Project.MSG_DEBUG); - log(StringUtils.LINE_SEP + event.getTarget().getName() + ":", - Project.MSG_INFO); + log(StringUtils.LINE_SEP + event.getTarget().getName() + ":", Project.MSG_INFO); targetStartTime = System.currentTimeMillis(); } @@ -235,10 +224,10 @@ buf.append(messgeToUpdate); log(buf.toString(), event.getPriority()); } - - + /** * To replace regExp matching with ****. + * * @param message * @return */ @@ -253,10 +242,9 @@ return message; } - /** * The thing that actually sends the information to the output. - * + * * @param mesg The message to log. * @param level The verbosity level of the message. */ @@ -291,7 +279,6 @@ out = output; } - /** * @see BuildLogger#setEmacsMode(boolean) */ @@ -300,7 +287,6 @@ this.emacsMode = emacsMode; } - /** * @see BuildLogger#setErrorPrintStream(PrintStream) */ @@ -309,26 +295,21 @@ setOutputPrintStream(err); } - private static String formatTime(long millis) { // CheckStyle:MagicNumber OFF long seconds = millis / 1000; long minutes = seconds / 60; - if (minutes > 0) { - return Long.toString(minutes) + " minute" - + (minutes == 1 ? " " : "s ") - + Long.toString(seconds % 60) + " second" - + (seconds % 60 == 1 ? "" : "s"); - } else { - return Long.toString(seconds) + " second" - + (seconds % 60 == 1 ? "" : "s"); + return Long.toString(minutes) + " minute" + (minutes == 1 ? " " : "s ") + + Long.toString(seconds % 60) + " second" + (seconds % 60 == 1 ? "" : "s"); + } + else { + return Long.toString(seconds) + " second" + (seconds % 60 == 1 ? "" : "s"); } // CheckStyle:MagicNumber ON } - - + /** * Registering ourselves to the StatusAndLogListener. */ @@ -337,10 +318,10 @@ if (listener != null) { this.log.debug("register"); synchronized (listener) { - listener.register((BuildEventHandler)this); - listener.register((TargetEventHandler)this); - listener.register((TaskEventHandler)this); - listener.register((MessageEventHandler)this); + listener.register((BuildEventHandler) this); + listener.register((TargetEventHandler) this); + listener.register((TaskEventHandler) this); + listener.register((MessageEventHandler) this); } } } @@ -353,14 +334,13 @@ if (listener != null) { this.log.debug("unregister"); synchronized (listener) { - listener.remove((MessageEventHandler)this); - listener.remove((TaskEventHandler)this); - listener.remove((TargetEventHandler)this); - listener.remove((BuildEventHandler)this); + listener.remove((MessageEventHandler) this); + listener.remove((TaskEventHandler) this); + listener.remove((TargetEventHandler) this); + listener.remove((BuildEventHandler) this); } } } - /** * @since 1.6.2 @@ -370,63 +350,63 @@ } /** - * Closes the file associated with this recorder. - * Used by Recorder. + * Closes the file associated with this recorder. Used by Recorder. + * * @since 1.6.3 */ public void closeFile() { - this.log.debug("closeFile."); + this.log.debug("closeFile."); if (out != null) { out.close(); out = null; unregister(); } } - + /** - * Initially opens the file associated with this recorder. - * Used by Recorder. - * @param append Indicates if output must be appended to the logfile or that - * the logfile should be overwritten. + * Initially opens the file associated with this recorder. Used by Recorder. + * + * @param append Indicates if output must be appended to the logfile or that the logfile should + * be overwritten. * @throws BuildException * @since 1.6.3 */ public void openFile(boolean append) { openFileImpl(append); } - + /** - * Re-opens the file associated with this recorder. - * Used by Recorder. + * Re-opens the file associated with this recorder. Used by Recorder. + * * @throws BuildException * @since 1.6.3 */ public void reopenFile() { openFileImpl(true); } - + private void openFileImpl(boolean append) { if (out == null) { this.log.debug("openFileImpl: " + filename); try { out = new PrintStream(new FileOutputStream(filename, append)); register(); - } catch (IOException ioe) { - throw new BuildException("Problems opening file using a " - + "recorder entry: " + ioe.getMessage(), ioe); + } + catch (IOException ioe) { + throw new BuildException("Problems opening file using a " + "recorder entry: " + + ioe.getMessage(), ioe); } } } - + /** * To add user message into log file. + * * @param message */ public void addLogMessage(String message) { out.println(StringUtils.LINE_SEP + message); - + } - - - + } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StageSummaryHandler.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StageSummaryHandler.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StageSummaryHandler.java Mon Sep 13 13:11:19 2010 +0800 @@ -36,7 +36,7 @@ import org.apache.tools.ant.Target; import org.apache.tools.ant.util.DateUtils; -import com.nokia.helium.logger.ant.types.Stage; +import com.nokia.helium.core.ant.types.Stage; import com.nokia.helium.logger.ant.types.StageSummary; import freemarker.cache.FileTemplateLoader; @@ -83,8 +83,9 @@ * {@inheritDoc} */ public void handleBuildFinished(BuildEvent event) { - if (summarize && currentStage != null) + if (summarize && currentStage != null) { endCurrentStage(); + } if (summarize && !completedStages.isEmpty()) { generateSummary(event.getProject()); log.debug("Stage Summary generation completed"); @@ -116,8 +117,9 @@ log.debug("Handling target - " + event.getTarget().getName()); if (summarize && doRunTarget(event)) { StageWrapper stage = searchNewStage(event); - if (stage != null) + if (stage != null) { startNewStage(stage); + } } } @@ -125,8 +127,9 @@ * {@inheritDoc} */ public void handleTargetFinished(BuildEvent event) { - if (summarize && isCurrentStageToEnd(event)) + if (summarize && isCurrentStageToEnd(event)) { endCurrentStage(); + } } /** @@ -143,9 +146,10 @@ if (event.getException() != null) { currentStage.setError(getReason(event.getException())); end = true; - } else + } else { end = currentStage.stage.isEndTarget(event.getTarget() .getName()); + } } return end; } @@ -167,7 +171,7 @@ if (object instanceof StageSummary) { count++; if (count > 1) { - raiseException("Multiple entries of 'hlm:stagesummary' found in " + throw new BuildException("Multiple entries of 'hlm:stagesummary' found in " + "stages_config.ant.xml."); } stageSummary = (StageSummary) object; @@ -177,16 +181,6 @@ } /** - * Raise a {@link BuildException} with the specified error message. - * - * @param message - * is the error message to display. - */ - private void raiseException(String message) { - throw new BuildException(message); - } - - /** * Start the given stage as a new build stage. * * @param newStage @@ -195,8 +189,9 @@ private void startNewStage(StageWrapper newStage) { endCurrentStage(); Long currTime = getCurrentTime(); - if (!completedStages.containsKey(newStage.stageName)) + if (!completedStages.containsKey(newStage.stageName)) { newStage.setStageStartTime(getTimestamp(currTime)); + } newStage.setStartTime(currTime); this.currentStage = newStage; log.debug("New stage [" + newStage.stageName + "] started at " diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StatusAndLogListener.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StatusAndLogListener.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/listener/StatusAndLogListener.java Mon Sep 13 13:11:19 2010 +0800 @@ -1,19 +1,19 @@ /* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ package com.nokia.helium.logger.ant.listener; import java.util.Vector; @@ -21,18 +21,18 @@ import org.apache.log4j.Logger; import org.apache.tools.ant.BuildEvent; import org.apache.tools.ant.BuildListener; +import org.apache.tools.ant.Project; import org.apache.tools.ant.SubBuildListener; -import org.apache.tools.ant.Project; /** - * StatusAndLogListener implements {@link BuildListener} and - * listens to build events in particularly for activities such as ant logging - * and displaying build stage summary at the end of build process. + * StatusAndLogListener implements {@link BuildListener} and listens to build events in + * particularly for activities such as ant logging and displaying build stage summary at the end of + * build process. * */ public class StatusAndLogListener implements BuildListener, SubBuildListener { private static StatusAndLogListener self; - + private Vector buildHandlers = new Vector(); private Vector targetHandlers = new Vector(); private Vector taskHandlers = new Vector(); @@ -49,12 +49,10 @@ } /** - * Signals that the last target has finished. This event will still be fired - * if an error occurred during the build. + * Signals that the last target has finished. This event will still be fired if an error + * occurred during the build. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. * * @see BuildEvent#getException() */ @@ -63,29 +61,24 @@ for (BuildEventHandler handler : buildHandlers) { handler.handleBuildStarted(event); } - + } + /** - * Signals that a build has started. This event is fired before any targets - * have started. + * Signals that a build has started. This event is fired before any targets have started. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. */ public synchronized void buildFinished(BuildEvent event) { - for ( BuildEventHandler handler : buildHandlers ) { - handler.handleBuildFinished( event ); + for (BuildEventHandler handler : buildHandlers) { + handler.handleBuildFinished(event); } } - /** * Signals that a target is starting. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. * * @see BuildEvent#getTarget() */ @@ -96,12 +89,10 @@ } /** - * Signals that a target has finished. This event will still be fired if an - * error occurred during the build. + * Signals that a target has finished. This event will still be fired if an error occurred + * during the build. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. * * @see BuildEvent#getException() */ @@ -114,9 +105,7 @@ /** * Signals that a task is starting. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. * * @see BuildEvent#getTask() */ @@ -127,12 +116,10 @@ } /** - * Signals that a task has finished. This event will still be fired if an - * error occurred during the build. + * Signals that a task has finished. This event will still be fired if an error occurred during + * the build. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. * * @see BuildEvent#getException() */ @@ -141,9 +128,10 @@ handler.handleTaskFinished(event); } } - + /** - * Signals that a subbuild has started. This event is fired before any targets have started. + * Signals that a subbuild has started. This event is fired before any targets have started. + * * @param event */ public synchronized void subBuildStarted(BuildEvent event) { @@ -151,26 +139,24 @@ handler.handleSubBuildStarted(event); } } - + /** - * Signals that the last target has finished. This event will still be fired if an error occurred during the build. + * Signals that the last target has finished. This event will still be fired if an error + * occurred during the build. + * * @param event */ - + public synchronized void subBuildFinished(BuildEvent event) { for (SubBuildEventHandler handler : subBuildHandlers) { handler.handleSubBuildStarted(event); } } - - /** * Signals a message logging event. * - * @param event - * An event with any relevant extra information. Must not be - * null. + * @param event An event with any relevant extra information. Must not be null. * * @see BuildEvent#getMessage() * @see BuildEvent#getException() @@ -185,180 +171,169 @@ /** * Register the given handler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void register( Handler handler ) { + public synchronized void register(Handler handler) { Vector tmpBuildHandlers = new Vector(buildHandlers); - tmpBuildHandlers.add( handler ); + tmpBuildHandlers.add(handler); buildHandlers = tmpBuildHandlers; Vector tmpTargetHandlers = new Vector(targetHandlers); - tmpTargetHandlers.add( handler ); - targetHandlers = tmpTargetHandlers; + tmpTargetHandlers.add(handler); + targetHandlers = tmpTargetHandlers; } - + /** * Register the given handler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void remove( Handler handler ) { + public synchronized void remove(Handler handler) { Vector tmpBuildHandlers = new Vector(buildHandlers); - tmpBuildHandlers.remove( handler ); + tmpBuildHandlers.remove(handler); buildHandlers = tmpBuildHandlers; Vector tmpTargetHandlers = new Vector(targetHandlers); - tmpTargetHandlers.remove( handler ); - targetHandlers = tmpTargetHandlers; + tmpTargetHandlers.remove(handler); + targetHandlers = tmpTargetHandlers; + } + + /** + * Register the given handler. + * + * @param handler is the handler to register + */ + public synchronized void register(BuildEventHandler handler) { + Vector tmp = new Vector(buildHandlers); + tmp.add(handler); + buildHandlers = tmp; + } + + /** + * Remove the given handler. + * + * @param handler is the handler to register + */ + public synchronized void remove(BuildEventHandler handler) { + Vector tmp = new Vector(buildHandlers); + tmp.remove(handler); + buildHandlers = tmp; } /** * Register the given handler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void register( BuildEventHandler handler ) { - Vector tmp = new Vector(buildHandlers); - tmp.add( handler ); - buildHandlers = tmp; + public synchronized void register(TargetEventHandler handler) { + Vector tmp = new Vector(targetHandlers); + tmp.add(handler); + targetHandlers = tmp; } - + /** * Remove the given handler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void remove( BuildEventHandler handler ) { - Vector tmp = new Vector(buildHandlers); - tmp.remove( handler ); - buildHandlers = tmp; - } - - /** - * Register the given handler. - * - * @param handler - * is the handler to register - */ - public synchronized void register( TargetEventHandler handler ) { + public synchronized void remove(TargetEventHandler handler) { Vector tmp = new Vector(targetHandlers); - tmp.add( handler ); - targetHandlers = tmp; + tmp.remove(handler); + targetHandlers = tmp; } - - /** - * Remove the given handler. - * - * @param handler - * is the handler to register - */ - public synchronized void remove( TargetEventHandler handler ) { - Vector tmp = new Vector(targetHandlers); - tmp.remove( handler ); - targetHandlers = tmp; - } - - + /** * Register the given SubBuildEventHandler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void register( SubBuildEventHandler handler ) { + public synchronized void register(SubBuildEventHandler handler) { Vector tmp = new Vector(subBuildHandlers); - tmp.add( handler ); - subBuildHandlers = tmp; + tmp.add(handler); + subBuildHandlers = tmp; } /** * Remove the given SubBuildEventHandler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void remove( SubBuildEventHandler handler ) { + public synchronized void remove(SubBuildEventHandler handler) { Vector tmp = new Vector(subBuildHandlers); - tmp.remove( handler ); - subBuildHandlers = tmp; + tmp.remove(handler); + subBuildHandlers = tmp; } /** * Register the given MessageEventHandler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void register( MessageEventHandler handler ) { + public synchronized void register(MessageEventHandler handler) { Vector tmp = new Vector(messageHandlers); - tmp.add( handler ); - messageHandlers = tmp; + tmp.add(handler); + messageHandlers = tmp; } - + /** * Remove the given MessageEventHandler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void remove( MessageEventHandler handler ) { + public synchronized void remove(MessageEventHandler handler) { Vector tmp = new Vector(messageHandlers); - tmp.remove( handler ); - messageHandlers = tmp; + tmp.remove(handler); + messageHandlers = tmp; } /** * Register the given TaskEventHandler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void register( TaskEventHandler handler ) { + public synchronized void register(TaskEventHandler handler) { Vector tmp = new Vector(taskHandlers); - tmp.add( handler ); - taskHandlers = tmp; + tmp.add(handler); + taskHandlers = tmp; } - + /** * Remove the given TaskEventHandler. * - * @param handler - * is the handler to register + * @param handler is the handler to register */ - public synchronized void remove( TaskEventHandler handler ) { + public synchronized void remove(TaskEventHandler handler) { Vector tmp = new Vector(taskHandlers); - tmp.remove( handler ); - taskHandlers = tmp; + tmp.remove(handler); + taskHandlers = tmp; } - /** * Return root project. + * * @return */ public Project getProject() { - return project; + return project; } - + /** * Get the main StatusAndLogListener. + * * @return */ public static StatusAndLogListener getStatusAndLogListener() { return self; } - + /** * Check and return required type handler. + * * @param handlerType * @return */ public synchronized Handler getHandler(Class handlerType) { for (BuildEventHandler handler : buildHandlers) { if (handlerType.isInstance(handler)) { - return (Handler)handler; + return (Handler) handler; } } return null; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TaskRecorder.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TaskRecorder.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,278 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.logger.ant.taskdefs; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.List; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.DefaultLogger; +import org.apache.tools.ant.MagicNames; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.ProjectHelper; +import org.apache.tools.ant.RuntimeConfigurable; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.TaskContainer; +import org.apache.tools.ant.UnknownElement; +import org.apache.tools.ant.taskdefs.Recorder.VerbosityLevelChoices; + +/** + * The taskRecorder task allows you to record the output of the execution + * of a set of task into a log file. The output is not redirected to any + * other recorders, so nothing will appear on the console. + * + * Example of usage: + *
    + * <hlm:taskRecorder output="output.log" logLevel="verbose" >
    + *     <echo>This output will be recorded under output.log</echo>
    + *     <property name="new.property" value="value" />
    + * </hlm:taskRecorder>
    + * 
    + * + * In the previous example the output of echo task is redirected to the output log. + * + * @ant.task name="taskRecorder" category="Logging" + */ +public class TaskRecorder extends Task implements TaskContainer { + private List tasks = new ArrayList(); + private File output; + private int logLevel = Project.MSG_INFO; + + /** + * {@inheritDoc} + */ + @Override + public void addTask(Task task) { + tasks.add(task); + } + + /** + * {@inheritDoc} + */ + public void execute() { + if (output == null) { + throw new BuildException("The output attribute has not been defined."); + } + + // creating a project delegator, which will propagate the properties into + // the parent project + ProjectDelegator subProject = new ProjectDelegator(getProject()); + getProject().initSubProject(subProject); + // set user-defined properties + getProject().copyUserProperties(subProject); + subProject.initProperties(); + ProjectHelper.configureProject(subProject, new File(getProject().getProperty(MagicNames.ANT_FILE))); + + // The delegator enables the property propagation. + subProject.setUseDelegate(true); + // Let's replicate all our childs into a sequential task which is + // going to use the delegate project. + UnknownElement subTask = new UnknownElement("sequential"); + subTask.setTaskName("sequential"); + subTask.setNamespace(""); + subTask.setQName("sequential"); + subTask.setProject(subProject); + new RuntimeConfigurable(subTask, "sequential"); + for (Task task : this.tasks) { + if (task instanceof UnknownElement) { + UnknownElement ue = ((UnknownElement)task).copy(subProject); + ue.setProject(subProject); + subTask.addChild(ue); + subTask.getWrapper().addChild(ue.getWrapper()); + } else { + log("Task " + task.getTaskName() + " is not a UnknownElement. Element will be ignored.", Project.MSG_WARN); + } + } + + PrintStream out = null; + DefaultLogger logger = null; + try { + // Creating the a logger to record the execution + out = new PrintStream(new FileOutputStream(output)); + logger = new DefaultLogger(); + logger.setMessageOutputLevel(this.logLevel); + logger.setOutputPrintStream(out); + logger.setErrorPrintStream(out); + subProject.addBuildListener(logger); + log("Recording output to " + output.getAbsolutePath()); + subTask.perform(); + } catch (IOException ex) { + log("Can't set output to " + output + ": " + ex.getMessage(), Project.MSG_ERR); + throw new BuildException("Can't set output to " + output + ": " + ex.getMessage()); + } finally { + if (logger != null) { + subProject.removeBuildListener(logger); + } + if (out != null) { + out.close(); + } + subProject = null; + } + } + + /** + * Defines the output log. + * @param output + * @ant.required + */ + public void setOutput(File output) { + this.output = output; + } + + /** + * Defines the logging level (e.g error, warning, info, verbose, debug). + * @param logLevel + * @ant.not-required Default is info. + */ + public void setLogLevel(VerbosityLevelChoices logLevel) { + this.logLevel = logLevel.getLevel(); + } + + + /** + * Project used to delegate property manipulation + * calls to a delegate project. + * + */ + class ProjectDelegator extends Project { + private Project delegate; + private boolean useDelegate; + + public ProjectDelegator(Project delegate) { + this.delegate = delegate; + } + + /** + * @return the useDelegate + */ + public boolean isUseDelegate() { + return useDelegate; + } + + /** + * @param useDelegate the useDelegate to set + */ + public void setUseDelegate(boolean useDelegate) { + this.useDelegate = useDelegate; + } + + /** + * @return + * @see org.apache.tools.ant.Project#getProperties() + */ + public Hashtable getProperties() { + if (useDelegate) { + return delegate.getProperties(); + } else { + return super.getProperties(); + } + } + /** + * @param propertyName + * @return + * @see org.apache.tools.ant.Project#getProperty(java.lang.String) + */ + public String getProperty(String propertyName) { + if (useDelegate) { + return delegate.getProperty(propertyName); + } else { + return super.getProperty(propertyName); + } + } + + /** + * @return + * @see org.apache.tools.ant.Project#getUserProperties() + */ + public Hashtable getUserProperties() { + if (useDelegate) { + return delegate.getUserProperties(); + } else { + return super.getUserProperties(); + } + } + /** + * @param propertyName + * @return + * @see org.apache.tools.ant.Project#getUserProperty(java.lang.String) + */ + public String getUserProperty(String propertyName) { + if (useDelegate) { + return delegate.getUserProperty(propertyName); + } else { + return super.getUserProperty(propertyName); + } + } + /** + * @param value + * @return + * @throws BuildException + * @see org.apache.tools.ant.Project#replaceProperties(java.lang.String) + */ + public String replaceProperties(String value) { + if (useDelegate) { + return delegate.replaceProperties(value); + } else { + return super.replaceProperties(value); + } + } + + /** + * @param name + * @param value + * @see org.apache.tools.ant.Project#setNewProperty(java.lang.String, java.lang.String) + */ + public void setNewProperty(String name, String value) { + if (useDelegate) { + delegate.setNewProperty(name, value); + } else { + super.setNewProperty(name, value); + } + } + + /** + * @param name + * @param value + * @see org.apache.tools.ant.Project#setProperty(java.lang.String, java.lang.String) + */ + public void setProperty(String name, String value) { + if (useDelegate) { + delegate.setProperty(name, value); + } else { + super.setProperty(name, value); + } + } + + /** + * @param name + * @param value + * @see org.apache.tools.ant.Project#setUserProperty(java.lang.String, java.lang.String) + */ + public void setUserProperty(String name, String value) { + if (useDelegate) { + delegate.setUserProperty(name, value); + } else { + super.setUserProperty(name, value); + } + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TriggerLoggerTask.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TriggerLoggerTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/taskdefs/TriggerLoggerTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,12 +16,12 @@ */ package com.nokia.helium.logger.ant.taskdefs; +import org.apache.log4j.Logger; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import com.nokia.helium.logger.ant.listener.AntLoggingHandler; import com.nokia.helium.logger.ant.listener.StatusAndLogListener; -import org.apache.log4j.Logger; /** * This task is used to start the helium logging listener. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/Stage.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/Stage.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -package com.nokia.helium.logger.ant.types; - -import org.apache.tools.ant.types.DataType; - - -/** - * A Stage is a Data type which stores Stage information. - * - *

    - * A Stage is defined by setting three attributes name, start and end targets, both should be a - * valid target name in the project. - * - *

    - * Usage: - * - *

    - *      <hlm:stage id="preparation" starttarget="stagetest" endtarget="stagetest"/>              
    - * 
    - * - * @ant.task name="stage" category="Logging" - * - */ -public class Stage extends DataType { - - private String startTarget; - private String endTarget; - - public Stage() { - - } - /** - * Get the starting point of this {@link Stage}. - * - * @return the starting point of this {@link Stage}. - */ - public String getStartTarget() { - return this.startTarget; - } - - /** - * Set the starting target. - * - * @param start - * is the starting point to set. - * @ant.required - */ - public void setStartTarget(String startTarget) { - this.startTarget = startTarget; - } - - /** - * Get the end point of this {@link Stage}. - * - * @return the end point of this {@link Stage}. - * - */ - public String getEndTarget() { - return this.endTarget; - } - - /** - * Set the end target. - * - * @param end - * is the end point to set. - * @ant.required - */ - public void setEndTarget(String endTarget) { - this.endTarget = endTarget; - } - - /** - * Check is the start target set to current target. - * @param target - * @return - */ - public boolean isStartTarget( String target ) { - return this.startTarget.equals( target ); - } - - /** Check is the end target set to current target. - * - * @param target - * @return - */ - public boolean isEndTarget( String target ) { - return this.endTarget.equals( target ); - } - -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageLogging.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageLogging.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageLogging.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,8 +18,8 @@ import java.io.File; +import org.apache.log4j.Logger; import org.apache.tools.ant.types.DataType; -import org.apache.log4j.Logger; /** * A 'StageRecord' is a Data type which stores attributes for stage recording/logging. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageSummary.java --- a/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageSummary.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/src/com/nokia/helium/logger/ant/types/StageSummary.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,8 +17,9 @@ package com.nokia.helium.logger.ant.types; import java.io.File; + +import org.apache.log4j.Logger; import org.apache.tools.ant.Project; -import org.apache.log4j.Logger; import org.apache.tools.ant.types.DataType; import com.nokia.helium.logger.ant.listener.StageSummaryHandler; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/antunit/run-scenario.ant.xml --- a/buildframework/helium/sf/java/logging/tests/antunit/run-scenario.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/antunit/run-scenario.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,12 +23,14 @@ Helium Antlib logger macro. - + + -------------------------------------------- + -------------------------------------------- @@ -36,28 +38,18 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/antunit/test_stageslogging.ant.xml --- a/buildframework/helium/sf/java/logging/tests/antunit/test_stageslogging.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/antunit/test_stageslogging.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -24,7 +24,7 @@ Helium Antlib Signal unittests. - + @@ -164,4 +164,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/antunit/test_taskrecorder.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/logging/tests/antunit/test_taskrecorder.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,170 @@ + + + + Helium Antlib logger unittests. + + + + + + + + + + + + + + + + + This message should not be logged on the screen. + + + + + + + + This message should not be logged on the screen. + + + + + + + + This message should not be logged on the screen. + + + + + ${output.log} + + + + + + + + + This message should not be logged on the screen. + + + + + + ${output.log} + + + + + + + This message should not be logged on the screen. + + + + + + + + + + ${output.log} + + + + + + + + Setting task.recorder.is.wicked property. + + + + + ${output.log} + + + + + + + + + + + This message should not be logged on the screen. + + + + + + + + + + + ${output.log} + + + + + + + + + This message should not be logged on the screen. + + + + + + + + + + ${output.log} + + + + + + + + + This message should not be logged on the screen. + + + + + + + ${output.log} + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/build.bat --- a/buildframework/helium/sf/java/logging/tests/build.bat Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/build.bat Mon Sep 13 13:11:19 2010 +0800 @@ -21,5 +21,11 @@ set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 ) ELSE set TESTED_JAVA=%JAVA_6_HOME% if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%) -ant %* +call ant %* +if "%ERRORLEVEL%" neq "0" (goto error) endlocal +goto :eof + +:error +endlocal +if "%OS%"=="Windows_NT" color 00 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/build_failure/build.xml --- a/buildframework/helium/sf/java/logging/tests/scenarii/build_failure/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/build_failure/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -27,6 +27,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/build_status/build.xml --- a/buildframework/helium/sf/java/logging/tests/scenarii/build_status/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/build_status/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -27,6 +27,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/inavlid_stage_refid_object/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/inavlid_stage_refid_object/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,71 @@ + + + + Helium Antlib Logging unittests. + + + + + + + + + + + + + + + + + + + + + + + Main log start step1 + + Main log start step2 + + Main log start step3 + + + + + Main log start step4 + + + + Main log start step5 + + + + In stage1 (${step1}) + + + + In stage2 (${step2}) + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/invalid_stage_refid/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/invalid_stage_refid/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,69 @@ + + + + Helium Antlib Logging unittests. + + + + + + + + + + + + + + + + + + + + + Main log start step1 + + Main log start step2 + + Main log start step3 + + + + + Main log start step4 + + + + Main log start step5 + + + + In stage1 (${step1}) + + + + In stage2 (${step2}) + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/logger/build.xml --- a/buildframework/helium/sf/java/logging/tests/scenarii/logger/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/logger/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,6 +22,7 @@ --> Helium Antlib logger unittests. + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/missing_default_config/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/missing_default_config/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,69 @@ + + + + Helium Antlib Logging unittests. + + + + + + + + + + + + + + + + + + + + + Main log start step1 + + Main log start step2 + + Main log start step3 + + + + + Main log start step4 + + + + Main log start step5 + + + + In stage1 (${step1}) + + + + In stage2 (${step2}) + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/missing_stage_refid/build.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/missing_stage_refid/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,69 @@ + + + + Helium Antlib Logging unittests. + + + + + + + + + + + + + + + + + + + + + Main log start step1 + + Main log start step2 + + Main log start step3 + + + + + Main log start step4 + + + + Main log start step5 + + + + In stage1 (${step1}) + + + + In stage2 (${step2}) + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/override_scenario/build.xml --- a/buildframework/helium/sf/java/logging/tests/scenarii/override_scenario/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/override_scenario/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -27,6 +27,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/scenarii/valid_build/stages_config.ant.xml --- a/buildframework/helium/sf/java/logging/tests/scenarii/valid_build/stages_config.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/scenarii/valid_build/stages_config.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,6 +26,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/logging/tests/stages_config.ant.xml --- a/buildframework/helium/sf/java/logging/tests/stages_config.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/logging/tests/stages_config.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,6 +26,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/doc/metadata.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/doc/metadata.rst Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,243 @@ +.. index:: + module: Configuring Metadata + +==================== +Configuring Metadata +==================== + +.. contents:: + +This document describes the purpose of metadata and how is being used in helium and +how it can be used by the customer. + +Overview +======== + +Metadata is process to find the errors, warnings from the output log differnt section of the build +and store it to the database, which could be used during each stage of the build to process efficiently +and send details to diamonds, used for signaling, and generating summary file. + + +Metadata Details +================ + +1. Metadatarecord : Which is used to store the errors, warnings information to the database + + 1.1. It takes the metadatainput (the type of log parsing to be used), currently supported parsing are + + a. sbsmetadatainput - sbs log processing (based on xml processing) + + b. textmetadatainput - general text log processing (based on text processing) + + c. policylogmetadatainput - policy log output processing (based on xml processing) + + d. antlogmetadatainput - ant log output processing (based on text processing) + + e. abldlogmetadatainput - abld log output processing (based on text processing) + + Please see ant doc for more details on metadatarecord. + + 1.2 It takes the fileset containing list of log files + + 1.3 It takes the metadata filter, list of regular expression for searching strings. + +Metadata Filters +================ + +This document describes the usage of metadata filter to change the severity level during different stages of the build. + +Overview +-------- + +Metadata filters are set of regular expressions used to match the text of the build output and process the errors, categorize it, +and used to generate the output for diamonds, summary file, email output. Predefined set of ids are defined for each stage of the +build. For example for raptor compilation filter is defined as below, + +The default definition of filterset.sbs is + +.. code-block:: xml + + + + + + +which is using the common definition which is, + +.. code-block:: xml + + + + + + +The complete list of predefined ids for various stages of the build are defined in this file, + +helium/config/metadata_filter_config_default.xml + +Each ID can be overridden to provide additional regular expression to control the results of the build for different stages. + +Two ways to add the regular expressions +--------------------------------------- + + - Adding more than one regular expression + +Define your own csv file and override it in your configuration as below (add this after importing helium.ant.xml file), + +.. code-block:: xml + + + + + + - Adding just one regular expression + +This can be done as below, + +.. code-block:: xml + + + + + + +Note +---- + +1. The order of metadatafilter / metadatafilterset is important, so the first one takes precedence than the second one. + +2. Order is also preserved in the csv file, the expressions which are defined first get precedence than the later one. + +3. All the regular expressions are JAVA patterns. + + +Usage in Helium +=============== + +Different build stages were processed and identified the type of output and added the metadatarecord +task for each build stage and captured the output in the database. And after storing it, using fmpp +template the error information from database are processed to send to diamonds, raised signal accordingly. + +Usage +===== + +Examples: + SBS comilation output in db: + +.. code-block:: xml + + + + + + + + +This example is to process sbs output. The metadatainput is sbsmetadatainput to process the sbs log file, takes the sbs.log.file +uses the regular expression defined by filterset.sbs + +.. code-block:: xml + + + + + + + + +This example process the cmaker output as abld output log. It takes abldmetadatainput as metadatainput +and the logfile as ${build.log.dir}/${build.id}${cmaker.log.label}.export.cmaker.log and the regular +expression is used from the reference filterset.compile. + +Similarly any of the log output file can be easily processed in a similar way. + +Database schema +=============== + +The following diagram describes the current database schema (for SQL based queries). + +.. image:: metadata_schema.png + :align: center + + +It is also possible to use the JPQL language which allows the usage of the Java ORM mapping class. This means that database will be represented +by their Java model class, table fields by the class attributes. This diagrams describes the JPQL diagram: + +.. image:: metadata_jpql_schema.png + :align: center + + +Example of queries: + +SQL:: + + select * from metadataentry as e, severity as s where e.severity_id = s.severity_id and s.severity = 'error' + +JPQL:: + + select e from MetadataEntry e JOIN e.severity s WHERE s.severity = 'error' + + +Using the Metadata framework with FMPP +====================================== + +The Metadata framework gives an efficient opportunity to record huge amount or data in a fast and reliable way (timewise and memory consumption-wise). +Thanks to the ORMFMPPLoader database loader it is really simple to access those data and render then in any other format: HTML for easy to read build summary, +XML to communicated with other tools, text file... + +Loading a database +------------------ + +A database can be load and assigned to a template variable using the pp.loadData functionnality from the FMPP task. The 'com.nokia.helium.metadata.ORMFMPPLoader' +accept one argument which is the path to the database. + +Example:: + + <#assign database = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "C:/path/to/database_db") > + + +Then the database variable can be used to access the database the following different ways: + + - jpasingle: Query with single result e.g: select count(s) from Severity s + - jpa: allow iteration on the JPA object results: select s from Severity s + - native:: Native SQL format query, type is use to determine the object to use in the model + +Accessing data using a JPA single query +--------------------------------------- + +The 'jpasingle' is the best way to access results from single values like count of entities. The jpasingle queries must be written in JPQL, +please check the valid database schema in the previous section (case matter!). + +Example of a template that will return the number of log files recorded in the database:: + + <#assign database = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "C:/path/to/database_db") > + Number of logfiles: ${database['jpasingle']['select l from LogFile l'][0]} + +Accessing data using a JPA query +-------------------------------- + +The JPA query allows you to perform query and directly use JPA entity object directly inside the template. The jpa queries must be written in JPQL, +please check the valid database schema in the previous section (case matter!). + +In the following example the query loop through the available log files:: + + <#assign database = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "C:/path/to/database_db") > + <#list database['jpasingle']['select l from LogFile l'] as l> + ${l.id}: ${l.path} + + + +Accessing data using a native query +----------------------------------- + +The native query enables you to perform SQL queries through the JDBC interface of the database. If native is used then make sure you use +the SQL schema. + +In the following example the query loop through the available log files path:: + + <#assign database = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "C:/path/to/database_db") > + <#list table_info['native:java.lang.String']['SELECT l.PATH FROM LOGFILE as l'] as l> + ${l} + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/doc/metadata_jpql_schema.png Binary file buildframework/helium/sf/java/metadata/doc/metadata_jpql_schema.png has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/doc/metadata_schema.png Binary file buildframework/helium/sf/java/metadata/doc/metadata_schema.png has changed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/ivy.xml --- a/buildframework/helium/sf/java/metadata/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -29,8 +29,10 @@ - - + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/metadata.rst --- a/buildframework/helium/sf/java/metadata/metadata.rst Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +0,0 @@ -.. index:: - module: Configuring Metadata - -==================== -Configuring Metadata -==================== - -.. contents:: - -This document describes the purpose of metadata and how is being used in helium and -how it can be used by the customer. - -Overview -======== - -Metadata is process to find the errors, warnings from the output log differnt section of the build -and store it to the database, which could be used during each stage of the build to process efficiently -and send details to diamonds, used for signaling, and generating summary file. - - -Metadata Details -================ - -1. Metadatarecord : Which is used to store the errors, warnings information to the database - - 1.1. It takes the metadatainput (the type of log parsing to be used), currently supported parsing are - - a. sbsmetadatainput - sbs log processing (based on xml processing) - - b. textmetadatainput - general text log processing (based on text processing) - - c. policylogmetadatainput - policy log output processing (based on xml processing) - - d. antlogmetadatainput - ant log output processing (based on text processing) - - e. abldlogmetadatainput - abld log output processing (based on text processing) - - Please see ant doc for more details on metadatarecord. - - 1.2 It takes the fileset containing list of log files - - 1.3 It takes the metadata filter, list of regular expression for searching strings. - -Metadata Filters -================ - -This document describes the usage of metadata filter to change the severity level during different stages of the build. - -Overview --------- - -Metadata filters are set of regular expressions used to match the text of the build output and process the errors, categorize it, -and used to generate the output for diamonds, summary file, email output. Predefined set of ids are defined for each stage of the -build. For example for raptor compilation filter is defined as below, - -The default definition of filterset.sbs is - -.. code-block:: xml - - - - - - -which is using the common definition which is, - -.. code-block:: xml - - - - - - -The complete list of predefined ids for various stages of the build are defined in this file, - -helium/config/metadata_filter_config_default.xml - -Each ID can be overridden to provide additional regular expression to control the results of the build for different stages. - -Two ways to add the regular expressions ---------------------------------------- - - - Adding more than one regular expression - -Define your own csv file and override it in your configuration as below (add this after importing helium.ant.xml file), - -.. code-block:: xml - - - - - - - Adding just one regular expression - -This can be done as below, - -.. code-block:: xml - - - - - - -Note ----- - -1. The order of metadatafilter / metadatafilterset is important, so the first one takes precedence than the second one. - -2. Order is also preserved in the csv file, the expressions which are defined first get precedence than the later one. - -3. All the regular expressions are JAVA patterns. - - -Usage in Helium -=============== - -Different build stages were processed and identified the type of output and added the metadatarecord -task for each build stage and captured the output in the database. And after storing it, using fmpp -template the error information from database are processed to send to diamonds, raised signal accordingly. - -Usage -===== - -Examples: - SBS comilation output in db: - -.. code-block:: xml - - - - - - - - -This example is to process sbs output. The metadatainput is sbsmetadatainput to process the sbs log file, takes the sbs.log.file -uses the regular expression defined by filterset.sbs - -.. code-block:: xml - - - - - - - - -This example process the cmaker output as abld output log. It takes abldmetadatainput as metadatainput -and the logfile as ${build.log.dir}/${build.id}${cmaker.log.label}.export.cmaker.log and the regular -expression is used from the reference filterset.compile. - -Similarly any of the log output file can be easily processed in a similar way. \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/META-INF/persistence.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/META-INF/persistence.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,45 @@ + + + + + org.eclipse.persistence.jpa.PersistenceProvider + + + + com.nokia.helium.metadata.model.metadata.LogFile + com.nokia.helium.metadata.model.metadata.Severity + com.nokia.helium.metadata.model.metadata.Component + com.nokia.helium.metadata.model.metadata.MetadataEntry + com.nokia.helium.metadata.model.metadata.ComponentTime + com.nokia.helium.metadata.model.metadata.WhatLogEntry + com.nokia.helium.metadata.model.metadata.ExecutionTime + com.nokia.helium.metadata.model.metadata.SysdefPackage + com.nokia.helium.metadata.model.metadata.SysdefCollection + com.nokia.helium.metadata.model.metadata.SysdefComponent + com.nokia.helium.metadata.model.metadata.SysdefUnit + com.nokia.helium.metadata.model.Version + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/AutoCommitEntityManager.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/AutoCommitEntityManager.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + + +/** + * This class implements a simplified EntityManager + * designed for batch committing. + * Serial persists are committed and cleared each time + * the limit is reached. + * + */ +public class AutoCommitEntityManager { + private EntityManager entityManager; + private int count; + private int maxCount = 750; + + /** + * Creating a new AutoCommitEntityManager. The entityManagerFactory will be + * used to get a new EntityManager. + * @param entityManagerFactory the entity manager to use to create a EntityManager. + */ + public AutoCommitEntityManager(EntityManagerFactory entityManagerFactory) { + this.entityManager = entityManagerFactory.createEntityManager(); + entityManager.getTransaction().begin(); + } + + /** + * Persisting an object into the database. + * @param o the object to persist + */ + public synchronized void persist(Object o) { + entityManager.persist(o); + count++; + if (count >= maxCount) { + entityManager.getTransaction().commit(); + entityManager.clear(); + count = 0; + entityManager.getTransaction().begin(); + } + } + + /** + * Closing the current entity manager. Committing any + * pending operation. + */ + public synchronized void close() { + if (entityManager.getTransaction().isActive()) { + entityManager.getTransaction().commit(); + entityManager.clear(); + } + entityManager.close(); + entityManager = null; + } + + /** + * Internal EntityManager used to + * @param + * @return the merged entity. + */ + public T merge(T entity) { + return entityManager.merge(entity); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/CustomMetaDataProvider.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/CustomMetaDataProvider.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ -package com.nokia.helium.metadata; - -import com.nokia.helium.metadata.db.ORMMetadataDB; - -/** - * This interface is meant for a MetadataInput - * to provides custom information other than - * LogEntry to the database. - */ -public interface CustomMetaDataProvider { - - /** - * This method is the entry point which allows - * to push additional metadata via the ORMMetadataDB - * instance. - */ - void provide(ORMMetadataDB db, String logPath); - -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/DAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/DAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +import java.io.Serializable; +import java.util.List; + +/** + * Interface to implement the Data Access Object pattern. + * + * @param the type of the object to persist. + */ +public interface DAO { + + /** + * Find a particular T object based on it's id. + * @param id the id to look for. + * @return the retrieved object, or null if not found. + */ + T findById(Serializable id); + + /** + * Finding all rows from the database. + * @return the list of T objects. + */ + List findAll(); + + /** + * Persisting the data object from the database. + * @param data the object to persist + */ + void persist(T data); + + /** + * Removing the data object from the database. + * @param data the row to be removed + */ + void remove(T data); +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/DerbyFactoryManagerCreator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/DerbyFactoryManagerCreator.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +import java.io.File; +import java.io.OutputStream; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Hashtable; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; + +import org.apache.commons.io.FileUtils; +import org.eclipse.persistence.config.PersistenceUnitProperties; + +import com.nokia.helium.metadata.ant.types.SeverityEnum; +import com.nokia.helium.metadata.model.Version; +import com.nokia.helium.metadata.model.metadata.Severity; + +/** + * Class implementing a EntityManagerFactoryCreator for the derby database. + * This will be used to create new EntityManagerFactory for each database. It also + * handles the driver management, and basic factory settings. + * + */ +public class DerbyFactoryManagerCreator implements EntityManagerFactoryCreator { + + public static final OutputStream DEV_NULL = new OutputStream() { + public void write(int b) { } + }; + + public synchronized EntityManagerFactory create(File database) throws MetadataException { + EntityManagerFactory factory; + String name = "metadata"; + Hashtable persistProperties = new Hashtable(); + persistProperties.put("javax.persistence.jdbc.driver", "org.apache.derby.jdbc.EmbeddedDriver"); + // This swallow all the output log from derby. + System.setProperty("derby.stream.error.field", "com.nokia.helium.metadata.DerbyFactoryManagerCreator.DEV_NULL"); + persistProperties.put("javax.persistence.jdbc.url", + "jdbc:derby:" + database.getAbsolutePath()); + persistProperties.put( + PersistenceUnitProperties.PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT, + "false"); + persistProperties.put( + PersistenceUnitProperties.PERSISTENCE_CONTEXT_REFERENCE_MODE, + "WEAK"); + persistProperties.put(PersistenceUnitProperties.BATCH_WRITING, + "JDBC"); + persistProperties.put("eclipselink.read-only", "true"); + persistProperties.put(PersistenceUnitProperties.LOGGING_LEVEL, "warning"); + if (database.exists()) { + if (!checkDatabaseIntegrity(database)) { + try { + FileUtils.forceDelete(database); + } catch (java.io.IOException iex) { + throw new MetadataException("Failed deleting corrupted db: " + iex, iex); + } + } else { + return + Persistence.createEntityManagerFactory( + name, + persistProperties); + } + } + persistProperties.put("javax.persistence.jdbc.url", + "jdbc:derby:" + database + ";create=true"); + persistProperties.put(PersistenceUnitProperties.DDL_GENERATION, + "create-tables"); + persistProperties.put( + PersistenceUnitProperties.DDL_GENERATION_MODE, + "database"); + persistProperties.put( + PersistenceUnitProperties.PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT, + "false"); + persistProperties.put( + PersistenceUnitProperties.PERSISTENCE_CONTEXT_REFERENCE_MODE, + "WEAK"); + persistProperties.put(PersistenceUnitProperties.BATCH_WRITING, + "JDBC"); + persistProperties.put("eclipselink.read-only", "true"); + factory = Persistence.createEntityManagerFactory( + name, + persistProperties); + EntityManager entityManager = factory.createEntityManager(); + // Pushing default data into the current schema + try { + entityManager.getTransaction().begin(); + // Version of the schema is pushed. + entityManager.persist(new Version()); + // Default set of severity is pushed. + for (SeverityEnum.Severity severity : SeverityEnum.Severity.values()) { + Severity pData = new Severity(); + pData.setSeverity(severity.toString()); + entityManager.persist(pData); + } + entityManager.getTransaction().commit(); + } finally { + if (entityManager.getTransaction().isActive()) { + entityManager.getTransaction().rollback(); + entityManager.clear(); + } + entityManager.close(); + } + return factory; + } + + /** + * Checks the database integrity. + * @param urlPath - database path to be connected to. + * @return boolean - true if db is valid false otherwise. + */ + private static boolean checkDatabaseIntegrity(File database) throws MetadataException { + boolean result = false; + Connection connection = null; + try { + connection = DriverManager.getConnection("jdbc:derby:" + database); + if (connection != null) { + Statement stmt = connection.createStatement(); + ResultSet rs = stmt.executeQuery("select version from version"); + int version = -1; + if ( rs.next()) { + version = rs.getInt(1); + } + rs.close(); + stmt.close(); + connection.close(); + connection = null; + result = version == Version.DB_VERSION; + } + } catch (SQLException ex) { + try { + DriverManager.getConnection("jdbc:derby:;shutdown=true"); + } catch (java.sql.SQLException sex) { + // normal exception during database shutdown + connection = null; + } + return false; + } finally { + try { + if (connection != null) { + connection.close(); + } + } catch (java.sql.SQLException sex) { + // normal exception during database shutdown + connection = null; + } + connection = null; + if (!result) { + try { + DriverManager.getConnection("jdbc:derby:;shutdown=true"); + } catch (java.sql.SQLException sex) { + // normal exception during database shutdown + connection = null; + } + } + } + //shutdown unloads the driver, driver need to be loaded again. + return result; + } + + public synchronized void unload(File database) { + try { + DriverManager.getConnection("jdbc:derby:" + database + ";shutdown=true"); + } catch (SQLException e) { + // normal exception during database shutdown + e = null; + } + } + + public synchronized void initialize() throws MetadataException { + try { + Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); + } catch (java.lang.ClassNotFoundException e) { + throw new MetadataException("JDBC Driver could not be found", e); + } + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/EntityManagerFactoryCreator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/EntityManagerFactoryCreator.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +import java.io.File; + +import javax.persistence.EntityManagerFactory; + +/** + * This interface describe the methods used to creates + * EntityManagerFactory for a particular database type (e.g.: Derby). + * + */ +public interface EntityManagerFactoryCreator { + + /** + * This method will be called once in the lifecycle of the EntityManagerFactoryCreator + * object. + * This method is a kind of entry point to load a driver for example. + * @throws MetadataException this exception is thrown in case of error. + */ + void initialize() throws MetadataException ; + + /** + * Create a new EntityManagerFactory for a particular database. + * @param database the database to create the EntityManagerFactory for. + * @return a new EntityManagerFactory. + * @throws MetadataException this exception is raised in case of error. (e.g database could not be created.) + */ + EntityManagerFactory create(File database) throws MetadataException; + + /** + * This method is called to unload a database, this is called usually when + * all created EntityManagerFactory are freed. + * @param database the database to unload. + * @throws MetadataException + */ + void unload(File database) throws MetadataException ; +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/FactoryManager.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/FactoryManager.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.persistence.Cache; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.PersistenceUnitUtil; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.metamodel.Metamodel; + +/** + * This singleton class is the main entry point to the Metadata framework. + * Developer must use it to get access to the EntityManagerFactory from the + * JPA framework. + * + */ +public final class FactoryManager { + private static FactoryManager self = new FactoryManager(); + private List wrappers = new ArrayList(); + private EntityManagerFactoryCreator factoryManagerCreator = new DerbyFactoryManagerCreator(); + + /** + * This class must not be instantiated from outside. + */ + private FactoryManager() { + } + + /** + * Get the FactoryManager instance. + * @return the FactoryManager instance. + */ + public static FactoryManager getFactoryManager() { + return self; + } + + /** + * Get the EntityManagerFactory for the database. + * @param database the File object representing the database. + * @return an EntityManagerFactory instance. + * @throws MetadataException is thrown in case of error. + */ + public synchronized EntityManagerFactory getEntityManagerFactory(File database) throws MetadataException { + EntityManagerFactoryWrapper wrapper = null; + for (EntityManagerFactoryWrapper wrp : wrappers) { + // Found what we wanted so leaving the loop. + if (wrp.getDatabase().equals(database)) { + wrapper = wrp; + break; + } + } + if (wrapper != null) { + wrapper.reference(); + return wrapper; + } else { + // creating a new one. + wrapper = + new EntityManagerFactoryWrapper(factoryManagerCreator.create(database), this, database); + wrappers.add(wrapper); + return wrapper; + } + } + + /** + * Removing the wrapper object from the available database, so no one can + * use it anymore. This method is intended to be used by the EntityManagerFactoryWrapper. + * @param wrapper + */ + private synchronized void remove(EntityManagerFactoryWrapper wrapper) { + wrappers.remove(wrapper); + } + + /** + * Unload the database when not used anymore. + * This method is intended to be used by the EntityManagerFactoryWrapper. + * @param database the database to unload. + */ + private void unload(File database) { + try { + factoryManagerCreator.unload(database); + } catch (MetadataException e) { + // do nothing in the meantime + database = null; + } + } + + /** + * Internal Factory wrapper object which implements a custom + * factory lifecycle management. + * + */ + class EntityManagerFactoryWrapper implements EntityManagerFactory { + private EntityManagerFactory factory; + private FactoryManager factoryManager; + private int counter = 1; + private File database; + + /** + * Default constructor. + * @param factory the factory to delegate to calls to. + * @param factoryManager the factory manager used for the lifecycle management. + * @param database the database this object is connected to. + */ + public EntityManagerFactoryWrapper(EntityManagerFactory factory, + FactoryManager factoryManager, File database) { + this.factory = factory; + this.factoryManager = factoryManager; + this.database = database; + } + + /** + * Method used by the factoryManager to reference the usage of the + * EntityFactoryManager. + */ + public synchronized void reference() { + counter++; + } + + /** + * {@inheritDoc} + * This method overrides the default close implementation, and will + * only close the EntityManagerFactory, if all application have stopped + * using the EntityManagerFactory. + * It interacts with the factoryManager. + */ + public synchronized void close() { + counter--; + if (counter == 0) { + factoryManager.remove(this); + factory.close(); + factoryManager.unload(database); + } + } + + /** + * {@inheritDoc} + */ + public EntityManager createEntityManager() { + return factory.createEntityManager(); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public EntityManager createEntityManager(Map properties) { + return factory.createEntityManager(properties); + } + + /** + * {@inheritDoc} + */ + public Cache getCache() { + return factory.getCache(); + } + + /** + * {@inheritDoc} + */ + public CriteriaBuilder getCriteriaBuilder() { + return factory.getCriteriaBuilder(); + } + + /** + * {@inheritDoc} + */ + public Metamodel getMetamodel() { + return factory.getMetamodel(); + } + + /** + * {@inheritDoc} + */ + public PersistenceUnitUtil getPersistenceUnitUtil() { + return factory.getPersistenceUnitUtil(); + } + + /** + * {@inheritDoc} + */ + public Map getProperties() { + return factory.getProperties(); + } + + /** + * {@inheritDoc} + */ + public boolean isOpen() { + return factory.isOpen(); + } + + /** + * {@inheritDoc} + */ + public File getDatabase() { + return database; + } + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/JpaDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/JpaDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +import java.io.Serializable; +import java.lang.reflect.ParameterizedType; +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +/** + * Abstract class which implement the DAO pattern for the JPA + * API. + * + * @param implementing the DAO for T. + */ +public abstract class JpaDAO implements DAO { + + private Class entityBeanType; + + @PersistenceContext + private EntityManager entityManager; + + /** + * Default constructor. Does some basic internal configuration. + */ + @SuppressWarnings("unchecked") + public JpaDAO() { + this.entityBeanType = (Class) ((ParameterizedType) getClass() + .getGenericSuperclass()).getActualTypeArguments()[0]; + } + + /** + * @param entityManager the entityManager to set + */ + public void setEntityManager(EntityManager entityManager) { + this.entityManager = entityManager; + } + + /** + * @return the entityManager + */ + protected EntityManager getEntityManager() { + return entityManager; + } + + /** + * {@inheritDoc} + */ + public T findById(Serializable id) { + return entityManager.find(getEntityBeanType(), id); + } + + /** + * {@inheritDoc} + */ + public List findAll() { + return entityManager.createQuery("from " + + getEntityBeanType().getName(), getEntityBeanType()).getResultList(); + } + + /** + * Get the class this object is implementing the DAO for. + * @return the class this object is implementing the DAO for. + */ + protected Class getEntityBeanType() { + return entityBeanType; + } + + /** + * {@inheritDoc} + */ + public void persist(T data) { + entityManager.persist(data); + } + + /** + * {@inheritDoc} + */ + public void remove(T data) { + entityManager.remove(data); + } + +} + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/MetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/MetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/MetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -11,29 +11,29 @@ * * Contributors: * - * Description: + * Description: * */ - package com.nokia.helium.metadata; -import java.util.Iterator; -import com.nokia.helium.jpa.entity.metadata.Metadata; +import javax.persistence.EntityManagerFactory; - +import org.apache.tools.ant.Task; /** - * Interface to add any plugins to write the database. Two ways to get - * the data, either the entire data could written by calling getEntries() method - * or using Iterator for large amount of entries to be written to the database. + * Interface used by the MetadataRecordTask to extract information and + * get them injected into the databased. + * */ public interface MetaDataInput { - + /** - * - * @param fileSet fileset to be added - * + * This methods is run for each MetadataInput nested into the MetadataRecordTask + * to extract data from log file for example. The factory is the entry point to + * the database. + * @param task an ant task running the plugging, mainly used to implement logging. + * @param factory the factory representing the access to the database. + * @throws MetadataException */ - Iterator iterator(); - -} \ No newline at end of file + void extract(Task task, EntityManagerFactory factory) throws MetadataException; +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/MetadataException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/MetadataException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata; + +/** + * Defines any kind of errors happening inside the + * Metadata framework. + * + */ +public class MetadataException extends Exception { + + private static final long serialVersionUID = 1590168613632533680L; + + /** + * Create an exception with an error message + * @param message the error message + */ + public MetadataException(String message) { + super(message); + } + + /** + * Create an exception with an error message and a cause + * @param message the error message + * @param cause the root cause + */ + public MetadataException(String message, Throwable cause) { + super(message, cause); + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ORMFMPPLoader.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ORMFMPPLoader.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ORMFMPPLoader.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,277 +18,31 @@ import java.io.File; import java.util.List; -import java.util.Map; -import java.util.ArrayList; + +import com.nokia.helium.metadata.fmpp.ORMQueryModeModel; + import fmpp.Engine; -import fmpp.ProgressListener; import fmpp.tdd.DataLoader; -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateHashModel; -import freemarker.template.TemplateSequenceModel; -import freemarker.template.SimpleScalar; -import freemarker.template.SimpleNumber; -import freemarker.template.TemplateModelIterator; -import com.nokia.helium.jpa.ORMReader; -import org.apache.log4j.Logger; -import freemarker.ext.beans.BeanModel; -import freemarker.ext.beans.BeansWrapper; - /** - * Utility class to access the data from the database and used by FMPP - * templates. + * Utility class to access the data from the database and used by FMPP templates. */ public class ORMFMPPLoader implements DataLoader { //private ResultSet rs; - private static final int READ_LIMIT = 20000; - - private static Logger log = Logger.getLogger(ORMFMPPLoader.class); - - private ORMReader reader; - /** + * Return a object abstracting the access to a database. * @see fmpp.tdd.DataLoader#load(fmpp.Engine, java.util.List) */ + @SuppressWarnings("unchecked") public Object load(Engine engine, List args) throws Exception { //log.debug("args.size:" + args.size()); - java.util.ListIterator iter = args.listIterator(); - int argsSize = args.size(); - if (argsSize < 1) { - throw new Exception("Input DB path should be provided to load into FMPP."); - } - ORMQueryModeModel model = new ORMQueryModeModel((String) (args.get(0))); + if (args.size() < 1) { + throw new MetadataException("The database path should be provided to load into FMPP."); + } + ORMQueryModeModel model = new ORMQueryModeModel(new File((String)args.get(0))); engine.setAttribute(this.getClass().toString(), model); return model; } - - /** - * QueryModel (which supports hash, sequence, containers) - * arg[0] - dbpath - * - */ - private class ORMQueryModeModel implements TemplateHashModel, ProgressListener { - - private String dbPath; - public ORMQueryModeModel(String path) { - File actualPath = new File(path); - String fileName = actualPath.getName(); - dbPath = new File(actualPath.getParent(), fileName.toLowerCase()).getPath(); - } - - /* - * Gets the template model for the corresponding query - * @param query for which the model is returned. - * @return returns the template model for the query - */ - public QueryTemplateModel get(String mode) { - String retType = null; - String actualMode = mode; - //log.debug("mode: " + mode); - if (mode.startsWith("native")) { - String [] splitString = mode.split(":"); - if (splitString.length == 2 ) { - actualMode = splitString[0]; - retType = splitString[1]; - //log.debug("actualMode " + actualMode); - //log.debug("retType " + retType); - } - } - - return new QueryTemplateModel(dbPath, actualMode, retType); - } - - public boolean isEmpty() { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public void notifyProgressEvent(Engine engine, int event, File src, - int pMode, Throwable error, Object param) throws Exception { - //if (event == ProgressListener.EVENT_END_PROCESSING_SESSION) { - // log.debug("notifyProgressEvent - finalizeORM"); - // ORMUtil.finalizeORM(dbPath); - //} - } - } - - /* - * Internal class to handle the sql query and returns the data in either - * hash or sequence or containers. - */ - private class QueryTemplateModel implements TemplateHashModel { - - private String dbPath; - - private String queryMode; - - private String returnType; - - private TemplateModel resultObject; - - public QueryTemplateModel(String path, String mode, String retType) { - dbPath = path; - queryMode = mode; - returnType = retType; - } - - public TemplateModel get(String query) { - //log.debug("QueryTemplateModel: query" + query); - if (queryMode.equals("jpasingle")) { - //log.debug("query executing with single result mode"); - resultObject = getModel(dbPath, query, returnType); - - } else { - //log.debug("query executing with multiple result mode"); - resultObject = new ORMQueryModel(dbPath, query, queryMode, returnType); - } - return resultObject; - } - - private TemplateModel getModel(String dbPath, String query, - String returnType) { - ORMReader reader = new ORMReader(dbPath); - ORMSequenceModel model = new ORMSequenceModel(reader.executeSingleResult(query, returnType)); - reader.close(); - return model; - } - - public boolean isEmpty() { - //log.debug("query hash isempty:"); - return false; - } - } - - private class ORMSequenceModel implements TemplateSequenceModel { - private List ormList = new ArrayList(); - - @SuppressWarnings("unchecked") - public ORMSequenceModel(Object obj) { - ormList.add(obj); - } - public int size() { - return ormList.size(); - } - - public TemplateModel get(int index) { - //log.debug("ORMSequenceModel.get: index: " + index); - if (index < ormList.size()) { - Object obj = ormList.get(index); - if (obj instanceof String) { - return new SimpleScalar((String)obj); - } else if (obj instanceof Number) { - return new SimpleNumber((Number)obj); - } else if (obj == null) { - return null; - } else { - return new ORMObjectModel(obj); - } - } - return null; - } - } - - private class ORMQueryModel implements TemplateCollectionModel - { - - private ORMReader ormReader; - private String queryType; - private String query; - private String returnType; - - public ORMQueryModel(String dbPath, String queryString, String type, String retType) { - ormReader = new ORMReader(dbPath); - queryType = type; - query = queryString; - returnType = retType; - //log.debug("ORMQueryModel: query" + query); - } - - /* - * Provides data via collection interface. - * @return the iterator model from which the data is accessed. - */ - public TemplateModelIterator iterator() { - //log.debug("iterator constructor called"); - return new ORMTemplateModelIterator(ormReader, query, queryType, returnType); - } - - } - - /* - * Internal Iterator class which provides data as collection. - */ - private class ORMTemplateModelIterator implements TemplateModelIterator { - - private String query; - private List> rowList; - private int currentOffsetIndex; - private boolean finished; - private String returnType; - private boolean nativeQuery; - private ORMReader ormReader; - - public ORMTemplateModelIterator(ORMReader reader, String queryString, String type, String retType) { - ormReader = reader; - query = queryString; - returnType = retType; - if (type.startsWith("native")) { - nativeQuery = true; - } - //log.debug("ORMTemplateModelIterator: query" + query); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public TemplateModel next() { - //log.debug("ORMTemplateModelIterator: next"); - Object toRet = null; - if (rowList != null) { - toRet = rowList.remove(0); - } - if (nativeQuery && returnType.equals("java.lang.String")) { - return new SimpleScalar((java.lang.String)toRet); - } - return new ORMObjectModel(toRet); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public boolean hasNext() { - if (rowList == null || rowList.size() == 0) { - if (!finished) { - if (nativeQuery) { - if (returnType.equals("java.lang.String")) { - rowList = ormReader.executeNativeQuery(query, null); - } else { - rowList = ormReader.executeNativeQuery(query, returnType); - } - } else { - rowList = ormReader.executeQuery(query); - } - if (rowList == null || rowList.size() == 0) { - finished = true; - ormReader.close(); - } - } - } - return !finished; - } - } - - private class ORMObjectModel extends BeanModel { - public ORMObjectModel(Object obj) { - super(obj, new BeansWrapper()); - } - } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/antlib.xml --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -28,8 +28,9 @@ - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataLogCondition.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataLogCondition.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataLogCondition.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,12 +18,25 @@ package com.nokia.helium.metadata.ant.conditions; import java.io.File; -import com.nokia.helium.jpa.ORMReader; -import com.nokia.helium.jpa.entity.metadata.Metadata; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Query; + import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.condition.Condition; import org.apache.tools.ant.types.DataType; +import org.apache.tools.ant.types.Resource; +import org.apache.tools.ant.types.ResourceCollection; + +import com.nokia.helium.metadata.FactoryManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.ant.types.SeverityEnum; /** * This class implements a Ant Condition which report true if it finds any @@ -33,7 +46,7 @@ *
      * <target name="fail-on-build-error">
      *   <fail message="The build contains errors">
    - *     <hlm:metadataHasSeverity log="my.log" db="my.db" severity="error"/>
    + *     <hlm:metadataHasSeverity log="my.log" database="my.db" severity="error"/>
      *   </fail>
      * </target>
      * 
    @@ -45,31 +58,82 @@ public class MetaDataLogCondition extends DataType implements Condition { // The severity to count - private String severity; - private String logFile; - private File fileName; - private boolean countMissing = true; + private SeverityEnum severity; + private File log; + private File database; + private List resourceCollections = new ArrayList(); /** - * Sets which severity will be counted. + * Defines which severity will be counted. * * @param severity * @ant.required */ - public void setSeverity(String severity) { + public void setSeverity(SeverityEnum severity) { this.severity = severity; } - public void setDb(File file) { - fileName = file; + /** + * Defines the database to use. + * @param database + */ + @Deprecated + public void setDb(File database) { + log("The usage of the 'db' attribute is deprecated, please use the database attribute instead.", Project.MSG_WARN); + setDatabase(database); + } + + /** + * Defines the database to use. + * @param database + */ + public void setDatabase(File database) { + this.database = database; } - public void setLog(String log) { - logFile = log; + /** + * The log file to look severity for in the metadata. + * @param log the actual real log file. + */ + public void setLog(File log) { + this.log = log; } + /** + * Defines if missing file shall be counted (Deprecated attribute is ignored). + * @param countMissing + */ + @Deprecated public void setCountMissing(boolean countMissing) { - this.countMissing = countMissing; + log("The usage of the 'countMissing' attribute is deprecated.", Project.MSG_WARN); + //this.countMissing = countMissing; + } + + /** + * + * @param resourceCollection + */ + public void add(ResourceCollection resourceCollection) { + resourceCollections.add(resourceCollection); + } + + /** + * Get the severity for a specific log file. + * @param file + * @return + * @throws MetadataException + */ + public int getSeverity(EntityManager em, File file) throws MetadataException { + // log file under the DB is always represented with / and not \. + String queryString = "select Count(m.id) from MetadataEntry m JOIN m.logFile as l " + + "JOIN m.severity as p where l.path='" + + file.getAbsolutePath().replace('\\', '/') + + "' and p.severity='" + severity.getSeverity() + "'"; + log("Query: " + queryString, Project.MSG_DEBUG); + Query query = em.createQuery(queryString); + Number number = (Number)query.getSingleResult(); + log("Result: " + number, Project.MSG_DEBUG); + return number.intValue(); } /** @@ -77,45 +141,52 @@ * * @return the number of a particular severity. */ - public int getSeverity() { - if (fileName == null || !fileName.exists() || logFile == null) { - //this.log("Error: Log file does not exist " + fileName); - return -1; + @SuppressWarnings("unchecked") + public int getSeverity() throws MetadataException { + if (log == null && resourceCollections.isEmpty()) { + throw new BuildException("'log' attribute not defined."); } - if (severity == null) - throw new BuildException("'severity' attribute is not defined"); + if (database == null) { + throw new BuildException("'database' attribute not defined."); + } + if (log != null && !log.exists()) { + log("Could not find " + log + ".", Project.MSG_WARN); + } + if (severity == null) { + throw new BuildException("'severity' attribute is not defined."); + } - log("Looking for severity '" + severity + "' under '" + fileName.getAbsolutePath() + "'", Project.MSG_DEBUG); - - Metadata.PriorityEnum prty = null; - if (severity.equalsIgnoreCase("ERROR")) { - prty = Metadata.PriorityEnum.ERROR; - } else if (severity.equalsIgnoreCase("WARNING")) { - prty = Metadata.PriorityEnum.WARNING; - } else if (severity.equalsIgnoreCase("FATAL")) { - prty = Metadata.PriorityEnum.FATAL; - } else if (severity.equalsIgnoreCase("INFO")) { - prty = Metadata.PriorityEnum.INFO; - } else if (severity.equalsIgnoreCase("REMARK")) { - prty = Metadata.PriorityEnum.REMARK; + EntityManagerFactory factory = null; + EntityManager em = null; + int result = 0; + try { + factory = FactoryManager.getFactoryManager().getEntityManagerFactory(database); + em = factory.createEntityManager(); + Date before = new Date(); + if (!resourceCollections.isEmpty()) { + for (ResourceCollection rc : resourceCollections) { + Iterator ri = rc.iterator(); + while (ri.hasNext()) { + Resource resource = ri.next(); + log("Looking for severity '" + severity.getValue() + "' under '" + resource + "'"); + result += getSeverity(em, new File(resource.toString())); + } + } + } else { + log("Looking for severity '" + severity.getValue() + "' under '" + log.getAbsolutePath() + "'"); + result = getSeverity(em, log); + } + Date after = new Date(); + log("Elapsed time: " + (after.getTime() - before.getTime()) + " ms"); + } finally { + if (em != null) { + em.close(); + } + if (factory != null) { + factory.close(); + } } - else - throw new BuildException("'severity' attribute is not valid"); - - // log file under the DB is always represented with / and not \. - String logname = logFile.replace('\\', '/'); - String query = "select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p where l.path like '%" + logname + "' and UPPER(p.priority)='" + severity.toUpperCase() + "'"; - ORMReader reader = new ORMReader(fileName.getAbsolutePath()); - Number number = (Number)reader.executeSingleResult(query, null); - int retValue = number.intValue(); - // Looking for missing file as error - if (countMissing && prty == Metadata.PriorityEnum.ERROR) { - String queryMissing = "select Count(m.id) from WhatLogEntry m JOIN m.component as c JOIN c.logFile as l where l.path like '%" + logname + "' and m.missing=1"; - Number numberMissing = (Number) reader.executeSingleResult(queryMissing, null); - retValue = number.intValue() + numberMissing.intValue(); - } - reader.close(); - return retValue; + return result; } /** @@ -125,10 +196,14 @@ * @return if true if message with the defined severity have been found. */ public boolean eval() { - int severity = getSeverity(); - if (severity < 0) { - return false; + try { + int severity = getSeverity(); + if (severity < 0) { + return false; + } + return severity > 0; + } catch (MetadataException ex) { + throw new BuildException(ex.getMessage(), ex); } - return severity > 0; } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataRegexTestCondition.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataRegexTestCondition.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/conditions/MetaDataRegexTestCondition.java Mon Sep 13 13:11:19 2010 +0800 @@ -24,16 +24,16 @@ import java.util.regex.Pattern; import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.ProjectComponent; import org.apache.tools.ant.taskdefs.condition.Condition; - +import org.apache.tools.ant.types.DataType; import com.nokia.helium.metadata.ant.types.MetaDataFilter; import com.nokia.helium.metadata.ant.types.MetaDataFilterSet; +import com.nokia.helium.metadata.ant.types.SeverityEnum; /** * This class implements a Ant Condition which report true if it finds the given - * input string is matched against the given filter of given priority + * input string is matched against the given filter of given severity * * Example: *
     
    @@ -46,13 +46,13 @@
      *   </target>
      * 
    * - * The condition will eval as true if the string is matched with any of the pattern in the given priority + * The condition will eval as true if the string is matched with any of the pattern in the given severity * * @ant.type name="metadataRegexTest" category="Metadata" */ -public class MetaDataRegexTestCondition extends ProjectComponent implements Condition { +public class MetaDataRegexTestCondition extends DataType implements Condition { - private String severity; + private SeverityEnum severity; private String string; private List filterSets = new ArrayList(); @@ -63,7 +63,7 @@ * @param severity * @ant.required */ - public void setSeverity(String severity) { + public void setSeverity(SeverityEnum severity) { this.severity = severity; } /** @@ -90,19 +90,21 @@ /** * This method iterates through the regular expression patterns and match the input string against them. - * @return true if the string is matched with any of the pattern in the given priority, false otherwise. + * @return true if the string is matched with any of the pattern in the given severity, false otherwise. */ public boolean eval() { - if (this.severity == null || (this.severity != null && this.severity.trim().isEmpty())) + if (this.severity == null) { throw new BuildException("'severity' attribute is not defined"); - if (this.string == null || (this.string != null && this.string.isEmpty())) + } + if (this.string == null || (this.string != null && this.string.isEmpty())) { throw new BuildException("'string' attribute is not defined"); + } for (MetaDataFilterSet set : filterSets) { for (MetaDataFilter filter : set.getAllFilters()) { Pattern pattern = filter.getPattern(); Matcher matcher = pattern.matcher(this.string); if (matcher.matches()) { - return this.severity.equalsIgnoreCase(filter.getPriority()); + return severity.getSeverity().equals(filter.getSeverity()); } } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataDeleteTask.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataDeleteTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataDeleteTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,15 +17,25 @@ package com.nokia.helium.metadata.ant.taskdefs; -import org.apache.tools.ant.types.FileSet; - -import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Task; +import java.io.File; +import java.util.Date; +import java.util.Iterator; +import java.util.List; import java.util.Vector; -import java.util.ArrayList; -import java.util.List; -import org.apache.log4j.Logger; -import com.nokia.helium.metadata.db.*; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.Resource; +import org.apache.tools.ant.types.ResourceCollection; + +import com.nokia.helium.metadata.FactoryManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.LogFileDAO; /** * This task provide a way to delete the data from db for a log file set. @@ -41,90 +51,95 @@ */ public class MetaDataDeleteTask extends Task { - private static Logger log = Logger.getLogger(MetaDataDeleteTask.class); - - private String database; + private File database; private boolean failOnError = true; - private Vector fileSetList = new Vector(); + private List resourceCollections = new Vector(); /** * Helper function to set the database parameter * * @ant.required */ - public void setDatabase(String dbFile) { - database = dbFile; - } - - public void setFailOnError(String failNotify) { - if (failNotify.equals("false")) { - failOnError = false; - } + public void setDatabase(File database) { + this.database = database; } /** - * Updates the list of filelist from the input fileset. - * @param fileSetList input fileset list - * @return the matched files including the base dir. + * Defines if the task should fail on error. + * @param failNotify + * @ant.not-required Default is true. */ - private List getFileListFromFileSet() { - List fileList = new ArrayList(); - for (FileSet fs : fileSetList) { - DirectoryScanner ds = fs.getDirectoryScanner(getProject()); - String[] includedFiles = ds.getIncludedFiles(); - for ( String file : includedFiles ) { - fileList.add(file); - log.debug("includedfiles: " + file); - } - } - log.debug("fileList.size" + fileList.size()); - return fileList; + public void setFailOnError(boolean failOnError) { + this.failOnError = failOnError; } /** - * Adds the fileset (list of input log files to be processed). - * @param fileSet fileset to be added + * Adds any ResourceCollection types from Ant (list of input log files to be processed). + * @param resourceCollection the ResourceCollection to be added * */ - public void add(FileSet fileSet) { - fileSetList.add(fileSet); + public void add(ResourceCollection resourceCollection) { + resourceCollections.add(resourceCollection); } /** * Helper function to get the database * */ - public String getDatabase() { + protected File getDatabase() { return database; } - + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") @Override public void execute() { - /* - MetaDataDb metadataDb = null; + if (database == null) { + throw new BuildException("'database' attribute is not defined."); + } + EntityManagerFactory factory = null; + EntityManager entityManager = null; try { - log.debug("Initializing DB: " + database + "to delete"); - log("time before removing entries from db" + new Date()); - metadataDb = new MetaDataDb(database); - metadataDb.removeEntries(getFileListFromFileSet()); - log("time after removing entries from db" + new Date()); - } catch (BuildException ex1) { + factory = FactoryManager.getFactoryManager().getEntityManagerFactory(database); + entityManager = factory.createEntityManager(); + Date before = new Date(); + log("Time before recording to db: " + before); + for (ResourceCollection resourceCollection : resourceCollections) { + Iterator ri = (Iterator)resourceCollection.iterator(); + while (ri.hasNext()) { + File file = new File(ri.next().toString()); + LogFileDAO logFileDAO = new LogFileDAO(); + logFileDAO.setEntityManager(entityManager); + LogFile logFile = logFileDAO.findByLogName(file); + if (logFile != null) { + log("Removing log from database: " + file.getAbsolutePath()); + entityManager.getTransaction().begin(); + logFileDAO.remove(logFile); + entityManager.getTransaction().commit(); + } + } + } + Date after = new Date(); + log("Time after recording to db: " + after); + log("Elapsed time: " + (after.getTime() - before.getTime()) + " ms"); + } catch (MetadataException ex) { + log(ex.getMessage(), Project.MSG_ERR); if (failOnError) { - throw ex1; - } - } catch (Exception ex) { - if (failOnError) { - throw new BuildException("Failed during writing data to db"); + throw new BuildException(ex.getMessage(), ex); } } finally { - log.debug("finalizing DB: " + database); - if (metadataDb != null) { - metadataDb.finalizeDB(); + if (entityManager != null) { + entityManager.close(); + entityManager = null; + } + if (factory != null) { + factory.close(); + factory = null; } } - */ } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataLogCountTask.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataLogCountTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataLogCountTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,40 +18,66 @@ package com.nokia.helium.metadata.ant.taskdefs; import java.io.File; +import java.util.ArrayList; +import java.util.List; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.ResourceCollection; + +import com.nokia.helium.metadata.MetadataException; import com.nokia.helium.metadata.ant.conditions.MetaDataLogCondition; +import com.nokia.helium.metadata.ant.types.SeverityEnum; /** * This class sets a property to the number of matching severity inside a Metadata db for a log. * Example: *
    - *     <hlm:metadataCountSeverity severity="error" log="*_fixslashes_raptor.log" db="${build.log.dir}/metadata.db" property="fixslashes.error"/>
    + *     <hlm:metadataCountSeverity severity="error" 
    + *                                   log="${compile.log.dir}/${build.id}_fixslashes_raptor.log" 
    + *                                   database="${build.log.dir}/metadata_db" 
    + *                                   property="fixslashes.error" />
      * 
    * @ant.task name="metadataCountSeverity" category="Metadata" */ public class MetaDataLogCountTask extends Task { - private File fileName; - private String logFile; - private String severity; + private File database; + private File log; + private SeverityEnum severity; private String property; - private boolean countMissing = true; + private List resourceCollections = new ArrayList(); + + public void add(ResourceCollection resourceCollection) { + resourceCollections.add(resourceCollection); + } /** - * File to be parsed. + * Location of the database. * * @param filename * @ant.required */ - public void setDb(File filename) { - fileName = filename; + @Deprecated + public void setDb(File database) { + log("The usage of the db attribute is deprecated, please use the database attribute instead.", Project.MSG_WARN); + this.database = database; + } + + /** + * Location of the database. + * + * @param filename + * @ant.required + */ + public void setDatabase(File database) { + this.database = database; } - public void setLog(String log) { - logFile = log; + public void setLog(File log) { + this.log = log; } /** @@ -60,7 +86,7 @@ * @param severity * @ant.required */ - public void setSeverity(String severity) { + public void setSeverity(SeverityEnum severity) { this.severity = severity; } @@ -79,8 +105,9 @@ * for error severity * @ant.not-required Default is true */ + @Deprecated public void setCountMissing(boolean countMissing) { - this.countMissing = countMissing; + // not active anymore } /** @@ -88,14 +115,21 @@ * @throws BuildException */ public void execute() { - if (property == null) + if (property == null) { throw new BuildException("'property' attribute is not defined"); - - MetaDataLogCondition cond = new MetaDataLogCondition(); - cond.setDb(fileName); - cond.setLog(logFile); - cond.setSeverity(severity); - cond.setCountMissing(countMissing); - getProject().setNewProperty(property, "" + cond.getSeverity()); + } + try { + MetaDataLogCondition cond = new MetaDataLogCondition(); + cond.setProject(getProject()); + cond.setDatabase(database); + cond.setLog(log); + cond.setSeverity(severity); + for (ResourceCollection rc : resourceCollections) { + cond.add(rc); + } + getProject().setNewProperty(property, "" + cond.getSeverity()); + } catch (MetadataException ex) { + throw new BuildException(ex.getMessage(), ex); + } } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataRecordTask.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataRecordTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/taskdefs/MetaDataRecordTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,16 +17,19 @@ package com.nokia.helium.metadata.ant.taskdefs; -import com.nokia.helium.metadata.CustomMetaDataProvider; -import com.nokia.helium.metadata.MetaDataInput; -import com.nokia.helium.jpa.entity.metadata.Metadata; +import java.io.File; +import java.util.Date; +import java.util.Vector; + +import javax.persistence.EntityManagerFactory; + import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import java.util.Vector; -import java.util.Iterator; -import org.apache.log4j.Logger; -import com.nokia.helium.metadata.db.*; -import java.util.Date; + +import com.nokia.helium.metadata.FactoryManager; +import com.nokia.helium.metadata.MetaDataInput; +import com.nokia.helium.metadata.MetadataException; /** * This task provide a way to record the data in the Database. @@ -55,33 +58,35 @@ */ public class MetaDataRecordTask extends Task { - private static Logger log = Logger.getLogger(MetaDataRecordTask.class); - - private String database; + private File database; private boolean failOnError = true; - private Vector metadataList = new Vector(); + private Vector metaDataInputs = new Vector(); /** * Helper function to set the database parameter * * @ant.required */ - public void setDatabase(String dbFile) { - database = dbFile; + public void setDatabase(File database) { + this.database = database; } - public void setFailOnError(String failNotify) { - if (failNotify.equals("false")) { - failOnError = false; - } + /** + * Defines if the task should fail on error. + * @param failOnError + * @ant.not-required Default is true. + */ + public void setFailOnError(boolean failOnError) { + this.failOnError = failOnError; } + /** * Helper function to get the database * */ - public String getDatabase() { + public File getDatabase() { return database; } @@ -90,11 +95,11 @@ * @return build metadata object * */ - public Vector getMetaDataList() throws Exception { - if (metadataList.isEmpty()) { - throw new Exception("metadata list is empty"); + public Vector getMetaDataList() throws MetadataException { + if (metaDataInputs.isEmpty()) { + throw new MetadataException("metadata list is empty"); } - return metadataList; + return metaDataInputs; } /** @@ -102,76 +107,39 @@ * @param build metadata list to add * */ - public void add(MetaDataInput interf) { - metadataList.add(interf); + public void add(MetaDataInput metaDataInput) { + metaDataInputs.add(metaDataInput); } - + /** + * {@inheritDoc} + */ @Override public void execute() { - ORMMetadataDB ormDB = null; + if (database == null) { + throw new BuildException("'database' attribute is not defined."); + } + EntityManagerFactory factory = null; try { - log.debug("Getting Contents to write to db: " + database); - log.debug("Initializing DB: " + database); - log.debug("initializing ORM db"); - ormDB = new ORMMetadataDB(database); - log.debug("Parsing the input and writing to DB"); + factory = FactoryManager.getFactoryManager().getEntityManagerFactory(database); Date before = new Date(); log("Time before recording to db: " + before); - for (MetaDataInput metadataInput : metadataList) { - boolean removed = false; - String logPath = null; - String currentLogPath = null; - Iterator inputIterator = metadataInput.iterator(); - while (inputIterator.hasNext()) { - //Todo: better way of log handling, with metadatainput - // metadata initialization for each logfile within - //metadatainput itself would be better. this is temporary. - Metadata.LogEntry logEntry = inputIterator.next(); - logPath = logEntry.getLogPath(); - if (currentLogPath == null) { - currentLogPath = logPath; - removed = false; - } else if (!currentLogPath.equals(logPath)) { - finalizeForLogPath(currentLogPath, metadataInput, ormDB); - currentLogPath = logPath; - removed = false; - } - if (!removed ) { - log.debug("processing for log: " + logPath); - ormDB.removeEntries(logPath); - removed = true; - } - //initializes the metadata if none exists - ormDB.addLogEntry(logEntry); - } - finalizeForLogPath(currentLogPath, metadataInput, ormDB); + for (MetaDataInput metadataInput : metaDataInputs) { + metadataInput.extract(this, factory); } Date after = new Date(); log("Time after recording to db: " + after); log("Elapsed time: " + (after.getTime() - before.getTime()) + " ms"); - log.debug("Successfully writen to DB"); - } catch (BuildException ex1) { - log.debug("BuildException during writing to db: ", ex1); + } catch (MetadataException ex) { + log(ex.getMessage(), Project.MSG_ERR); if (failOnError) { - throw ex1; + throw new BuildException(ex.getMessage(), ex); } } finally { - if (ormDB != null) { - ormDB.finalizeDB(); + if (factory != null) { + factory.close(); } - } - } - - private void finalizeForLogPath(String currentLogPath, - MetaDataInput metadataInput, ORMMetadataDB ormDB) { - if (currentLogPath != null) { - if (metadataInput instanceof CustomMetaDataProvider) { - CustomMetaDataProvider provider = - (CustomMetaDataProvider)metadataInput; - provider.provide(ormDB, currentLogPath); - } - ormDB.finalizeMetadata(currentLogPath); + factory = null; } } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AbldLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AbldLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AbldLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,148 +17,143 @@ package com.nokia.helium.metadata.ant.types; -import java.io.*; -import org.apache.tools.ant.BuildException; -import java.util.*; -import org.apache.log4j.Logger; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.Map; +import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.regex.Matcher; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import com.nokia.helium.metadata.AutoCommitEntityManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.MetadataEntry; +import com.nokia.helium.metadata.model.metadata.Severity; +import com.nokia.helium.metadata.model.metadata.SeverityDAO; /** - * This Type is to specify and use the abld logparser type to parse and store the data. - * + * This Type is to specify and use the abld logparser type to parse and store + * the data. + * *
    - * <hlm:metadatafilterset id="abld.metadata.filter">
    - *    <metadatafilterset filterfile="common.csv" />
    + * <hlm:metadatafilterset id="abld.metadata.filter">
    + *    <metadatafilterset filterfile="common.csv" />
      * </hlm:metadatafilterset>
      * 
      * <hlm:abldmetadatainput>
    - *    <fileset dir="${project.dir}/../data/">
    - *        <include name="*_compile*.log"/>
    + *    <fileset dir="${project.dir}/../data/">
    + *        <include name="*_compile*.log"/>
      *    </fileset>
    - *    <metadatafilterset refid="abld.metadata.filter" />
    + *    <metadatafilterset refid="abld.metadata.filter" />
      * </hlm:antmetadatainput>
      * 
    * * @ant.task name="abldmetadatainput" category="Metadata" */ -public class AbldLogMetaDataInput extends TextLogMetaDataInput { +public class AbldLogMetaDataInput extends AbstractComponentBaseMetadataInput { - private Logger log = Logger.getLogger(AbldLogMetaDataInput.class); - - private Pattern abldFinishedPattern = Pattern.compile("^===\\s+.+\\s+finished.*"); - private Pattern abldStartedPattern = Pattern.compile("^===\\s+(.+)\\s+started.*"); - private Pattern abldComponentPattern = Pattern.compile("^===\\s+(.+?)\\s+==\\s+(.+)"); - - - private String currentComponent; - - private boolean entryCreated; + public static final String DEFAULT_COMPONENT = "General"; + private Pattern abldFinishedPattern = Pattern + .compile("^===\\s+.+\\s+finished.*"); + private Pattern abldStartedPattern = Pattern + .compile("^===\\s+(.+)\\s+started.*"); + private Pattern abldComponentPattern = Pattern + .compile("^===\\s+(.+?)\\s+==\\s+(.+)"); - private boolean recordText; + private String currentComponent = DEFAULT_COMPONENT; + private EntityManager entityManager; - public AbldLogMetaDataInput() { - } - /** - * Function to check from the input stream if is there any entries available. - * @return true if there are any entry available otherwise false. + * {@inheritDoc} */ - public boolean isEntryCreated(File currentFile) { - String exceptions = ""; - int lineNumber = getLineNumber(); - BufferedReader currentReader = getCurrentReader(); - log.debug("Getting next set of log entries for Abld Input"); + @Override + public void extract(EntityManagerFactory factory, File file) + throws MetadataException { + entityManager = factory.createEntityManager(); + AutoCommitEntityManager autoCommitEM = new AutoCommitEntityManager(factory); try { - if (currentReader == null) { - lineNumber = 0; - setLineNumber(lineNumber); - log.debug("Current abld log file name:" + currentFile); - log.debug("Processing file: " + currentFile); - currentReader = new BufferedReader(new FileReader(currentFile)); - setCurrentReader(currentReader); - } + // Creating the filename + LogFile logFile = getLogFile(entityManager, file); + + // Always defines the default component + this.getDefaultComponent(logFile); + + // Loading the available priorities + SeverityDAO severityDao = new SeverityDAO(); + severityDao.setEntityManager(entityManager); + Map priorities = severityDao.getSeverities(); + + + // Parsing the log file + BufferedReader reader = new BufferedReader(new FileReader(file)); String logText = null; - while ((logText = currentReader.readLine()) != null) { - lineNumber ++; - setLineNumber(lineNumber); - logText = logText.replaceFirst("'^\\s*\\[.+?\\]\\s*", ""); - if (logText.startsWith("++ Finished at")) { - if (currentComponent != null && !entryCreated) { - addEntry("DEFAULT", currentComponent, currentFile.toString(), - 0, "" ); - entryCreated = true; - recordText = false; - return true; - } - entryCreated = false; - } else if (logText.startsWith("=== ")) { - Matcher finishMatch = abldFinishedPattern.matcher(logText); - if (finishMatch.matches()) { - if (currentComponent != null && !entryCreated) { - addEntry("DEFAULT", currentComponent, currentFile.toString(), - 0, "" ); - entryCreated = true; - recordText = false; - return true; - } - entryCreated = false; + int lineNumber = 0; + while ((logText = reader.readLine()) != null) { + lineNumber++; + String line = logText.replaceFirst("^[ ]*\\[.+?\\][ ]*", ""); + + if (line.startsWith("=== ")) { + Matcher matcher = abldComponentPattern.matcher(line); + if (matcher.matches()) { + currentComponent = matcher.group(2); + getComponent(currentComponent, logFile); // declare the component... } else { - Matcher componentMatch = abldComponentPattern.matcher(logText); - if (componentMatch.matches()) { - currentComponent = componentMatch.group(2); - recordText = true; - } - - Matcher startMatch = abldStartedPattern.matcher(logText); - if (startMatch.matches()) { - currentComponent = startMatch.group(1); - recordText = true; + matcher = abldStartedPattern.matcher(line); + if (matcher.matches()) { + currentComponent = DEFAULT_COMPONENT; + } else { + matcher = abldFinishedPattern.matcher(line); + if (matcher.matches()) { + currentComponent = DEFAULT_COMPONENT; + } } } } else { - if (recordText) { - String severity = getSeverity(logText); - if (severity != null) { - entryCreated = true; - addEntry(severity, currentComponent, currentFile.toString(), - lineNumber, logText ); - return true; - } + SeverityEnum.Severity severity = getSeverity(line); + if (severity != SeverityEnum.Severity.NONE) { + MetadataEntry entry = new MetadataEntry(); + entry.setLogFile(autoCommitEM.merge(logFile)); + entry.setLineNumber(lineNumber); + entry.setSeverity(autoCommitEM.merge(priorities.get(severity.toString()))); + entry.setText(line); + entry.setComponent(autoCommitEM.merge(getComponent(currentComponent, logFile))); + autoCommitEM.persist(entry); } } } - currentReader.close(); - currentReader = null; - setCurrentReader(currentReader); + reader.close(); } catch (FileNotFoundException ex) { - log.debug("FileNotFoundException in AbldLogMetadata", ex); - try { - currentReader.close(); - } catch ( IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in closing reader", iex); - } - currentReader = null; - setCurrentReader(null); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; + throw new MetadataException(ex.getMessage(), ex); } catch (IOException ex) { - log.debug("IOException in AbldLogMetadata", ex); - try { - currentReader.close(); - } catch ( IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("IOException in closing reader", iex); + throw new MetadataException(ex.getMessage(), ex); + } finally { + if (autoCommitEM != null) { + autoCommitEM.close(); + } + if (entityManager != null) { + if (entityManager.getTransaction().isActive()) { + entityManager.getTransaction().rollback(); + } + entityManager.close(); + entityManager = null; } - currentReader = null; - setCurrentReader(null); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; } - if (!exceptions.equals("")) { - throw new BuildException(exceptions); - } - return false; + clear(); + } + + @Override + protected EntityManager getEntityManager() { + return entityManager; } + + @Override + protected String getDefaultComponentName() { + return DEFAULT_COMPONENT; + } + } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AbstractComponentBaseMetadataInput.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AbstractComponentBaseMetadataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.metadata.ant.types; + +import java.util.Hashtable; +import java.util.Map; + +import javax.persistence.EntityManager; + +import com.nokia.helium.metadata.model.metadata.Component; +import com.nokia.helium.metadata.model.metadata.LogFile; + +/** + * LogMetaDataInput which implements some abstract component handling. + * + */ +public abstract class AbstractComponentBaseMetadataInput extends LogMetaDataInput { + protected static final String DEFAULT_COMPONENT = "Default"; + private Map components = new Hashtable(); + private Component defaultComponent; + + /** + * Provides an entity manager to manipulate the data. + * @return + */ + protected abstract EntityManager getEntityManager(); + + /** + * Defines the name of the default component. + * @return a String with the name of the default component. + */ + protected String getDefaultComponentName() { + return DEFAULT_COMPONENT; + } + + /** + * Get the default component instance from the database. + * Or create it if needed. + * @param logFile logFile to associate the component to. + * @return the Component instance. + */ + protected Component getDefaultComponent(LogFile logFile) { + if (defaultComponent == null) { + defaultComponent = getComponent(getDefaultComponentName(), logFile); + } + return defaultComponent; + } + + /** + * Get the database instance for the name component. + * @param name the name of the component + * @param logFile logFile to associate the component to. + * @return the Component instance. + */ + protected Component getComponent(String name, LogFile logFile) { + if (!components.containsKey(name)) { + Component component = createComponent(name, logFile); + components.put(name, component); + return component; + } + return components.get(name); + } + + /** + * Creates a new component. This method is called by the + * getComponent method if the component entity is not found + * in the cache. + * @param name the name of the component + * @param logFile logFile to associate the component to. + * @return the Component instance. + */ + protected Component createComponent(String name, LogFile logFile) { + Component component = new Component(); + component.setComponent(name); + component.setLogFile(logFile); + getEntityManager().getTransaction().begin(); + getEntityManager().persist(component); + getEntityManager().getTransaction().commit(); + return component; + } + + /** + * Clear the components cache. + */ + protected void clear() { + components = new Hashtable(); + defaultComponent = null; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AntLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AntLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/AntLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,12 +17,26 @@ package com.nokia.helium.metadata.ant.types; -import java.io.*; -import org.apache.tools.ant.BuildException; -import java.util.*; -import org.apache.log4j.Logger; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.Map; +import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.regex.Matcher; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import com.nokia.helium.metadata.AutoCommitEntityManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.Component; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.MetadataEntry; +import com.nokia.helium.metadata.model.metadata.Severity; +import com.nokia.helium.metadata.model.metadata.SeverityDAO; /** * This Type is to specify and use the ant logparser type to parse and store the data. @@ -42,100 +56,78 @@ * * @ant.task name="antmetadatainput" category="Metadata" */ -public class AntLogMetaDataInput extends TextLogMetaDataInput { +public class AntLogMetaDataInput extends AbstractComponentBaseMetadataInput { - private Logger log = Logger.getLogger(AntLogMetaDataInput.class); - + public static final String DEFAULT_COMPONENT = "Ant"; private Pattern antTargetPattern = Pattern.compile("^([^\\s=\\[\\]]+):$"); - - private String currentComponent; - - private boolean entryCreated; + private EntityManager entityManager; /** - * Constructor + * {@inheritDoc} */ - public AntLogMetaDataInput() { + @Override + public void extract(EntityManagerFactory factory, File file) + throws MetadataException { + Component currentComponent = null; + entityManager = factory.createEntityManager(); + AutoCommitEntityManager autoCommitEM = new AutoCommitEntityManager(factory); + try { + // Loading the available priorities + SeverityDAO severityDao = new SeverityDAO(); + severityDao.setEntityManager(entityManager); + Map priorities = severityDao.getSeverities(); + + // Creating the filename + LogFile logFile = getLogFile(entityManager, file); + + // Parsing the log file + BufferedReader reader = new BufferedReader(new FileReader(file)); + String logText = null; + int lineNumber = 0; + while ((logText = reader.readLine()) != null) { + lineNumber++; + String line = logText.replaceFirst("^[ ]*\\[.+?\\][ ]*", ""); + + Matcher matcher = antTargetPattern.matcher(line); + if (matcher.matches()) { + currentComponent = getComponent(matcher.group(1), logFile); + } else { + if (currentComponent == null) { + currentComponent = getDefaultComponent(logFile); + } + SeverityEnum.Severity severity = getSeverity(line); + if (severity != SeverityEnum.Severity.NONE) { + MetadataEntry entry = new MetadataEntry(); + entry.setLogFile(logFile); + entry.setLineNumber(lineNumber); + entry.setSeverity(autoCommitEM.merge(priorities.get(severity.toString()))); + entry.setText(line); + entry.setComponent(autoCommitEM.merge(currentComponent)); + autoCommitEM.persist(entry); + } + } + } + reader.close(); + } catch (FileNotFoundException ex) { + throw new MetadataException(ex.getMessage(), ex); + } catch (IOException ex) { + throw new MetadataException(ex.getMessage(), ex); + } finally { + if (autoCommitEM != null) { + autoCommitEM.close(); + } + if (entityManager != null) { + entityManager.close(); + } + clear(); + } } /** - * Function to check from the input stream if is there any entries available. - * @return true if there are any entry available otherwise false. + * {@inheritDoc} */ - public boolean isEntryCreated(File currentFile) { - String exceptions = ""; - int lineNumber = getLineNumber(); - BufferedReader currentReader = getCurrentReader(); - try { - if (currentReader == null) { - setLineNumber(0); - log.debug("Current Text log file name:" + currentFile); - log.debug("Processing file: " + currentFile); - currentReader = new BufferedReader(new FileReader(currentFile)); - setCurrentReader(currentReader); - } - String logText = ""; - while ((logText = currentReader.readLine()) != null) { - Matcher match = antTargetPattern.matcher(logText); - if (match.matches()) { - if (currentComponent != null && !entryCreated) { - addEntry("DEFAULT", currentComponent, currentFile.toString(), - 0, "" ); - entryCreated = true; - return true; - } - entryCreated = false; - currentComponent = match.group(1); - } - logText = logText.replaceFirst("^[ ]*\\[.+?\\][ ]*", ""); - String severity = getSeverity(logText); - if (severity != null) { - entryCreated = true; - // If there is no current component which means - // it is a redirected output, using file name as comp name - if (currentComponent == null ) { - currentComponent = currentFile.getName(); - } - addEntry(severity, currentComponent, currentFile.toString(), - lineNumber, logText ); - logText = ""; - return true; - } - } - currentReader.close(); - currentReader = null; - setCurrentReader(currentReader); - if (isAdditionalEntry()) { - return true; - } - } catch (FileNotFoundException ex) { - log.debug("FileNotFoundException in AntLogMetadata", ex); - try { - currentReader.close(); - } catch ( IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in closing reader", iex); - currentReader = null; - setCurrentReader(null); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; - } - } catch (IOException ex) { - log.debug("IOException in AntLogMetadata", ex); - try { - currentReader.close(); - } catch ( IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in closing reader", iex); - currentReader = null; - setCurrentReader(null); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; - } - } - if (!exceptions.equals("")) { - throw new BuildException(exceptions); - } - return false; + @Override + protected EntityManager getEntityManager() { + return entityManager; } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/IMakerLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/IMakerLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/IMakerLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,13 +17,29 @@ package com.nokia.helium.metadata.ant.types; -import java.io.*; -import org.apache.tools.ant.BuildException; -import java.util.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; -import org.apache.log4j.Logger; -import java.util.regex.Pattern; -import java.util.regex.Matcher; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import org.apache.tools.ant.Project; + +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.Component; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.MetadataEntry; +import com.nokia.helium.metadata.model.metadata.Severity; +import com.nokia.helium.metadata.model.metadata.SeverityDAO; + /** * This Type is to specify and use the abld logparser type to parse and store @@ -44,172 +60,87 @@ * * @ant.task name="imakermetadatainput" category="Metadata" */ -public class IMakerLogMetaDataInput extends TextLogMetaDataInput { - - /** Internal data storage. */ - private class Entry { - - private String fileName; - private int lineNumber; - private String text; - private String severity; +public class IMakerLogMetaDataInput extends AbstractComponentBaseMetadataInput { + public static final String DEFAULT_COMPONENT_NAME = "General"; + private Pattern iMakerFpsxPattern = Pattern.compile("/([^/]*?\\.fpsx)"); + private EntityManager entityManager; - public Entry(String fileName, int lineNumber, String text, String severity) { - super(); - this.text = text; - this.lineNumber = lineNumber; - this.fileName = fileName; - this.severity = severity; - } - - public String getText() { - return text; - } + /** + * {@inheritDoc} + */ + @Override + public void extract(EntityManagerFactory factory, File file) + throws MetadataException { + entityManager = factory.createEntityManager(); + List entries = new ArrayList(); + String currentComponent = null; + try { + // Creating the filename + LogFile logFile = getLogFile(entityManager, file); - public int getLineNumber() { - return lineNumber; - } - - public String getFileName() { - return fileName; - } - - public String getSeverity() { - return severity; + // Loading the available priorities + SeverityDAO severityDao = new SeverityDAO(); + severityDao.setEntityManager(entityManager); + Map priorities = severityDao.getSeverities(); + + // Parsing the log file + BufferedReader reader = new BufferedReader(new FileReader(file)); + String line = null; + int lineNumber = 0; + while ((line = reader.readLine()) != null) { + lineNumber++; + Matcher matcher = iMakerFpsxPattern.matcher(line); + if (matcher.find()) { + currentComponent = matcher.group(1); + log("Matched component: " + currentComponent, Project.MSG_DEBUG); + } + if (line.startsWith("++ Started at")) { + currentComponent = null; + } else if (line.startsWith("++ Finished at")) { + if (currentComponent == null) { + currentComponent = DEFAULT_COMPONENT_NAME; + } + Component component = getComponent(currentComponent, logFile); + entityManager.getTransaction().begin(); + for (MetadataEntry entry : entries) { + entry.setComponent(component); + entityManager.persist(entry); + } + entityManager.getTransaction().commit(); + entityManager.clear(); + entries.clear(); + } else { + SeverityEnum.Severity severity = getSeverity(line); + if (severity != SeverityEnum.Severity.NONE) { + MetadataEntry entry = new MetadataEntry(); + entry.setLogFile(logFile); + entry.setLineNumber(lineNumber); + entry.setSeverity(priorities.get(severity.toString())); + entry.setText(line); + entries.add(entry); + } + } + } + reader.close(); + } catch (FileNotFoundException ex) { + throw new MetadataException(ex.getMessage(), ex); + } catch (IOException ex) { + throw new MetadataException(ex.getMessage(), ex); + } finally { + if (entityManager != null) { + entityManager.close(); + } + clear(); } - - } - - private Logger log = Logger.getLogger(AbldLogMetaDataInput.class); - - private Pattern iMakerFpsxPattern = Pattern.compile("/([^/]*?\\.fpsx)"); - - private String currentComponent; - - private boolean entryCreated; - - private boolean isRecordingIssues; - - public IMakerLogMetaDataInput() { + } /** - * Function to check from the input stream if is there any entries - * available. - * - * @return true if there are any entry available otherwise false. + * {@inheritDoc} */ - public boolean isEntryCreated(File currentFile) { - String exceptions = ""; - entryCreated = false; - int lineNumber = getLineNumber(); - BufferedReader currentReader = getCurrentReader(); - log.debug("Getting next set of log entries for iMaker input"); - try { - if (currentReader == null) { - lineNumber = 0; - setLineNumber(lineNumber); - log.debug("Processing iMaker log file name: " + currentFile); - currentReader = new BufferedReader(new FileReader(currentFile)); - setCurrentReader(currentReader); - } - - List entriesCache = new ArrayList(); - String logText = null; - while ((logText = currentReader.readLine()) != null) { - lineNumber++; - setLineNumber(lineNumber); - - // Remove Ant task comment text, e.g. "[imaker]" - logText = logText.replaceFirst("'^\\s*\\[.+?\\]\\s*", ""); - // log.debug("Parsing log line: " + logText); - - // See if the line should be captured - if (isRecordingIssues) { - // Check for a line with an issue - String severity = getSeverity(logText); - if (severity != null) { - Entry entry = new Entry(currentFile.toString(), lineNumber, logText, severity); - entriesCache.add(entry); - } - - // Check if the iMaker FPSX image name is on this line, to - // get the component - if (currentComponent == null) { - Matcher componentMatch = iMakerFpsxPattern.matcher(logText); - if (componentMatch.find()) { - currentComponent = componentMatch.group(1); - log.debug("Matched component: " + currentComponent); - } - } + @Override + protected EntityManager getEntityManager() { + return entityManager; + } - // See if the component log block has ended - if (logText.startsWith("++ Finished at")) { - // Add all cached issues - if (currentComponent != null && entriesCache.size() > 0) { - for (int i = 0; i < entriesCache.size(); i++) { - Entry entry = entriesCache.get(i); - addEntry(entry.getSeverity(), currentComponent, entry.getFileName(), entry.getLineNumber(), entry.getText()); - } - entryCreated = true; - currentComponent = null; - return true; - } - // Or add a default entry to record the logfile - else { - addEntry("DEFAULT", currentComponent, currentFile.toString(), lineNumber, ""); - entryCreated = true; - currentComponent = null; - return true; - } - } - } - else { - // Check for the start of a block - if (logText.startsWith("++ Started at")) { - isRecordingIssues = true; - } - } - } - currentReader.close(); - currentReader = null; - setCurrentReader(currentReader); - } - catch (FileNotFoundException ex) { - log.debug("FileNotFoundException in AbldLogMetadata", ex); - try { - if (currentReader != null) { - currentReader.close(); - } - } - catch (IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in closing reader", iex); - } - currentReader = null; - setCurrentReader(null); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; - } - catch (IOException ex) { - log.debug("IOException in AbldLogMetadata", ex); - try { - if (currentReader != null) { - currentReader.close(); - } - } - catch (IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("IOException in closing reader", iex); - } - currentReader = null; - setCurrentReader(null); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; - } - if (!exceptions.equals("")) { - throw new BuildException(exceptions); - } - return entryCreated; - } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/LogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/LogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/LogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,54 +17,43 @@ package com.nokia.helium.metadata.ant.types; -import com.nokia.helium.metadata.MetaDataInput; - -import org.apache.tools.ant.BuildException; -import com.nokia.helium.jpa.entity.metadata.Metadata; import java.io.File; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; -import java.util.Vector; -import java.util.Iterator; -import java.util.Map; -import java.util.Hashtable; import java.util.regex.Pattern; -import org.apache.tools.ant.types.FileSet; -import org.apache.tools.ant.DirectoryScanner; -import org.apache.log4j.Logger; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; import org.apache.tools.ant.types.DataType; -import java.io.IOException; +import org.apache.tools.ant.types.Resource; +import org.apache.tools.ant.types.ResourceCollection; + +import com.nokia.helium.metadata.MetaDataInput; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.LogFileDAO; /** * Abstract base class to provide common functionality for the log parsing. */ -public abstract class LogMetaDataInput extends DataType implements - MetaDataInput { - - private static Logger log = Logger.getLogger(LogMetaDataInput.class); - - private Vector fileSetList = new Vector(); - - private int currentFileIndex; +public abstract class LogMetaDataInput extends DataType implements MetaDataInput { - private boolean entryAddedForLog; - - private List fileList; - private Vector metadataFilterSets = new Vector(); - private Vector completeFilterList; - - private Iterator metadataInputIterator = new MetaDataInputIterator(); - - private List logEntries = new ArrayList(); - + private List resourceCollections = new ArrayList(); + private Task task; + private List metadataFilterSets = new ArrayList(); + private List completeFilterList; /** * Adds the fileset (list of input log files to be processed). * @param fileSet fileset to be added * */ - public void add(FileSet fileSet) { - fileSetList.add(fileSet); + public void add(ResourceCollection resourceCollection) { + resourceCollections.add(resourceCollection); } /** @@ -89,104 +78,14 @@ * Helper function to return all the filters associated with this metadata input * @return all the filters merged based on the order of definition. */ - private Vector getCompleteFilters() { - Vector allFilter = new Vector(); - for (MetaDataFilterSet filterSet : metadataFilterSets) { - allFilter.addAll(filterSet.getAllFilters()); - } - return allFilter; - } - - /** - * Updates the list of filelist from the input fileset. - * @param fileSetList input fileset list - * @return the matched files including the base dir. - */ - private List getFileListFromFileSet() { - fileList = new ArrayList(); - for (FileSet fs : fileSetList) { - DirectoryScanner ds = fs.getDirectoryScanner(getProject()); - String[] includedFiles = ds.getIncludedFiles(); - for ( String file : includedFiles ) { - fileList.add(new File(ds.getBasedir(), file)); - log.debug("includedfiles: " + file); + private synchronized List getMetaDataFilters() { + if (completeFilterList == null) { + completeFilterList = new ArrayList(); + for (MetaDataFilterSet filterSet : metadataFilterSets) { + completeFilterList.addAll(filterSet.getAllFilters()); } } - log.debug("fileList.size" + fileList.size()); - return fileList; - } - - /** - * Internal function to get the entry - * @return the top most entry in the list. - */ - private Metadata.LogEntry getEntry() throws IOException { - if (logEntries != null && logEntries.size() > 0) { - return logEntries.remove(0); - } else { - throw new IOException("No entries found"); - } - } - - /** - * Helper function to return the file list of the metadata input - * @return file list of this metadata input. - */ - protected List getFileList() { - return fileList; - } - - protected File getCurrentFile() { - List fileList = getFileList(); - return fileList.get(currentFileIndex); - } - - /** - * Function to check from the input stream if is there any entries available. Implemented by the sub classes. - * @return true if there are any entry available otherwise false. - */ - - boolean isEntryAvailable() { - int fileListSize = getFileList().size(); - while (currentFileIndex < fileListSize) { - boolean entryCreated = false; - File currentFile = getCurrentFile(); - entryCreated = isEntryCreated(currentFile); - if (entryCreated) { - if (!entryAddedForLog) { - entryAddedForLog = true; - } - return entryCreated; - } - if (!entryAddedForLog) { - // If no entry, then logfile is added to the database. - addEntry("default", "general", - getCurrentFile().toString(), -1, "", -1, null); - entryAddedForLog = true; - return true; - } - if (isAdditionalEntry()) { - return true; - } - currentFileIndex ++; - } - return false; - } - - /** - * Function to check from the input stream if is there any entries available. - * @param file for which the contents needs to be parsed for errors - * @return true if there are any entry available otherwise false. - */ - abstract boolean isEntryCreated(File currentFile); - - /** - * Function to check if is there any additional entry. This is being used for example during streaming - * recorded and at the end of streaming use the recorded data to add any additional entry. Used by - * @return true if there are any additional entries which are to be recorded in the database. - */ - protected boolean isAdditionalEntry() { - return false; + return completeFilterList; } /** @@ -194,177 +93,107 @@ * @param log text for which the severity needs to be identified. * @return the severity of the input text */ - protected String getSeverity(String logText) { - if (completeFilterList == null) { - completeFilterList = getCompleteFilters(); - } - for ( MetaDataFilter filter : completeFilterList) { + protected SeverityEnum.Severity getSeverity(String logText) { + for (MetaDataFilter filter : getMetaDataFilters()) { Pattern pattern = filter.getPattern(); if ((pattern.matcher(logText)).matches()) { - return filter.getPriority(); + return filter.getSeverity(); } } - return null; - } - - - /** - * Helper function to store the entry which will be added to the database - * @param priority for the entry - * @param component of the entry - * @param logpath of the entry - * @param lineNo of the entry - * @param log text message of the entry - */ - protected void addEntry(String priority, String component, String logPath, int lineNo, - String logText) { - addEntry(priority, component, logPath, lineNo, logText, -1, null); - } - - - /** - * Helper function to store the entry which will be added to the database - * @param priority for the entry - * @param component of the entry - * @param logpath of the entry - * @param lineNo of the entry - * @param log text message of the entry - * @param elapsedTime of the component - */ - protected void addEntry(String priority, String component, String logPath, int lineNo, - String logText, float elapsedTime, Metadata.WhatEntry whatEntry) { - //log.debug("adding entry to the list"); - File logPathFile = new File(logPath.trim()); - String baseDir = logPathFile.getParent(); - //Note: Always the query should be in "/" format only, compatible for both linux / windows - String uniqueLogPath = baseDir + "/" + logPathFile.getName(); - Metadata.LogEntry entry = new Metadata.LogEntry( - logText, priority, - component, uniqueLogPath, lineNo, elapsedTime, whatEntry); - logEntries.add(entry); - } - - /** - * Looks for the text which matches the filter regular expression and adds the entries to the database. - * @param logTextInfo text message to be searched with filter regular expressions - * @param priority for the entry - * @param currentComponent of the logtextInfo - * @param logpath fo;e fpr wjocj tje text info has to be looked for with filter expression - * @param lineNumber of the text message - */ - protected boolean findAndAddEntries(String logTextInfo, String currentComponent, - String logPath, int lineNumber) { - return findAndAddEntries(logTextInfo, currentComponent, logPath, lineNumber, null); + return SeverityEnum.Severity.NONE; } /** - * Looks for the text which matches the filter regular expression and adds the entries to the database. - * @param logTextInfo text message to be searched with filter regular expressions - * @param priority for the entry - * @param currentComponent of the logtextInfo - * @param logpath fo;e fpr wjocj tje text info has to be looked for with filter expression - * @param lineNumber of the text message - * @param stat object to capture statistics about the parsing. + * Logging through the Ant task */ - protected boolean findAndAddEntries(String logTextInfo, String currentComponent, - String logPath, int lineNumber, Statistics stat) { - boolean entryAdded = false; - String[] logText = logTextInfo.split("\n"); - String severity = null; - for (int i = 0; i < logText.length; i++) { - severity = getSeverity(logText[i]); - if (severity != null) { - addEntry(severity, currentComponent, logPath, - i + lineNumber, logText[i]); - if (stat != null) { - stat.incrementSeverity(severity); - } - entryAdded = true; - } - } - return entryAdded; + public void log(String message) { + log(message, Project.MSG_INFO); } /** - * Log text are processed based on iterator. When ever the entry is found the entry is returned - * and the function is called again for further entries. - * @return the iterator object for the metadata input. + * Logging through the Ant task */ - public Iterator iterator() { - return metadataInputIterator; + public void log(String message, int level) { + if (task != null) { + task.log(message, level); + } else { + getProject().log(message, level); + } } - /** - * Class to process the files as stream and add the entries todb + * Get the LogFile instance for the file log. + * @param entityManager the entityManager to do the query. + * @param file the log file locations + * @return the LogFile entry for the file log. */ - public class MetaDataInputIterator implements Iterator { - public boolean hasNext() { - if (fileList == null) { - fileList = getFileListFromFileSet(); - if (fileList.isEmpty()) { - throw new BuildException(" No input found."); + protected LogFile getLogFile(EntityManager entityManager, File file) { + // Creating the filename + LogFileDAO lfdao = new LogFileDAO(); + lfdao.setEntityManager(entityManager); + LogFile logFile = lfdao.findByLogName(file); + if (logFile == null) { + log("Creating a logfile entry.", Project.MSG_DEBUG); + logFile = new LogFile(); + logFile.setPath(file.getAbsolutePath()); + entityManager.getTransaction().begin(); + entityManager.persist(logFile); + entityManager.getTransaction().commit(); + } + return logFile; + } + + /** + * {@inheritDoc} + * Implements default behavior, for each log file the reference inside + * the database will first be removed, and then data will be collected. + */ + @SuppressWarnings("unchecked") + public void extract(Task task, EntityManagerFactory factory) + throws MetadataException { + this.task = task; + try { + for (ResourceCollection resourceCollection : resourceCollections) { + Iterator ri = (Iterator)resourceCollection.iterator(); + while (ri.hasNext()) { + File file = new File(ri.next().toString()); + remove(factory, file); + log("Extracting data from " + file); + extract(factory, file); } } - if (logEntries.size() > 0) { - return true; - } - boolean retValue = false; - retValue = isEntryAvailable(); - return retValue; - } - - /** - * Helper function to remove entries if any - */ - public void remove() { - } - - - /** - * Gets the next entry, which has been identified - * @return log entry to be added to the database. - */ - public Metadata.LogEntry next() { - Metadata.LogEntry entry = null; - try { - entry = getEntry(); - } catch (IOException ex) { - log.debug("Exception while getting entry: No entry available", ex); - } - return entry; + } finally { + this.task = null; } } /** - * This class capture statistics about the number of severity counted when - * parsing, the log. + * Removing a file log data from the database (if any). + * @param factory + * @param file + * @throws MetadataException */ - public class Statistics { - private Map statistics = new Hashtable(); - - /** - * Increment the severity counter by 1. - */ - public void incrementSeverity(String severity) { - severity = severity.toLowerCase(); - if (statistics.get(severity) == null) { - statistics.put(severity, new Integer(1)); - } else { - statistics.put(severity, new Integer(statistics.get(severity).intValue() + 1)); + public void remove(EntityManagerFactory factory, File file) throws MetadataException { + EntityManager entityManager = factory.createEntityManager(); + try { + LogFileDAO logFileDAO = new LogFileDAO(); + logFileDAO.setEntityManager(entityManager); + LogFile logFile = logFileDAO.findByLogName(file); + if (logFile != null) { + log("Removing log from database: " + file.getAbsolutePath()); + entityManager.getTransaction().begin(); + logFileDAO.remove(logFile); + entityManager.getTransaction().commit(); } - } - - /** - * Get the severity counter. - * @return the number of message with the mentioned severity. - */ - public int getSeveriry(String severity) { - severity = severity.toLowerCase(); - if (statistics.get(severity) == null) { - return 0; - } else { - return statistics.get(severity).intValue(); - } + } finally { + entityManager.close(); } } + + /** + * Extracting the data from + * @param factory + * @param file + * @throws MetadataException + */ + public abstract void extract(EntityManagerFactory factory, File file) throws MetadataException; } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilter.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilter.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilter.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,58 +18,71 @@ package com.nokia.helium.metadata.ant.types; +import java.util.ArrayList; +import java.util.Collection; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; + +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.DataType; -import org.apache.log4j.Logger; -import java.util.regex.Pattern; /** * This class provides filter input to the metadata task. *
    - * <metadatafilter priority="error" regex="" description="" />
    + * <metadatafilter severity="error" regex="" description="" />
      * 
    * @ant.task name="metadatafilter" category="Metadata" */ -public class MetaDataFilter extends DataType -{ +public class MetaDataFilter extends DataType implements MetaDataFilterCollection { - private Logger log = Logger.getLogger(MetaDataFilter.class); - - private String priority; + private SeverityEnum.Severity severity; private String regex; private String description; private Pattern pattern; /** - * Helper function called by ant to set the priority type - * @param priority type of priority for this input. + * Defines what is the severity level for this pattern + * @param severity type of severity for this input. */ - public void setPriority(String prty) throws Exception { - if (prty == null || prty.trim().length() == 0) { - throw new Exception(" Invalid Priority"); - } - priority = prty; + @Deprecated + public void setPriority(SeverityEnum severity) { + setSeverity(severity); } /** - * Helper function to return the priority type - * @return priority type + * Defines what is the severity level for this pattern + * @param severity type of severity for this input. */ - public String getPriority() { - return priority; + public void setSeverity(SeverityEnum severity) { + this.severity = severity.getSeverity(); + } + + /** + * Helper function to return the severity type + * @return severity type + * @ant.required + */ + public SeverityEnum.Severity getSeverity() { + return severity; } /** * Helper function called by ant to set the regex * @param regx regular expression of the filter + * @ant.required */ - public void setRegex(String regx) throws Exception { - if (regx == null || regx.trim().length() == 0) { - throw new Exception(" Invalid Regular expression"); + public void setRegex(String regex) { + if (regex == null || regex.trim().length() == 0) { + throw new BuildException("Invalid Regular expression: the regex attribute cannot be an empty string."); } - regex = regx; - createPattern(regx); + this.regex = regex; + try { + pattern = Pattern.compile(this.regex); + } catch (PatternSyntaxException ex) { + throw new BuildException("Invalid regular expression: " + ex.getMessage(), ex); + } } /** @@ -83,6 +96,7 @@ /** * Helper function called by ant to set the description type * @param desc description associated with filter. + * @ant.required */ public void setDescription(String desc) { description = desc; @@ -97,20 +111,25 @@ } /** - * Internal function to create the pattern - * @regex for which the pattern is created. - */ - private void createPattern(String regex) { - pattern = Pattern.compile(regex); - } - - /** * Helper function to return the pattern * @return the pattern of this filter. */ public Pattern getPattern() { return pattern; } + + /** + * {@inheritDoc} + */ + public Collection getAllFilters() { + Collection result = new ArrayList(); + if (this.isReference()) { + result.add((MetaDataFilter)this.getRefid().getReferencedObject()); + } else { + result.add(this); + } + return result; + } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilterCollection.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilterCollection.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.metadata.ant.types; + +import java.util.Collection; + +/** + * This interface describe what a Metadata filter + * Collection must implements as interface. + * + */ +public interface MetaDataFilterCollection { + + /** + * Get the nested filters. + * @return a Collection of metadatafilters objects. + */ + Collection getAllFilters(); +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilterSet.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilterSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/MetaDataFilterSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,14 +18,19 @@ package com.nokia.helium.metadata.ant.types; -import java.io.*; -import java.util.*; -import org.apache.tools.ant.types.Reference; -import org.apache.tools.ant.types.DataType; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.util.Collection; +import java.util.Vector; + import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; -import org.apache.log4j.Logger; +import org.apache.tools.ant.types.DataType; + import fmpp.models.CsvSequence; +import fmpp.util.StringUtil.ParseException; +import freemarker.template.TemplateModelException; import freemarker.template.TemplateSequenceModel; @@ -37,8 +42,8 @@ * * Example 2: * <metadatafilterset id="common"/> - * <metadatafilter priority="error" regex="^make(?:\[\d+\])?:\s+.*\s+not\s+remade" description="make error" /> - * <metadatafilter priority="error"regex="" description="" /> + * <metadatafilter severity="error" regex="^make(?:\[\d+\])?:\s+.*\s+not\s+remade" description="make error" /> + * <metadatafilter severity="error"regex="" description="" /> * <metadatafilterset/> * * Example 3: @@ -46,30 +51,24 @@ * * @ant.task name="metadatafilterset" category="Metadata" */ -public class MetaDataFilterSet extends DataType -{ - private Vector filters = new Vector(); +public class MetaDataFilterSet extends DataType implements MetaDataFilterCollection { + private Vector filterCollections = new Vector(); + private File filterFile; + private boolean initialized; - private Vector filterSets = new Vector(); - - private String filterFile; - - private Logger log = Logger.getLogger(MetaDataFilterSet.class); - /** * Helper function called by ant to set the FilterFile * @param FilterFile the csv file used by the filterset */ - public void setFilterFile(String file) throws Exception { + public void setFilterFile(File file) throws Exception { filterFile = file; - addCSVFromFile(file); } /** * Helper function called to get FilterFile. * @return filterfile used by this filterset */ - public String getFilterFile() { + public File getFilterFile() { return filterFile; } @@ -80,50 +79,57 @@ * the precedence is maintained. * @return All filters */ - public Vector getAllFilters() { - Vector allFilters = new Vector(); - //First look for filters associated with this set. - if (filters.size() > 0) { - allFilters.addAll(filters); + public Collection getAllFilters() { + // Shall we treat current object as a reference? + if (this.isReference()) { + if (filterFile != null) { + throw new BuildException("You cannot use the 'filterFile' in reference object."); + } + if (!filterCollections.isEmpty()) { + throw new BuildException("You cannot have nested filters when using a reference object."); + } + Object filterSetObject = this.getRefid().getReferencedObject(); + if (filterSetObject != null && filterSetObject instanceof MetaDataFilterCollection) { + Collection allFilters = ((MetaDataFilterCollection)filterSetObject).getAllFilters(); + checkInvalidFilters(allFilters); + return allFilters; + } else { + throw new BuildException("Filterset object is not instance of MetaDataFilterCollection"); + } + } else { + if (!initialized) { + if (filterFile != null) { + addDataFromCSVFile(); + } + initialized = true; + } + Collection allFilters = new Vector(); + // Add any nested filterCollection + for (MetaDataFilterCollection filterCollection : filterCollections) { + allFilters.addAll(filterCollection.getAllFilters()); + } + checkInvalidFilters(allFilters); return allFilters; } - // Then filters as reference in filterset - Reference refId = getRefid(); - Object filterSetObject = null; - if (refId != null) { - filterSetObject = refId.getReferencedObject(); - if (filterSetObject != null && filterSetObject instanceof MetaDataFilterSet) { - allFilters.addAll(((MetaDataFilterSet)filterSetObject).getAllFilters()); - return allFilters; - } - log.debug("Filterset object is not instance of MetaDataFilterSet"); - throw new BuildException("Filterset object is not instance of MetaDataFilterSet"); - } - // Add any nested filtersets - for (MetaDataFilterSet filterSet : filterSets) { - allFilters.addAll(filterSet.getAllFilters()); - } - - return removeInvalidFilters(allFilters); } /** * Helper function called to remove any invalid filters * @return only the valid filters */ - private Vector removeInvalidFilters(Vector filterList) { - ListIterator iter = filterList.listIterator(); - while (iter.hasNext()) { - MetaDataFilter filter = iter.next(); - String priority = filter.getPriority(); + private void checkInvalidFilters(Collection filterList) { + int count = 0; + for (MetaDataFilter filter : filterList) { + SeverityEnum.Severity severity = filter.getSeverity(); String regEx = filter.getRegex(); - if (priority == null || regEx == null) { - log("Warning: some filter is invalid removing it", Project.MSG_WARN); - iter.remove(); + if (severity == null || regEx == null) { + log("Invalid filter found at " + filter.getLocation().toString(), Project.MSG_ERR); + count++; } } - return filterList; - + if (count > 0) { + throw new BuildException("Invalid filter have been found. Please check your configuration."); + } } /** @@ -135,19 +141,6 @@ return filter; } - /** - * Helper function to add the created filter - * @param filter to be added to the filterset - */ - public void add(MetaDataFilter filter) { - MetaDataFilterSet filterSet = createMetaDataFilterSet(); - filterSet.getFilterList().add(filter); - } - - Vector getFilterList() { - return filters; - } - /** * Helper function called by ant to create the new filter */ @@ -161,9 +154,9 @@ * Helper function to add the created filter * @param filter to be added to the filterset */ - public void add(MetaDataFilterSet filterSet) { - if (filterSet != null) { - filterSets.add(filterSet); + public void add(MetaDataFilterCollection filterCollection) { + if (filterCollection != null) { + filterCollections.add(filterCollection); } } @@ -171,38 +164,35 @@ * Helper function to add the filters from the csv files * @param csv file path from which the filters needs to be added. */ - private void addCSVFromFile(String csvPath) throws Exception { + private void addDataFromCSVFile() { CsvSequence csvs = new CsvSequence(); csvs.setSeparator(','); - log.debug("filter file: " + filterFile); try { - csvs.load(new FileReader(new File(filterFile))); - } catch (java.io.FileNotFoundException fex) { - log.debug("Metadata CSV file not found:", fex); - throw fex; - } catch (fmpp.util.StringUtil.ParseException pex) { - log.debug("FMPP not able parse the Metadata CSV file. ", pex); - throw pex; + csvs.load(new FileReader(filterFile)); + int size = 0; + size = csvs.size(); + for (int i = 0; i < size; i++) { + TemplateSequenceModel model = (TemplateSequenceModel)csvs.get(i); + int modelSize = model.size(); + if (modelSize != 3 ) { + throw new BuildException("Metadata CSV file filter file format is invalid. It model must have 3 column, it currently has " + size); + } + MetaDataFilter filter = new MetaDataFilter(); + SeverityEnum severity = new SeverityEnum(); + severity.setValue(model.get(0).toString()); + filter.setSeverity(severity); + filter.setRegex(model.get(1).toString()); + filter.setDescription(model.get(2).toString()); + filterCollections.add(filter); + } + } catch (FileNotFoundException fex) { + throw new BuildException(fex.getMessage(), fex); + } catch (ParseException pex) { + throw new BuildException(pex.getMessage(), pex); } catch (java.io.IOException iex) { - log.debug("Metadata I/O Exception. " + iex.getMessage(), iex); - throw iex; - } - int size = 0; - log.debug("filter CSV record size: " + csvs.size()); - size = csvs.size(); - for (int i = 0; i < size; i++) { - TemplateSequenceModel model = (TemplateSequenceModel) csvs - .get(i); - int modelSize = model.size(); - if (modelSize != 3 ) { - log.debug("Metadata CSV file filter file format is invalid. It has row size " + size); - throw new Exception("Metadata CSV file filter file format is invalid. It has row size " + size); - } - MetaDataFilter filter = new MetaDataFilter(); - filter.setPriority(model.get(0).toString()); - filter.setRegex(model.get(1).toString()); - filter.setDescription(model.get(2).toString()); - filters.add(filter); + throw new BuildException(iex.getMessage(), iex); + } catch (TemplateModelException e) { + throw new BuildException(e.getMessage(), e); } } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/PolicyLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/PolicyLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/PolicyLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,11 +17,29 @@ package com.nokia.helium.metadata.ant.types; -import java.util.*; -import org.apache.log4j.Logger; -import javax.xml.stream.XMLStreamReader; +import java.io.File; +import java.io.IOException; +import java.util.Map; import java.util.regex.Pattern; +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import com.nokia.helium.metadata.AutoCommitEntityManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.MetadataEntry; +import com.nokia.helium.metadata.model.metadata.Severity; +import com.nokia.helium.metadata.model.metadata.SeverityDAO; + /** * This Type is to specify and use the policy logparsertype to @@ -40,93 +58,102 @@ * * @ant.task name="policymetadatainput" category="Metadata" */ -public class PolicyLogMetaDataInput extends XMLLogMetaDataInput { - - private Logger log = Logger.getLogger(XMLLogMetaDataInput.class); - - private Map currentAttributeMap; +public class PolicyLogMetaDataInput extends LogMetaDataInput { + /** + * {@inheritDoc} + */ + @Override + public void extract(EntityManagerFactory factory, File file) + throws MetadataException { + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + EntityManager em = factory.createEntityManager(); + AutoCommitEntityManager autoCommitEM = new AutoCommitEntityManager(factory); + try { + // get the severities + SeverityDAO pdao = new SeverityDAO(); + pdao.setEntityManager(em); + Map severities = pdao.getSeverities(); - /** - * Constructor - */ - public PolicyLogMetaDataInput() { + // Get the log file + LogFile logFile = getLogFile(em, file); + + SAXParser parser = saxFactory.newSAXParser(); + parser.parse(file, new PolicyFileParser( + severities.get(SeverityEnum.Severity.ERROR.toString()), + autoCommitEM, logFile)); + } catch (SAXException e) { + throw new MetadataException(e.getMessage(), e); + } catch (IOException e) { + throw new MetadataException(e.getMessage(), e); + } catch (ParserConfigurationException e) { + throw new MetadataException(e.getMessage(), e); + } finally { + em.close(); + autoCommitEM.close(); + } } - /** - * Helper function to return the attributes of the stream reader - * @returns the attributes as a map. + * SAX handler for Policy XML file format. + * */ - private Map getAttributes(XMLStreamReader streamReader) { - int count = streamReader.getAttributeCount() ; - if (count > 0 ) { - Map attributesMap = new HashMap(); - for (int i = 0 ; i < count ; i++) { - attributesMap.put(streamReader.getAttributeLocalName(i), - streamReader.getAttributeValue(i)); - } - return attributesMap; + class PolicyFileParser extends DefaultHandler { + private LogFile logFile; + private Severity severity; + private AutoCommitEntityManager autoCommitEM; + private Locator locator; + + /** + * Create a new PolicyFileParser. + * @param severity + * @param autoCommitEM + * @param logFile + */ + public PolicyFileParser(Severity severity, AutoCommitEntityManager autoCommitEM, + LogFile logFile) { + this.autoCommitEM = autoCommitEM; + this.logFile = logFile; + this.severity = severity; } - return null; - } - - - /** - * Function to process the start event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - boolean startElement(XMLStreamReader streamReader) { - String tagName = streamReader.getLocalName(); - if (tagName.equalsIgnoreCase("error")) { - currentAttributeMap = getAttributes(streamReader); - } - return false; - } - /** - * Function to process the end event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - boolean endElement(XMLStreamReader streamReader) { - boolean retValue = false; - String tagName = streamReader.getLocalName(); - String priority = "ERROR"; - log.debug("endElement: " + tagName); - if (tagName.equalsIgnoreCase("error")) { - log.debug("tagName matches error"); - String errorType = currentAttributeMap.get("type"); - log.debug("errorType:" + errorType); - if (errorType.equals("unknownstatus")) { - addEntry(priority, "CSV validation", getCurrentFile().toString(), -1, currentAttributeMap.get("message") + - currentAttributeMap.get("value")); - retValue = true; - } else if (errorType.equals("A") || errorType.equals("B") - || errorType.equals("C") || errorType.equals("D")) { - int flags = Pattern.CASE_INSENSITIVE | Pattern.DOTALL ; - Pattern pattern = Pattern.compile("([\\\\/][^\\\\/]+?)$", flags); - addEntry(priority, "Issues", getCurrentFile().toString(), -1, - errorType + "Found incorrect value for" + - pattern.matcher(currentAttributeMap.get("message")).replaceAll("")); - retValue = true; - } else if (errorType.equals("missing")) { - addEntry(priority, "Missing", getCurrentFile().toString(), -1, currentAttributeMap.get("message")); - retValue = true; - } else if (errorType.equals("invalidencoding")) { - addEntry(priority, "Incorrect policy files", getCurrentFile().toString(), -1, currentAttributeMap.get("message")); - retValue = true; + /** + * Implement the handling of error nodes. + */ + @Override + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + if (qName.equalsIgnoreCase("error")) { + String errorType = attributes.getValue("", "type"); + MetadataEntry me = new MetadataEntry(); + me.setLogFile(autoCommitEM.merge(logFile)); + me.setLineNumber(locator.getLineNumber()); + me.setSeverity(severity); + if (errorType.equals("unknownstatus")) { + me.setText(attributes.getValue("", "message") + attributes.getValue("", "value")); + } else if (errorType.equals("A") || errorType.equals("B") + || errorType.equals("C") || errorType.equals("D")) { + int flags = Pattern.CASE_INSENSITIVE | Pattern.DOTALL ; + Pattern pattern = Pattern.compile("([\\\\/][^\\\\/]+?)$", flags); + me.setText(pattern.matcher(errorType + "Found incorrect value for " + + attributes.getValue("", "message")).replaceAll("")); + } else if (errorType.equals("missing")) { + me.setText(attributes.getValue("", "message")); + } else if (errorType.equals("invalidencoding")) { + me.setText(attributes.getValue("", "message")); + } + autoCommitEM.persist(me); } } - return retValue; + + /** + * {@inheritDoc} + */ + @Override + public void setDocumentLocator(Locator locator) { + this.locator = locator; + super.setDocumentLocator(locator); + } } - /* Function to process the characters event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - boolean characters(XMLStreamReader streamReader) { - return false; - } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SBSLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SBSLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,784 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.metadata.ant.types; - -import java.io.*; -import java.util.*; -import java.util.regex.Pattern; -import java.util.regex.Matcher; -import org.apache.log4j.Logger; -import javax.xml.stream.XMLStreamReader; -import com.nokia.helium.jpa.entity.metadata.Metadata; -import com.nokia.helium.metadata.CustomMetaDataProvider; -import com.nokia.helium.metadata.db.ORMMetadataDB; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.events.XMLEvent; -import javax.xml.stream.FactoryConfigurationError; -import javax.xml.stream.XMLStreamException; - - -/** - * This Type is to specify and use the sbs logparsertype to - * parse and store the data based on xmlstreamreader. - *
    - * <hlm:metadatafilterset id="sbs.metadata.filter">
    - *    <metadatafilterset filterfile="common.csv" />
    - * </hlm:metadatafilterset>
    - * 
    - * <hlm:sbsmetadatainput >
    - *    <fileset dir="${project.dir}/../data/">
    - *        <include name="*compile.log"/>
    - *    </fileset>
    - *    <metadatafilterset refid="sbs.metadata.filter" />
    - * </hlm:sbsmetadatainput>
    - * 
    - * @ant.task name="sbsmetadatainput" category="Metadata" - */ -public class SBSLogMetaDataInput extends XMLLogMetaDataInput implements CustomMetaDataProvider { - - - private static final String DRIVE_LETTER_REGEX = "^(([a-zA-Z]):(\\\\|/))(.*)(/bld\\.inf)$"; - - private static final String FAILED_STATUS_MESSAGE = "ERROR: recipe exit status is failed."; - - private Logger logger = Logger.getLogger(SBSLogMetaDataInput.class); - - private String currentComponent; - - private float currentElapsedTime; - - private String logTextInfo = ""; - - private String recipeStatus = "ok"; - - private HashMap> generalTextEntries = new HashMap>(); - - private List members = new ArrayList(); - - private List specialRegexPatternList = new ArrayList(); - - private int lineNumber; - - private boolean inMainDataSection; - - private boolean inWhatLogSection; - - private boolean recordText; - - private HashMap componentTimeMap = new HashMap(); - - private Pattern buildTimeMatcher = Pattern.compile("^Run time\\s+(\\d+)\\s+seconds$"); - - private int buildTime; - - private File cleanLogFile; - - private boolean categorizationCompleted; - - private CategorizationHandler categorizationHandler; - - /** - * Constructor - */ - public SBSLogMetaDataInput() { - specialRegexPatternList.add(new SpecialRegex("(make.exe|make): \\*\\*\\* No rule to make target.*needed by `(.*)'.*", 2)); - specialRegexPatternList.add(new SpecialRegex("(make.exe|make): \\*\\*\\* \\[(.*)\\].*", 2)); - } - - - /** - * Removes the bld inf and the drive letter from the text - * @param text in which the bld.inf and drive letter to be removed - * @return updated string. - */ - static String removeDriveAndBldInf(String text) { - // Some light linux support - if (File.separatorChar == '/' && text.endsWith("/bld.inf")) { - int start = 0; if (text.startsWith("/")) { start = 1; - } - return text.substring(start, text.length() - 8); - } else { - Matcher matcher = (Pattern.compile(DRIVE_LETTER_REGEX)).matcher(text); - if (matcher.matches()) { - return matcher.group(4); - } - } - return text; - } - - /** - * Removes the bld inf and the drive letter from the text - * @param text in which the bld.inf and drive letter to be removed - * @return updated string. - */ - static String getComponent(XMLStreamReader streamReader) { - String currentComponent = getAttribute("bldinf", streamReader); - if ( currentComponent != null && currentComponent.equals("")) { - return null; - } - if (currentComponent != null ) { - currentComponent = removeDriveAndBldInf(currentComponent); - } - return currentComponent; - } - - /** - * Generic function to return the attribute value of an attribute from stream - * @param attribute for which the value from xml stream to be returned. - * @return the attribute value of an attribute. - */ - static String getAttribute(String attribute, XMLStreamReader streamReader) { - int count = streamReader.getAttributeCount() ; - for (int i = 0 ; i < count ; i++) { - if ( streamReader.getAttributeLocalName(i).equals(attribute) ) { - return streamReader.getAttributeValue(i); - } - } - return null; - } - - /** - * Helper function to set the clean log file. - * @param logFile which is the clean log file to process for additional categories - * @deprecated - */ - @Deprecated - public void setCleanLogFile(File logFile) { - log("The usage of the cleanLogFile is deprecated."); - } - - /** - * Helper function to set the clean log file. - * @param logFile which is the what log file to process for missing - * components - * @deprecated - */ - @Deprecated - public void setWhatLogFile(File logFile) { - log("The usage of the cleanLogFile is deprecated."); - } - - /** - * Function to process the characters event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - public boolean characters (XMLStreamReader streamReader) { - HashMap toProcess = new HashMap(); - if (recordText) { - logTextInfo += streamReader.getText(); - } else { - if (inMainDataSection) { - String cdataText = streamReader.getText().trim(); - String [] textList = cdataText.split("\n"); - int i = 0; - for (String text : textList) { - boolean added = false; - if (text.trim().equals("")) { - continue; - } - for (SpecialRegex specialRegex : specialRegexPatternList) { - Matcher matcher = specialRegex.getRegexPattern().matcher(text); - int groupPosition = specialRegex.getGroupPosition(); - List entryList = null; - if (matcher.matches()) { - if (cleanLogFile == null) { - cleanLogFile = new File(getCurrentFile().toString()); - } - String componentName = matcher.group(groupPosition).toLowerCase(); - CategoryEntry newEntry = new CategoryEntry(text, componentName , - "error", streamReader.getLocation().getLineNumber(), getCurrentFile().toString()); - entryList = generalTextEntries.get(componentName); - if (entryList == null) { - entryList = new ArrayList(); - generalTextEntries.put(componentName, entryList); - } - entryList.add(newEntry); - added = true; - break; - } - } - if (!added) { - toProcess.put(text.trim(), streamReader.getLocation().getLineNumber() + i); - } - i++; - } - boolean entryCreated = false; - //Check for any general errors. - for (String textString : toProcess.keySet()) { - boolean created = findAndAddEntries(textString, "general", - getCurrentFile().toString(), toProcess.get(textString)); - if (created && !entryCreated ) { - entryCreated = true; - } - } - } - } - return false; - } - - /** - * Function to process the start event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - public boolean startElement (XMLStreamReader streamReader) { - String tagName = streamReader.getLocalName(); - if (tagName.equalsIgnoreCase("buildlog")) { - logger.debug("starting with buildlog"); - inMainDataSection = true; - } - if (tagName.equalsIgnoreCase("recipe") ) { - lineNumber = streamReader.getLocation().getLineNumber(); - currentComponent = getComponent(streamReader); - recordText = true; - inMainDataSection = false; - recipeStatus = "ok"; - } if (tagName.equalsIgnoreCase("status") ) { - String exit = streamReader.getAttributeValue(null, "exit"); - recipeStatus = (exit != null) ? exit : "ok"; - } else if (tagName.equalsIgnoreCase("error") - || tagName.equalsIgnoreCase("warning")) { - lineNumber = streamReader.getLocation().getLineNumber(); - currentComponent = getComponent(streamReader); - recordText = true; - inMainDataSection = false; - } else if (tagName.equalsIgnoreCase("whatlog")) { - members.clear(); - currentComponent = getComponent(streamReader); - inMainDataSection = false; - inWhatLogSection = true; - } else if (inWhatLogSection && tagName.equals("export")) { - String text = SBSLogMetaDataInput.getAttribute("destination", streamReader); - if (text != null && text.trim().length() > 0) { - String member = SBSLogMetaDataInput.removeDriveAndBldInf(text); - boolean exists = (new File(text)).exists(); - Metadata.WhatLogMember entry = new Metadata.WhatLogMember(member, exists); - members.add(entry); - } - } else if (inWhatLogSection && !tagName.equals("export")) { - logTextInfo = ""; - recordText = true; - } else if (tagName.equalsIgnoreCase("time")) { - inMainDataSection = false; - currentElapsedTime = Float.valueOf(getAttribute("elapsed", streamReader)).floatValue(); - logger.debug("currentElapsedTime: " + currentElapsedTime); - if (currentComponent != null) { - TimeEntry timeObject = componentTimeMap.get(currentComponent); - logger.debug("currentComponent:" + currentComponent); - if (timeObject == null) { - timeObject = new TimeEntry(currentElapsedTime, getCurrentFile().toString()); - componentTimeMap.put(currentComponent, timeObject); - logger.debug("creating to new time object"); - } else { - timeObject.addElapsedTime(currentElapsedTime); - logger.debug("adding it to existing time object"); - } - } - } else if (tagName.equalsIgnoreCase("clean")) { - inMainDataSection = false; - } else if (tagName.equalsIgnoreCase("info")) { - inMainDataSection = false; - recordText = true; - } - return false; - } - - /** - * Checks whether is there any additional entry. During log parsing, all the text which are not part of any tag - * and are part of CDATA are recorded in a list and checked in this function for any matching errors and processed - * for their categorization. - * @return true if there are any element to be added to the database. - */ - public boolean isAdditionalEntry() { - if (!componentTimeMap.isEmpty()) { - Set componentSet = componentTimeMap.keySet(); - for (String component : componentSet) { - - TimeEntry entry = componentTimeMap.get(component); - addEntry("default", component, entry.getFilePath(), -1, - null, entry.getElapsedTime(), null); - componentTimeMap.remove(component); - return true; - } - } - if (!categorizationCompleted) { - if (cleanLogFile != null) { - if (categorizationHandler == null ) { - logger.debug("initializing categorization handler"); - categorizationHandler = - new CategorizationHandler(cleanLogFile, generalTextEntries); - } - } - if (categorizationHandler != null && categorizationHandler.hasNext()) { - try { - CategoryEntry entry = categorizationHandler.getNext(); - if (entry != null) { - addEntry(entry.getSeverity(), entry.getCategory(), entry.getLogFile(), - entry.getLineNumber(), entry.getText()); - return true; - } - } catch (XMLStreamException ex) { - logger.debug("Exception during categorization handler", ex); - return false; - } - } - categorizationCompleted = true; - } - return false; - } - - /** - * Function to process the end event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - public boolean endElement(XMLStreamReader streamReader) { - String tagName = streamReader.getLocalName(); - if (tagName.equalsIgnoreCase("recipe")) { - inMainDataSection = true; - recordText = false; - if (logTextInfo != null) { - if (currentComponent == null) { - currentComponent = "general"; - } - Statistics stat = new Statistics(); - boolean entryCreated = findAndAddEntries(logTextInfo, currentComponent, - getCurrentFile().toString(), lineNumber, stat); - if (stat.getSeveriry("error") == 0 && recipeStatus.equals("failed")) { - addEntry("error", currentComponent, getCurrentFile().toString(), - lineNumber, FAILED_STATUS_MESSAGE); - entryCreated = true; - } - logTextInfo = ""; - recipeStatus = "ok"; - return entryCreated; - } - } else if (tagName.equalsIgnoreCase("error") - || tagName.equalsIgnoreCase("warning")) { - inMainDataSection = true; - recordText = false; - if (currentComponent == null) { - currentComponent = "general"; - } - addEntry(tagName, currentComponent, getCurrentFile().toString(), lineNumber, - logTextInfo); - logTextInfo = ""; - return true; - } else if (tagName.equalsIgnoreCase("whatlog") ) { - inWhatLogSection = false; - inMainDataSection = true; - recordText = false; - logTextInfo = ""; - addEntry("default", currentComponent, getCurrentFile().toString(), - streamReader.getLocation().getLineNumber(), "what log info", -1, new Metadata.WhatEntry(currentComponent, members)); - return true; - } else if (inWhatLogSection && !tagName.equalsIgnoreCase("export") && !tagName.equalsIgnoreCase("whatlog")) { - if (logTextInfo.trim().length() > 0) { - String member = SBSLogMetaDataInput.removeDriveAndBldInf(logTextInfo.trim()); - boolean exists = (new File(logTextInfo.trim())).exists(); - Metadata.WhatLogMember entry = new Metadata.WhatLogMember(member, exists); - members.add(entry); - } - logTextInfo = ""; - recordText = false; - } else if (tagName.equalsIgnoreCase("clean")) { - inMainDataSection = true; - } else if (tagName.equalsIgnoreCase("info")) { - inMainDataSection = true; - recordText = false; - if (logTextInfo != null) { - Matcher matcher = buildTimeMatcher.matcher(logTextInfo); - if (matcher.matches()) { - buildTime = Integer.parseInt(matcher.group(1)); - logger.info("Run time: " + buildTime); - } - } - logTextInfo = ""; - } - return false; - } - - - @Override - public void provide(ORMMetadataDB db, String logPath) { - logger.debug("!!!!!!!!!!!!!!!!!!Logpath: " + logPath); - db.addExecutionTime(logPath, buildTime); - } -} - -class SpecialRegex { - private Pattern regexPattern; - private int groupPosition; - - public SpecialRegex(String exp, int pos) { - regexPattern = Pattern.compile(exp); - groupPosition = pos; - } - - public Pattern getRegexPattern() { - return regexPattern; - } - - public int getGroupPosition() { - return groupPosition; - } -} - - -/* This class stores the temporary Time entry which is being recorded for each data - * at the end of the build and during isAdditionalEntry function, the time for the component - * is updated in the database. - */ -class TimeEntry { - - private float elapsedTime; - private String filePath; - - /** - * Constructor to store the elapsedTime and the path which are to be updated to the database. - * @param elapsedTime: time duration of the component. - * @path of the component. - */ - public TimeEntry(float time, String path) { - elapsedTime = time; - filePath = path; - } - - - /** - * Helper function to add time to the previous elapsed time. - * @param time to be added to the elapsed timet. - */ - public void addElapsedTime(float time) { - elapsedTime += time; - } - - /** - * Helper function to return the elapsed time - * @return elapsed time of this time entry. - */ - public float getElapsedTime() { - return elapsedTime; - } - - /** - * Helper function to return the file path of this entry - * @return path of this time entry. - */ - public String getFilePath() { - return filePath; - } -} -/* This class stores the temporary category entry which is processed during - * at the end of the build and categorized and written to the database. - */ -class CategoryEntry { - - private String text; - private int lineNumber; - private String fileName; - private String severity; - private String category; - - - /** - * Constructor of the category entry - * @param txt - text message of the entry - * @param ctgry - category of the entry - * @param svrty - severity of this entry - * @param lnNo - line number of this entry - * @param flName - name of the file being processed. - * @return path of this time entry. - */ - public CategoryEntry(String txt, String ctgry, - String svrty, int lnNo, String flName) { - text = txt; - lineNumber = lnNo; - fileName = flName; - severity = svrty; - category = "general"; - if (ctgry != null) { - category = ctgry; - } - } - - /** - * Helper function to set the category - * @param set the category - */ - void setCategory(String ctgry) { - category = ctgry; - } - - /** - * Helper function to return the category - * @return the category of this entry. - */ - String getCategory() { - return category; - } - - /** - * Returns the logfile of this entry - * @return logfile of this entry - */ - String getLogFile() { - return fileName; - } - - /** - * Helper function returns the severity of this entry - * @return severity of this entry - */ - String getSeverity() { - return severity; - } - - /** - * Helper function returns the line number of this entry - * @return the line number of this entry. - */ - - int getLineNumber() { - return lineNumber; - } - - /** - * Helper function returns the text message of this entry - * @return text message of this entry - */ - String getText() { - return text; - } - -} -/* This class handles the categorization of scanlog errors based on the clean log output - * from raptor. - */ - class CategorizationHandler { - - private String currentComponent; - private boolean isInFileTag; - - private HashMap> categoryList; - - private List currentList; - - private XMLInputFactory xmlInputFactory; - - private XMLStreamReader xmlStreamReader; - - private Logger log = Logger.getLogger(CategorizationHandler.class); - - /** - * Constructor - * @param clean log file input using which the CDATA text are categorized - * @param list of entries to be categorized - */ - public CategorizationHandler(File cleanLogFile, HashMap> ctgMap) { - categoryList = ctgMap; - if (cleanLogFile != null ) { - try { - xmlInputFactory = XMLInputFactory.newInstance(); - xmlStreamReader = xmlInputFactory.createXMLStreamReader(cleanLogFile.toString(), - new BufferedInputStream(new FileInputStream(cleanLogFile))); - } catch ( XMLStreamException ex) { - log.debug("exception while initializing stax processor",ex); - } catch (FactoryConfigurationError er) { - log.debug("exception while creating xmlinput factory",er); - } catch (java.io.FileNotFoundException iex) { - log.debug("clean log file not found:" + cleanLogFile,iex); - } - } - } - - /** - * Checks whether is there any entry (by checking for categorization of the recorded CDATA text) - * @return true if there any entry that are being categorized. - */ - public boolean hasNext() { - boolean generalEntriesStatus = categoryList != null && !categoryList.isEmpty(); - boolean currentListStatus = currentList != null && ! currentList.isEmpty(); - return generalEntriesStatus || currentListStatus; - } - - /** - * Process the start element event of XML Stream from clean log. - * @param streamReader clean log xml stream reader to be processed - * @return true if there are any entry to be added. - */ - - public boolean startElement(XMLStreamReader streamReader) { - String tagName = streamReader.getLocalName(); - if (tagName.equals("clean")) { - currentComponent = getCategory(streamReader); - if (currentComponent != null) { - currentComponent = SBSLogMetaDataInput.removeDriveAndBldInf(currentComponent); - } - } - if (tagName.equals("file")) { - isInFileTag = true; - } - return false; - } - - /** - * Process the end element event of XML Stream from clean log. - * @param streamReader clean log xml stream reader to be processed - * @return true if there are any entry to be added. - */ - - public boolean endElement (XMLStreamReader streamReader) { - String tagName = streamReader.getLocalName(); - if (tagName.equals("file")) { - isInFileTag = false; - } - return false; - } - - /** - * Internal function to find bld inf from the component - * @param streamReader clean log xml stream reader to be processed - * @return the bld.inf attribute. - */ - private String getCategory(XMLStreamReader streamReader) { - int count = streamReader.getAttributeCount() ; - for (int i = 0 ; i < count ; i++) { - if ( streamReader.getAttributeLocalName(i).equals("bldinf") ) { - return streamReader.getAttributeValue(i); - } - } - return null; - } - - /** - * Internal function to find the CDATA text of the file attribute. - * @param streamReader clean log xml stream reader to be processed - * @return the CDATA text of tag. - */ - private String characters(XMLStreamReader xmlStreamReader) { - if (isInFileTag) { - return xmlStreamReader.getText().toLowerCase(); - } - return null; - } - - /** - * Gets the entry which matches the input path. For each line of tag attribute, the entry list - * is compared with that and if there is any match, then it returns the entry from the list, which - * is being mtached. - * @param path for which matching entry is looked for. - * @return entry which matched the path from the clean log file. - */ - private List getEntry(String path) { - Set categorySet = categoryList.keySet(); - for (String key : categorySet) { - if (path.toLowerCase().equals(key)) { - - List entry = categoryList.get(key); - categoryList.remove(key); - return entry; - } - } - return null; - } - - /** - * Internal function to update the category entries of the list. - * @param categoryList for which the category. - * @param category which is to be updated to the list. - */ - private void updateCategoryEntries(List categoryList, String category) { - for (CategoryEntry entry : categoryList) { - entry.setCategory(category); - } - } - - /** - * Gets the next entry from the stream based on categorization. - * @return the category entry which is identified as categorized entry. - */ - public CategoryEntry getNext() throws XMLStreamException { - try { - if (currentList != null && !currentList.isEmpty()) { - CategoryEntry entry = currentList.get(0); - currentList.remove(0); - return entry; - } - if (xmlStreamReader != null ) { - while (xmlStreamReader.hasNext()) { - int eventType = xmlStreamReader.next(); - switch (eventType) { - case XMLEvent.START_ELEMENT: - startElement(xmlStreamReader); - break; - case XMLEvent.END_ELEMENT: - endElement(xmlStreamReader); - break; - case XMLEvent.CHARACTERS: - String path = characters(xmlStreamReader); - if (path != null ) { - currentList = getEntry(path); - if (currentList != null && !currentList.isEmpty()) { - if (currentComponent != null) { - updateCategoryEntries(currentList, currentComponent); - CategoryEntry entry = (CategoryEntry)currentList.remove(0); - return entry; - } - } - } - break; - default: - break; - } - } - if (xmlStreamReader != null) { - close(); - } - } - Set categorySet = categoryList.keySet(); - for (String key : categorySet) { - currentList = categoryList.remove(key); - if (currentList != null && !currentList.isEmpty()) { - updateCategoryEntries(currentList, "general"); - CategoryEntry entry = (CategoryEntry)currentList.remove(0); - return entry; - } - } - } catch ( XMLStreamException ex) { - log.debug("exception in categorization",ex); - throw ex; - } - return null; - } - /** - * Internal function to close the clean log file stream - */ - private void close() { - try { - if (xmlStreamReader != null) { - xmlStreamReader.close(); - xmlStreamReader = null; - } - } catch (XMLStreamException ex) { - log.debug("exception while closing xml stream",ex); - } - - } -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SeverityEnum.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SeverityEnum.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.ant.types; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.types.EnumeratedAttribute; + +/** + * Defines an Ant enumerated type for the severity. + */ +public class SeverityEnum extends EnumeratedAttribute { + + /** + * Defines a list of enumerated severities. + */ + public enum Severity { + FATAL("FATAL"), ERROR("ERROR"), CRITICAL("CRITICAL"), WARNING("WARNING"), REMARK( + "REMARK"), INFO("INFO"), NONE("NONE"); + + private final String value; + + Severity(String value) { + this.value = value; + } + + public String toString() { + return this.value; + } + } + + private static String[] values; + + static { + // Let's support upper case and lower case string. + values = new String[Severity.values().length * 2]; + int i = 0; + for (Severity severity : Severity.values()) { + values[i++] = severity.toString(); + values[i++] = severity.toString().toLowerCase(); + } + } + + /** + * Get the list of supported severity types. + * @return List of supported severity types. + */ + @Override + public String[] getValues() { + return values; + } + + /** + * Get the severity as a Severity enum. + * @return The severity value. + */ + public Severity getSeverity() { + for (Severity severity : Severity.values()) { + if (severity.toString().equalsIgnoreCase(getValue())) { + return severity; + } + } + throw new BuildException("Invalid severity: " + getValue()); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SysdefMetaDataInput.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/SysdefMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.ant.types; + +import java.io.File; +import java.io.IOException; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.DataType; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import com.nokia.helium.metadata.MetaDataInput; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.SysdefCollection; +import com.nokia.helium.metadata.model.metadata.SysdefCollectionDAO; +import com.nokia.helium.metadata.model.metadata.SysdefComponent; +import com.nokia.helium.metadata.model.metadata.SysdefComponentDAO; +import com.nokia.helium.metadata.model.metadata.SysdefPackage; +import com.nokia.helium.metadata.model.metadata.SysdefPackageDAO; +import com.nokia.helium.metadata.model.metadata.SysdefUnit; +import com.nokia.helium.metadata.model.metadata.SysdefUnitDAO; + +/** + * The sysdefMetadataInput allows you to record a the current build + * model in the database. Packages, collection, component and units + * will be saved. + * + * @ant.type name="sysdefmetadatainput" category="Metadata" + */ +public class SysdefMetaDataInput extends DataType implements MetaDataInput { + private File file; + private File epocroot; + + @Override + public void extract(Task task, EntityManagerFactory factory) + throws MetadataException { + if (file == null) { + throw new MetadataException("file attribute is not defined."); + } + getEpocroot(); + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + SAXParser parser; + EntityManager entityManager = factory.createEntityManager(); + try { + task.log("Extracting data from " + file); + parser = saxFactory.newSAXParser(); + parser.parse(file, new SysdefParserHandler(entityManager)); + } catch (ParserConfigurationException e) { + throw new MetadataException(e.getMessage(), e); + } catch (SAXException e) { + throw new MetadataException(e.getMessage(), e); + } catch (IOException e) { + throw new MetadataException(e.getMessage(), e); + } finally { + entityManager.close(); + } + } + + /** + * Defines epocroot. + * @param epocroot + * @ant.not=required Default to EPOCROOT. + */ + public void setEpocroot(File epocroot) { + this.epocroot = epocroot; + } + + /** + * Get epocroot. + * @return a File object representing epocroot, or throw a BuildException + * if epocroot attribute and EPOCROOT environment variable + * are not defined. + */ + protected File getEpocroot() { + if (epocroot != null) { + return epocroot; + } else if (System.getenv("EPOCROOT") != null) { + return (new File(System.getenv("EPOCROOT") )).getAbsoluteFile(); + } + throw new BuildException("EPOCROOT environment variable or epocroot attribute is not defined."); + } + + /** + * Define the location of the system definition file. + * @param file + * @ant.required + */ + public void setFile(File file) { + this.file = file; + } + + /** + * Internal Handler to parse the sysdef file + * using the SAX interface. + * + */ + class SysdefParserHandler extends DefaultHandler { + + private static final String PACKAGE_TAG = "package"; + private static final String COLLECTION_TAG = "collection"; + private static final String COMPONENT_TAG = "component"; + private static final String UNIT_TAG = "unit"; + private static final String ID_ATTR = "id"; + private static final String NAME_ATTR = "name"; + private static final String BLDFILE_ATTR = "bldFile"; + private SysdefPackage currentPackage; + private SysdefCollection currentCollection; + private SysdefComponent currentComponent; + private EntityManager entityManager; + private SysdefPackageDAO packageDAO; + private SysdefCollectionDAO collectionDAO; + private SysdefComponentDAO componentDAO; + private SysdefUnitDAO unitDAO; + + public SysdefParserHandler(EntityManager entityManager) { + this.entityManager = entityManager; + packageDAO = new SysdefPackageDAO(); + packageDAO.setEntityManager(entityManager); + collectionDAO = new SysdefCollectionDAO(); + collectionDAO.setEntityManager(entityManager); + componentDAO = new SysdefComponentDAO(); + componentDAO.setEntityManager(entityManager); + unitDAO = new SysdefUnitDAO(); + unitDAO.setEntityManager(entityManager); + } + + /** + * {@inheritDoc} + */ + @Override + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + if (PACKAGE_TAG.equals(qName)) { + currentPackage = packageDAO.getPackageById(attributes.getValue(ID_ATTR)); + if (currentPackage == null) { + entityManager.getTransaction().begin(); + currentPackage = new SysdefPackage(); + currentPackage.setPackageId(attributes.getValue(ID_ATTR)); + currentPackage.setName(attributes.getValue(NAME_ATTR)); + entityManager.persist(currentPackage); + entityManager.getTransaction().commit(); + } + } else if (currentPackage != null && COLLECTION_TAG.equals(qName)) { + currentCollection = collectionDAO.getCollectionById(attributes.getValue(ID_ATTR)); + if (currentCollection == null) { + entityManager.getTransaction().begin(); + currentCollection = new SysdefCollection(); + currentCollection.setCollectionId(attributes.getValue(ID_ATTR)); + currentCollection.setName(attributes.getValue(NAME_ATTR)); + currentCollection.setSysdefPackage(currentPackage); + entityManager.persist(currentCollection); + entityManager.getTransaction().commit(); + } + } else if (currentCollection != null && COMPONENT_TAG.equals(qName)) { + currentComponent = componentDAO.getComponentById(attributes.getValue(ID_ATTR)); + if (currentComponent == null) { + entityManager.getTransaction().begin(); + currentComponent = new SysdefComponent(); + currentComponent.setComponentId(attributes.getValue(ID_ATTR)); + currentComponent.setName(attributes.getValue(NAME_ATTR)); + currentComponent.setSysdefCollection(currentCollection); + entityManager.persist(currentComponent); + entityManager.getTransaction().commit(); + } + } else if (currentComponent != null && UNIT_TAG.equals(qName) && attributes.getValue(BLDFILE_ATTR) != null) { + SysdefUnit unit = unitDAO.getUnitByLocation(getEpocroot(), new File(attributes.getValue(BLDFILE_ATTR))); + if (unit == null) { + entityManager.getTransaction().begin(); + unit = new SysdefUnit(); + // Location will be relative to epocroot. + unit.setLocation(getEpocroot().toURI().relativize((new File(attributes.getValue(BLDFILE_ATTR))).getAbsoluteFile().toURI()).getPath()); + unit.setSysdefComponent(currentComponent); + entityManager.persist(unit); + entityManager.getTransaction().commit(); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public void endElement(String uri, String localName, String qName) + throws SAXException { + super.endElement(uri, localName, qName); + if (PACKAGE_TAG.equals(qName)) { + currentPackage = null; + } else if (COLLECTION_TAG.equals(qName)) { + currentCollection = null; + } else if (COMPONENT_TAG.equals(qName)) { + currentComponent = null; + } + } + + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/TextLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/TextLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/TextLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,10 +17,22 @@ package com.nokia.helium.metadata.ant.types; -import java.io.*; -import java.util.*; -import org.apache.log4j.Logger; -import org.apache.tools.ant.BuildException; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.Map; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import com.nokia.helium.metadata.AutoCommitEntityManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.MetadataEntry; +import com.nokia.helium.metadata.model.metadata.Severity; +import com.nokia.helium.metadata.model.metadata.SeverityDAO; /** * This Type is to specify and use the text logparser type to parse and store the data. @@ -42,119 +54,52 @@ */ public class TextLogMetaDataInput extends LogMetaDataInput { - private Logger log = Logger.getLogger(TextLogMetaDataInput.class); - - private int lineNumber; - - private BufferedReader currentReader; - /** - * Constructor - */ - public TextLogMetaDataInput() { - - } - - /** - * Helper function to set the line number - * @param lineNo to be set for the entry - */ - protected void setLineNumber(int lineNo) { - lineNumber = lineNo; - } - - /** - * Helper function to return the line number of this entry. - * @return line number of the entry. + * {@inheritDoc} */ - protected int getLineNumber() { - return lineNumber; - } - - /** - * Helper function to set the reader of this stream - * @param reader to process the stream. - */ - protected void setCurrentReader(BufferedReader reader) { - currentReader = reader; - } + @Override + public void extract(EntityManagerFactory factory, File file) throws MetadataException { + EntityManager em = factory.createEntityManager(); + AutoCommitEntityManager autoCommitEM = new AutoCommitEntityManager(factory); + try { + // Get the severities + SeverityDAO severityDao = new SeverityDAO(); + severityDao.setEntityManager(em); + Map priorities = severityDao.getSeverities(); + + // Add a logfile entry into the database. + LogFile logFile = getLogFile(em, file); - /** - * Function to check if is there any additionaly entry. This is being used for example during streaming - * recorded and at the end of streaming use the recorded data to add any additional entry. Used by - * @return true if there are any additional entries which are to be recorded in the database. - */ - public boolean isAdditionalEntry() { - return false; - } - - /** - * Helper function to return the lbuffer reader for the current meta data input - * @return buffer reader object for the current metadata input. - */ - protected BufferedReader getCurrentReader() { - return currentReader; + // Start parsing + BufferedReader reader = new BufferedReader(new FileReader(file)); + String logText = null; + int lineNumber = 0; + while ((logText = reader.readLine()) != null) { + lineNumber++; + String line = logText.replaceFirst("^\\s*\\[.+?\\]\\s*", ""); + SeverityEnum.Severity severity = getSeverity(line); + if (severity != SeverityEnum.Severity.NONE) { + MetadataEntry entry = new MetadataEntry(); + entry.setLogFile(autoCommitEM.merge(logFile)); + entry.setLineNumber(lineNumber); + entry.setSeverity(autoCommitEM.merge(priorities.get(severity.toString()))); + entry.setText(line); + autoCommitEM.persist(entry); + } + } + reader.close(); + } catch (FileNotFoundException ex) { + throw new MetadataException(ex.getMessage(), ex); + } catch (IOException ex) { + throw new MetadataException(ex.getMessage(), ex); + } finally { + if (autoCommitEM != null) { + autoCommitEM.close(); + } + if (em != null) { + em.close(); + } + } } - public boolean isEntryCreated(File currentFile) { - String exceptions = ""; - try { - if (currentReader == null) { - lineNumber = 0; - log.debug("Current Text log file name:" + currentFile); - log.debug("Processing file: " + currentFile); - currentReader = new BufferedReader(new FileReader(currentFile)); - } - String logText = null; - while ((logText = currentReader.readLine()) != null) { - logText = logText.replaceFirst("^[ ]*\\[.+?\\][ ]*", ""); - String severity = getSeverity(logText); - if (severity != null) { - addEntry(severity, currentFile.getName(), currentFile.toString(), - lineNumber, logText ); - lineNumber ++; - return true; - } - } - currentReader.close(); - currentReader = null; - if (isAdditionalEntry()) { - return true; - } - } catch (FileNotFoundException ex) { - log.debug("FileNotFoundException in TextLogMetadata", ex); - try { - currentReader.close(); - currentReader = null; - } catch (IOException ex1) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in TextLogMetadata", ex1); - try { - currentReader.close(); - } catch ( IOException iex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in closing reader", iex); - } - currentReader = null; - exceptions = exceptions + ex.getMessage() + "\n"; - return false; - } - } catch (IOException ex) { - log.debug("Exception in TextLogMetadata", ex); - try { - currentReader.close(); - currentReader = null; - } catch (IOException ex1) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception in TextLogMetadata", ex1); - exceptions = exceptions + ex.getMessage() + "\n"; - return false; - } - } - if (!exceptions.equals("")) { - throw new BuildException(exceptions); - } - - return false; - } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/XMLLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/XMLLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.metadata.ant.types; - -import java.io.*; -import java.util.*; -import org.apache.log4j.Logger; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.events.XMLEvent; -import javax.xml.stream.XMLStreamException; -import org.apache.tools.ant.BuildException; - - -/** - * This Type abstract base class for all the types based on - * XML processing. - */ -abstract class XMLLogMetaDataInput extends LogMetaDataInput { - - private Logger log = Logger.getLogger(XMLLogMetaDataInput.class); - - private XMLInputFactory xmlInputFactory; - - private XMLStreamReader xmlStreamReader; - - private boolean inParsing; - - - /** - * Constructor - */ - public XMLLogMetaDataInput() { - inParsing = true; - xmlInputFactory = XMLInputFactory.newInstance(); - xmlInputFactory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES,Boolean.TRUE); - xmlInputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES,Boolean.FALSE); - xmlInputFactory.setProperty(XMLInputFactory.IS_COALESCING , Boolean.TRUE); - - } - - /** - * Closes the xml stream - */ - private void close() { - try { - if (xmlStreamReader != null) { - xmlStreamReader.close(); - xmlStreamReader = null; - } - } catch (XMLStreamException ex) { - // We are Ignoring the errors as no need to fail the build. - log.debug("Exception while closing xml stream", ex); - } - - } - - /** - * Function to check from the input stream if is there any entries available. - * @param file for which the contents needs to be parsed for errors - * @return true if there are any entry available otherwise false. - */ - boolean isEntryCreated(File currentFile) { - boolean entryCreated = false; - try { - if (inParsing ) { - if (xmlStreamReader == null) { - log.debug("Processing file: " + currentFile); - xmlStreamReader = xmlInputFactory.createXMLStreamReader( - currentFile.toString(), new BufferedInputStream(new FileInputStream(currentFile))); - } - int eventType = xmlStreamReader.getEventType(); - while (xmlStreamReader.hasNext()) { - eventType = xmlStreamReader.next(); - switch (eventType) { - case XMLEvent.START_ELEMENT: - entryCreated = startElement(xmlStreamReader); - break; - case XMLEvent.END_ELEMENT: - entryCreated = endElement(xmlStreamReader); - break; - case XMLEvent.CHARACTERS: - entryCreated = characters(xmlStreamReader); - break; - default: - break; - } - if ( entryCreated) { - return true; - } - } - if (xmlStreamReader != null) { - close(); - } - inParsing = false; - } - } catch (XMLStreamException ex) { - log.debug("XMLStreamException in isEntryCreated" + ex); - } catch (FileNotFoundException ex) { - log.debug("FileNotFoundException in isEntryCreated" + ex); - // CheckStyle:IllegalCatch OFF - } catch (RuntimeException ex) { //have to catch this otherwise it crashes other parts of the code - throw new BuildException("Failed during writing data to db: ", ex); - } - // CheckStyle:IllegalCatch ON - return false; - } - - - /** - * Function implemented by the subclasses to process the start event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - abstract boolean startElement(XMLStreamReader streamReader) ; - - /** - * Function implemented by the subclasses to process the end event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - abstract boolean endElement(XMLStreamReader streamReader); - - /** - * Function implemented by the subclasses to process the characters event of xml stream callback. - * @param streamReader: the input stream reader which contains the xml data to be parsed for recording data. - * @return true if there are any element to be added to the database. - */ - abstract boolean characters(XMLStreamReader streamReader); -} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/CategorizationHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/CategorizationHandler.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.ant.types.sbs; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import com.nokia.helium.metadata.ant.types.sbs.SBSLogHandler.UncategorizedItem; +import com.nokia.helium.metadata.ant.types.sbs.SBSLogHandler.UncategorizedItemMap; + +/** + * The CategorizationHandler will try to push general + * make errors (UncategorizedItem) to a particular component. + * + */ +public class CategorizationHandler extends DefaultHandler { + private SBSLogHandler logHandler; + private boolean record; + private StringBuffer text = new StringBuffer(); + private String currentComponent; + + /** + * Default constructor, it needs a SBSLogHandler. + * @param logHandler the calling SBSLogHandler + */ + public CategorizationHandler(SBSLogHandler logHandler) { + this.logHandler = logHandler; + } + + /** + * {@inheritDoc} + */ + @Override + public void endElement(String uri, String localName, String qName) { + if (qName.equalsIgnoreCase("clean") && currentComponent != null) { + record = false; + UncategorizedItemMap uncategorizedItemMap = this.logHandler.getUncategorizedItemMap(); + for (String line : text.toString().split("\n")) { + line = line.trim().replace("\"", ""); + if (line.length() > 0) { + if (uncategorizedItemMap.containsKey(line)) { + for (UncategorizedItem item : uncategorizedItemMap.get(line)) { + this.logHandler.getEventHandler().add(item.getPriotity(), currentComponent, item.getText(), item.getLineNumber()); + } + uncategorizedItemMap.remove(line); + } + } + } + currentComponent = null; + text.setLength(0); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + if (qName.equalsIgnoreCase("clean")) { + currentComponent = this.logHandler.getComponent(attributes); + record = true; + text.setLength(0); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void characters(char[] ch, int start, int length) + throws SAXException { + if (record) { + text.append(ch, start, length); + } + super.characters(ch, start, length); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/SBSLogEvents.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/SBSLogEvents.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.ant.types.sbs; + +import java.io.File; + +import com.nokia.helium.metadata.ant.types.SeverityEnum; + +/** + * Basic interface that an object should implement to get + * event from SBS log parsing. + * + */ +public interface SBSLogEvents { + + /** + * Component is found. + * @param component + */ + void declareComponent(String component); + + /** + * Analyzing text in component. + * @param text + */ + SeverityEnum.Severity check(String component, String text, int lineNumber); + + /** + * Analyzing text in general section + * @param text + */ + SeverityEnum.Severity check(String text, int lineNumber); + + /** + * Add a message with a known severity + * @param severity + * @param text + * @param lineNumber + */ + void add(SeverityEnum.Severity severity, String text, int lineNumber); + + /** + * + * @param severity + * @param component + * @param text + * @param lineNumber + */ + void add(SeverityEnum.Severity severity, String component, String text, int lineNumber); + + /** + * + * @param component + * @param location + * @param lineNumber + */ + void addWhatEntry(String component, String location, int lineNumber); + + /** + * Get the default component name, this is useful for global error. + * @return + */ + String getDefaultComponentName(); + + /** + * Get epocroot. This is used to compute the component name. + * @return epocroot. + */ + File getEpocroot(); + + /** + * Update the elapsed time for a component. + * @param currentComponent + * @param doubleValue + */ + void addElapsedTime(String component, double duration); +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/SBSLogHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/SBSLogHandler.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,400 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.ant.types.sbs; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; + +import com.nokia.helium.metadata.ant.types.SeverityEnum; + +/** + * This class implements the parsing of a SBS log file. + * Information will be pushed using an SBSLogEvents. + * + */ +public class SBSLogHandler extends DefaultHandler { + private static final int UNCATEGORIZED_MAP_LIMIT = 10000; + private static final String BLDINF_COMPONENT = "/bld.inf"; + private File file; + private SBSLogEvents eventHandler; + private boolean record; + private StringBuffer text = new StringBuffer(); + private Locator locator; + private String recipeStatus = "ok"; + private String currentComponent; + private boolean inWhatLog; + private long deep; + private StringBuffer mainSectionText = new StringBuffer(); + private List specialPatterns = new ArrayList(); + private UncategorizedItemMap uncategorizedItemMap = new UncategorizedItemMap(); + + + class SpecialPattern { + private Pattern regexPattern; + private int groupPosition; + + public SpecialPattern(String exp, int pos) { + regexPattern = Pattern.compile(exp); + groupPosition = pos; + } + + public Pattern getRegexPattern() { + return regexPattern; + } + + public int getGroupPosition() { + return groupPosition; + } + } + + class UncategorizedItemMap extends Hashtable> { + + private static final long serialVersionUID = 1L; + + public void put(String key, UncategorizedItem item) { + if (this.containsKey(key)) { + this.get(key).add(item); + } else { + this.put(key, new ArrayList()); + this.get(key).add(item); + } + } + } + + class UncategorizedItem { + private SeverityEnum.Severity priotity; + private String text; + private int lineNumber; + + public UncategorizedItem(String text, int lineNumber, SeverityEnum.Severity priotity) { + this.text = text; + this.lineNumber = lineNumber; + this.priotity = priotity; + } + + public SeverityEnum.Severity getPriotity() { + return priotity; + } + + public String getText() { + return text; + } + + public int getLineNumber() { + return lineNumber; + } + } + + /** + * Construct an SBSLogHandler, defining a SBSLogEvents object + * to receive parsing notifications. The file will be used + * by the categorization handler. + * + * @param event + * @param file + */ + public SBSLogHandler(SBSLogEvents event, File file) { + this.file = file; + this.eventHandler = event; + currentComponent = event.getDefaultComponentName(); + specialPatterns.add(new SpecialPattern("(make.exe|make): \\*\\*\\* No rule to make target.*needed by `(.*)'.*", 2)); + specialPatterns.add(new SpecialPattern("(make.exe|make): \\*\\*\\* \\[(.*)\\].*", 2)); + } + + /** + * This method will cleanup the path of a bld.inf to extract + * a component name. + * e.g: I:/root/layer/package/group/bld.inf + * will return root/layer/package/group + * + * @param text + * @return + */ + protected String removeDriveAndBldInf(String text) { + // Some light linux support + if (text.endsWith(BLDINF_COMPONENT)) { + text = text.substring(0, text.length() - BLDINF_COMPONENT.length()); + } + if (this.eventHandler.getEpocroot() == null) { + return text.replaceFirst("^([a-zA-Z]:)?/", ""); + } else { + text = this.eventHandler.getEpocroot().toURI().relativize((new File(text)).toURI()).getPath(); + if (text.endsWith("/")) { + text = text.substring(0, text.length() - 1); + } + return text; + } + } + + /** + * Get the component based on the Attributes list. + * If not found it will fallback to the default + * component name defined by the eventHandler. + * + * @param attributes XML tag SAX attributes list. + * @return a String representing the component name + */ + public String getComponent(Attributes attributes) { + String component = attributes.getValue("", "bldinf"); + if (component == null || component.length() == 0) { + return eventHandler.getDefaultComponentName(); + } + return removeDriveAndBldInf(component); + } + + /** + * {@inheritDoc} + */ + @Override + public void setDocumentLocator(Locator locator) { + this.locator = locator; + super.setDocumentLocator(locator); + } + + /** + * {@inheritDoc} + */ + @Override + public void endElement(String uri, String localName, String qName) + throws SAXException { + // one level deeper + deep--; + if (qName.equals("error") || qName.equals("warning") || qName.equals("info")) { + record = false; + String line = text.toString(); + if (!line.trim().equals("")) { + //log.info(qName + " - " + line); + eventHandler.add(SeverityEnum.Severity.valueOf(qName.toUpperCase()), text.toString(), locator.getLineNumber()); + } + } else if (qName.equals("recipe")) { + record = false; + int count = 0; + for (String line : text.toString().split("\n")) { + if (eventHandler.check(currentComponent, line, locator.getLineNumber()) == SeverityEnum.Severity.ERROR) { + count++; + } + } + if (count == 0 && recipeStatus.equalsIgnoreCase("failed")) { + eventHandler.add(SeverityEnum.Severity.ERROR, currentComponent, "ERROR: recipe exit status is failed.", locator.getLineNumber()); + } + recipeStatus = "ok"; + text.setLength(0); + } else if (qName.equalsIgnoreCase("whatlog") ) { + record = false; + for (String line : text.toString().split("\n")) { + line = line.trim().replace("\"", ""); + if (line.length() > 0) { + this.eventHandler.addWhatEntry(currentComponent, line, locator.getLineNumber()); + } + } + text.setLength(0); + inWhatLog = false; + } else if (inWhatLog && qName.equalsIgnoreCase("member")) { + String line = text.toString().trim().replace("\"", ""); + this.eventHandler.addWhatEntry(currentComponent, line, locator.getLineNumber()); + record = false; + text.setLength(0); + } else if (qName.equalsIgnoreCase("clean")) { + record = false; + for (String line : text.toString().split("\n")) { + line = line.trim().replace("\"", ""); + if (line.length() > 0) { + if (uncategorizedItemMap.containsKey(line)) { + for (UncategorizedItem item : uncategorizedItemMap.get(line)) { + this.eventHandler.add(item.getPriotity(), currentComponent, item.getText(), item.getLineNumber()); + } + uncategorizedItemMap.remove(line); + } + } + } + text.setLength(0); + } + if (deep == 1) { + mainSectionText.setLength(0); + } + super.endElement(uri, localName, qName); + } + + /** + * {@inheritDoc} + */ + @Override + public void fatalError(SAXParseException e) throws SAXException { + // Reporting an XML parsing error. + eventHandler.add(SeverityEnum.Severity.ERROR, e.getMessage(), e.getLineNumber()); + super.fatalError(e); + } + + /** + * {@inheritDoc} + */ + @Override + public void error(SAXParseException e) throws SAXException { + // Reporting an XML parsing error. + eventHandler.add(SeverityEnum.Severity.ERROR, e.getMessage(), e.getLineNumber()); + super.error(e); + } + + /** + * {@inheritDoc} + */ + @Override + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + // one level deeper + deep++; + if (deep == 2) { + for (String line : mainSectionText.toString().split("\n")) { + for (SpecialPattern sp : specialPatterns) { + Matcher matcher = sp.getRegexPattern().matcher(line); + if (matcher.matches()) { + uncategorizedItemMap.put(matcher.group(sp.getGroupPosition()), new UncategorizedItem(line, locator.getLineNumber(), SeverityEnum.Severity.ERROR)); + } + } + // record external log messages (such as from emake) + eventHandler.check(line, locator.getLineNumber()); + } + if (uncategorizedItemMap.size() > UNCATEGORIZED_MAP_LIMIT) { + emptyUncategorizedItemMap(); + } + mainSectionText.setLength(0); + } + if (qName.equalsIgnoreCase("buildlog")) { + mainSectionText.setLength(0); + } else if (qName.equals("error") || qName.equals("warning") || qName.equals("info")) { + record = true; + text.setLength(0); + } else if (qName.equals("recipe")) { + record = true; + text.setLength(0); + currentComponent = getComponent(attributes); + this.eventHandler.declareComponent(currentComponent); + } else if (qName.equalsIgnoreCase("time")) { + //currentComponent + String elapsed = attributes.getValue("", "elapsed"); + if (elapsed != null) { + try { + this.eventHandler.addElapsedTime(currentComponent, Double.valueOf(elapsed).doubleValue()); + } catch (NumberFormatException ex) { + ex = null; // ignoring the error. + } + } + //elapsedTime = Float.valueOf(getAttribute("elapsed", streamReader)).floatValue(); + } else if (qName.equalsIgnoreCase("status") ) { + String exit = attributes.getValue("", "exit"); + recipeStatus = (exit != null) ? exit : "ok"; + } else if (qName.equalsIgnoreCase("whatlog") ) { + record = true; + inWhatLog = true; + text.setLength(0); + currentComponent = getComponent(attributes); + this.eventHandler.declareComponent(currentComponent); + } else if (inWhatLog && qName.equalsIgnoreCase("export")) { + String filename = attributes.getValue("", "destination"); + eventHandler.addWhatEntry(currentComponent, filename, locator.getLineNumber()); + } else if (inWhatLog && qName.equalsIgnoreCase("member")) { + record = true; + text.setLength(0); + } else if (qName.equalsIgnoreCase("clean")) { + record = true; + currentComponent = getComponent(attributes); + this.eventHandler.declareComponent(currentComponent); + text.setLength(0); + } + super.startElement(uri, localName, qName, attributes); + } + + /** + * {@inheritDoc} + */ + @Override + public void characters(char[] ch, int start, int length) + throws SAXException { + if (record) { + text.append(ch, start, length); + } + if (deep == 1) { + mainSectionText.append(ch, start, length); + } + super.characters(ch, start, length); + } + + + private void emptyUncategorizedItemMap() throws SAXException { + if (uncategorizedItemMap.size() > 0) { + try { + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + SAXParser parser = saxFactory.newSAXParser(); + parser.parse(file, new CategorizationHandler(this)); + } catch (ParserConfigurationException e) { + throw new SAXException(e.getMessage(), e); + } catch (IOException e) { + throw new SAXException(e.getMessage(), e); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public void endDocument() throws SAXException { + // Remaining changes + + // Let's try categorization handler first + emptyUncategorizedItemMap(); + + // Last resorts + for (String key : uncategorizedItemMap.keySet()) { + for (UncategorizedItem item : uncategorizedItemMap.get(key)) { + this.eventHandler.add(item.getPriotity(), this.eventHandler.getDefaultComponentName(), item.getText(), item.getLineNumber()); + } + } + super.endDocument(); + } + + /** + * Get the EventHandler. + * @return + */ + public SBSLogEvents getEventHandler() { + return eventHandler; + } + + /** + * Get the uncategorized items map. + * @return a map of uncategorized items. + */ + public UncategorizedItemMap getUncategorizedItemMap() { + return uncategorizedItemMap; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/SBSLogMetaDataInput.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/ant/types/sbs/SBSLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.metadata.ant.types.sbs; + +import java.io.File; +import java.io.IOException; +import java.util.Hashtable; +import java.util.Map; +import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.SAXException; + +import com.nokia.helium.metadata.AutoCommitEntityManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.ant.types.AbstractComponentBaseMetadataInput; +import com.nokia.helium.metadata.ant.types.SeverityEnum; +import com.nokia.helium.metadata.model.metadata.Component; +import com.nokia.helium.metadata.model.metadata.ComponentTime; +import com.nokia.helium.metadata.model.metadata.ExecutionTime; +import com.nokia.helium.metadata.model.metadata.LogFile; +import com.nokia.helium.metadata.model.metadata.MetadataEntry; +import com.nokia.helium.metadata.model.metadata.Severity; +import com.nokia.helium.metadata.model.metadata.SeverityDAO; +import com.nokia.helium.metadata.model.metadata.SysdefUnitDAO; +import com.nokia.helium.metadata.model.metadata.WhatLogEntry; + + +/** + * This metadata input will parse SBSv2 log and collect + * data into the database. + *
    + * 
    + * <hlm:sbsmetadatainput >
    + *    <fileset dir="${project.dir}/../data/">
    + *        <include name="*_compile.log"/>
    + *    </fileset>
    + *    <hlm:metadatafilterset id="sbs.metadata.filter">
    + *       <metadatafilterset filterfile="common.csv" />
    + *    </hlm:metadatafilterset>
    + * </hlm:sbsmetadatainput>
    + * 
    + * + * @ant.task name="sbsmetadatainput" category="Metadata" + */ +public class SBSLogMetaDataInput extends AbstractComponentBaseMetadataInput implements SBSLogEvents { + private static final String DEFAULT_COMPONENT_NAME = "general"; + private EntityManager entityManager; + private AutoCommitEntityManager autoCommitEM; + private LogFile logFile; + private File epocroot; + private SysdefUnitDAO unitDAO; + private boolean checkMissing = true; + + private Map priorities; + private Pattern buildTimeMatcher = Pattern.compile("^Run time\\s+(\\d+)\\s+seconds$"); + private boolean failOnInvalidXml = true; + private Map componentTimes = new Hashtable(); + + /** + * Defines if XML format error should be fatal, or treated as build error. + * @param failOnXmlError + */ + public void setFailOnInvalidXml(boolean failOnInvalidXml) { + this.failOnInvalidXml = failOnInvalidXml; + } + + + /** + * Defines epocroot. + * @param epocroot + * @ant.not-required Default to EPOCROOT. + */ + public void setEpocroot(File epocroot) { + this.epocroot = epocroot; + } + + /** + * Get epocroot. + * @return a File object representing epocroot, or throw a BuildException + * if epocroot attribute and EPOCROOT environment variable + * are not defined. + */ + public File getEpocroot() { + return epocroot; + } + + /** + * {@inheritDoc} + */ + @Override + public void extract(EntityManagerFactory factory, File file) + throws MetadataException { + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + entityManager = factory.createEntityManager(); + autoCommitEM = new AutoCommitEntityManager(factory); + unitDAO = new SysdefUnitDAO(); + unitDAO.setEntityManager(this.getEntityManager()); + try { + logFile = getLogFile(entityManager, file); + + SeverityDAO pdao = new SeverityDAO(); + pdao.setEntityManager(entityManager); + priorities = pdao.getSeverities(); + + // always create the default component and associated time. + this.getDefaultComponent(logFile); + this.addElapsedTime(this.getDefaultComponentName(), 0.0); + + SAXParser parser = saxFactory.newSAXParser(); + parser.parse(file, new SBSLogHandler(this, file)); + + // Pushing component times into the database. + entityManager.getTransaction().begin(); + for (Entry entry : componentTimes.entrySet()) { + ComponentTime ct = entry.getValue(); + ct.setComponent(entityManager.merge(getComponent(entry.getKey(), logFile))); + entityManager.persist(ct); + } + entityManager.getTransaction().commit(); + } catch (SAXException e) { + if (failOnInvalidXml) { + throw new MetadataException(e.getMessage(), e); + } + } catch (IOException e) { + throw new MetadataException(e.getMessage(), e); + } catch (ParserConfigurationException e) { + throw new MetadataException(e.getMessage(), e); + } finally { + logFile = null; + autoCommitEM.close(); + autoCommitEM = null; + entityManager.close(); + entityManager = null; + unitDAO = null; + priorities = null; + clear(); + componentTimes.clear(); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected EntityManager getEntityManager() { + return entityManager; + } + + /** + * {@inheritDoc} + */ + @Override + public void add(SeverityEnum.Severity severity, + String text, int lineNumber) { + add(severity, this.getDefaultComponentName(), text, lineNumber); + + // Searching for build time. + Matcher matcher = buildTimeMatcher.matcher(text); + if (matcher.matches()) { + ExecutionTime entry = new ExecutionTime(); + entry.setLogFile(autoCommitEM.merge(logFile)); + entry.setTime(new Integer(matcher.group(1)).intValue()); + autoCommitEM.persist(entry); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void add(SeverityEnum.Severity severity, + String component, String text, int lineNumber) { + if (severity != SeverityEnum.Severity.INFO) { + MetadataEntry entry = new MetadataEntry(); + entry.setComponent(autoCommitEM.merge(getComponent(component, logFile))); + entry.setLineNumber(lineNumber); + entry.setText(text); + entry.setLogFile(logFile); + entry.setSeverity(priorities.get(severity.toString())); + autoCommitEM.persist(entry); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void addWhatEntry(String component, String location, int lineNumber) { + boolean fileExists = (new File(location)).exists(); + WhatLogEntry entry = new WhatLogEntry(); + entry.setComponent(autoCommitEM.merge(getComponent(component, logFile))); + entry.setMember(location); + entry.setMissing(!fileExists); + autoCommitEM.persist(entry); + if (checkMissing && !fileExists) { + MetadataEntry mentry = new MetadataEntry(); + mentry.setComponent(autoCommitEM.merge(getComponent(component, logFile))); + mentry.setLineNumber(lineNumber); + mentry.setText("Missing: " + location); + mentry.setLogFile(logFile); + mentry.setSeverity(priorities.get(SeverityEnum.Severity.ERROR.toString())); + autoCommitEM.persist(mentry); + } + } + + /** + * {@inheritDoc} + */ + @Override + public SeverityEnum.Severity check(String text, int lineNumber) { + check(getDefaultComponentName(), text, lineNumber); + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public SeverityEnum.Severity check( + String component, String text, int lineNumber) { + SeverityEnum.Severity severity = this.getSeverity(text); + if (severity != SeverityEnum.Severity.NONE) { + MetadataEntry entry = new MetadataEntry(); + entry.setComponent(autoCommitEM.merge(getComponent(component, logFile))); + entry.setLineNumber(lineNumber); + entry.setText(text); + entry.setLogFile(logFile); + entry.setSeverity(priorities.get(severity.toString())); + autoCommitEM.persist(entry); + } + return severity; + } + + /** + * {@inheritDoc} + */ + @Override + public void declareComponent(String component) { + getComponent(component, logFile); + } + + /** + * Define if we need to treat add error entries + * for missing files. + * @param checkMissing + */ + public void setCheckMissing(boolean checkMissing) { + this.checkMissing = checkMissing; + } + + /** + * {@inheritDoc} + */ + @Override + public String getDefaultComponentName() { + return DEFAULT_COMPONENT_NAME; + } + + /** + * {@inheritDoc} + */ + @Override + protected Component createComponent(String name, LogFile logFile) { + Component component = new Component(); + component.setComponent(name); + component.setLogFile(logFile); + component.setSysdefUnit(unitDAO.getUnitByLocation(name)); + getEntityManager().getTransaction().begin(); + getEntityManager().persist(component); + getEntityManager().getTransaction().commit(); + return component; + } + + + @Override + public void addElapsedTime(String name, double duration) { + if (!componentTimes.containsKey(name)) { + ComponentTime ct = new ComponentTime(); + componentTimes.put(name, ct); + } + ComponentTime ct = componentTimes.get(name); + ct.setDuration(ct.getDuration() + duration); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/db/ORMMetadataDB.java --- a/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/db/ORMMetadataDB.java Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -package com.nokia.helium.metadata.db; - - -import com.nokia.helium.jpa.entity.metadata.MetadataUtil; -import java.io.File; -import org.apache.log4j.Logger; -import com.nokia.helium.jpa.entity.metadata.Metadata; - -/** - * Database class to write the contents to the database. - */ -public class ORMMetadataDB { - - private static Logger log = Logger.getLogger(ORMMetadataDB.class); - - private String dbPath; - - public ORMMetadataDB(String databasePath) { - log.debug("initializing ORMMetadataDB: dbPath: " + databasePath); - // Lower case the filename because of SMB share. - File actualPath = new File(databasePath); - String fileName = actualPath.getName(); - dbPath = new File(actualPath.getParent(), fileName.toLowerCase()).getPath(); - MetadataUtil.initializeORM(dbPath); - } - - public void addLogEntry(Metadata.LogEntry entry) { - MetadataUtil.addEntry(dbPath, entry); - } - - /** - * Add an execution time record to the database for current log. - * @param time - */ - public void addExecutionTime(String logPath, int time) { - MetadataUtil.addEntry(dbPath, logPath, time); - } - - public void removeEntries(String logPath) { - MetadataUtil.removeEntries(dbPath, logPath); - } - - public void finalizeMetadata(String logPath) { - MetadataUtil.finalizeMetadata(dbPath, logPath); - } - - public void finalizeDB() { - MetadataUtil.finalizeORM(dbPath); - } - -} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMObjectModel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMObjectModel.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.fmpp; + +import freemarker.ext.beans.BeanModel; +import freemarker.ext.beans.BeansWrapper; + +class ORMObjectModel extends BeanModel { + public ORMObjectModel(Object obj) { + super(obj, new BeansWrapper()); + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMQueryModeModel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMQueryModeModel.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.fmpp; + +import java.io.File; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import org.apache.log4j.Logger; + + +import com.nokia.helium.metadata.FactoryManager; +import com.nokia.helium.metadata.MetadataException; + +import fmpp.Engine; +import fmpp.ProgressListener; +import freemarker.template.TemplateHashModel; + +/** + * QueryModel (which supports hash, sequence, containers) + * arg0: database location + * + */ +public class ORMQueryModeModel implements TemplateHashModel, ProgressListener { + + private static Logger log = Logger.getLogger(ORMQueryModeModel.class); + private EntityManagerFactory factory; + private EntityManager entityManager; + + public ORMQueryModeModel(File file) throws MetadataException { + this.factory = FactoryManager.getFactoryManager().getEntityManagerFactory(file); + this.entityManager = factory.createEntityManager(); + } + + /** + * Gets the template model for the corresponding query + * @param query for which the model is returned. + * @return returns the template model for the query + */ + public TemplateHashModel get(String mode) { + String retType = null; + String actualMode = mode; + if (mode.startsWith("native")) { + String [] splitString = mode.split(":"); + if (splitString.length == 2 ) { + actualMode = splitString[0]; + retType = splitString[1]; + } + } + + return new QueryTemplateModel(entityManager, actualMode, retType); + } + + /** + * {@inheritDoc} + */ + public boolean isEmpty() { + return false; + } + + /** + * {@inheritDoc} + */ + public void notifyProgressEvent(Engine engine, int event, File src, + int pMode, Throwable error, Object param) throws Exception { + log.debug("notifyProgressEvent - event: " + event); + if (event == ProgressListener.EVENT_END_PROCESSING_SESSION) { + log.debug("notifyProgressEvent - closing the factory."); + this.entityManager.close(); + this.factory.close(); + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMQueryModel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMQueryModel.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.fmpp; + +import javax.persistence.EntityManager; + +import freemarker.template.TemplateCollectionModel; +import freemarker.template.TemplateModelIterator; + +class ORMQueryModel implements TemplateCollectionModel { + + private String queryType; + private String queryString; + private String returnType; + private EntityManager entityManager; + + public ORMQueryModel(EntityManager entityManager, String queryString, + String type, String retType) { + this.entityManager = entityManager; + queryType = type; + this.queryString = queryString; + returnType = retType; + } + + /* + * Provides data via collection interface. + * + * @return the iterator model from which the data is accessed. + */ + public TemplateModelIterator iterator() { + return new ORMTemplateModelIterator(entityManager, queryString, + queryType, returnType); + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMSequenceModel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMSequenceModel.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.fmpp; + +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.Query; + +import org.apache.log4j.Logger; + +import freemarker.template.SimpleNumber; +import freemarker.template.SimpleScalar; +import freemarker.template.TemplateModel; +import freemarker.template.TemplateSequenceModel; + +class ORMSequenceModel implements TemplateSequenceModel { + public static final int PAGE_SIZE = 750; + private static Logger log = Logger.getLogger(ORMSequenceModel.class); + private Query query; + private int currentPage; + private List data; + private int size; + private EntityManager entityManager; + private String queryString; + + @SuppressWarnings("unchecked") + public ORMSequenceModel(EntityManager entityManager, String queryString) { + log.debug("ORMSequenceModel: " + queryString); + this.queryString = queryString; + this.entityManager = entityManager; + // Caching the full size + int page = 0; + do { + query = entityManager.createQuery(queryString); + query.setFirstResult(PAGE_SIZE * page); + query.setMaxResults(PAGE_SIZE); + data = query.getResultList(); + // incrementing the size and page. + size += data.size(); + page++; + } while (data.size() == PAGE_SIZE); + + // First query + currentPage = 0; + query = entityManager.createQuery(queryString); + query.setFirstResult(currentPage); + query.setMaxResults(PAGE_SIZE); + data = query.getResultList(); + } + + /** + * {@inheritDoc} + */ + public int size() { + return size; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public synchronized TemplateModel get(int index) { + // Calculating the requested page + int page = index / PAGE_SIZE; + // Shall we load a new page + if (page != currentPage) { + query = entityManager.createQuery(queryString); + query.setFirstResult(page * PAGE_SIZE); + query.setMaxResults(PAGE_SIZE); + data = query.getResultList(); + currentPage = page; + if (data.size() == 0) { + return null; + } + } + // Are we out of bound. + if (data.size() <= index % PAGE_SIZE) { + return null; + } + // Let's get the object. + Object obj = data.get(index % PAGE_SIZE); + if (obj instanceof String) { + return new SimpleScalar((String)obj); + } else if (obj instanceof Number) { + return new SimpleNumber((Number)obj); + } else if (obj == null) { + return null; + } else { + return new ORMObjectModel(obj); + } + } + +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMTemplateModelIterator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/ORMTemplateModelIterator.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.fmpp; + +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.Query; + +import freemarker.template.SimpleScalar; +import freemarker.template.TemplateModel; +import freemarker.template.TemplateModelIterator; + +/** + * Internal Iterator class which provides data as collection. + */ +class ORMTemplateModelIterator implements TemplateModelIterator { + + private static final int PAGE_SIZE = 2000; + private String queryString; + private Query query; + private int index; + private String returnType; + private boolean nativeQuery; + private EntityManager entityManager; + private List data; + private int currentPage; + private Object next; + + public ORMTemplateModelIterator(EntityManager entityManager, String queryString, String type, String retType) { + this.entityManager = entityManager; + this.queryString = queryString; + returnType = retType; + if (type.startsWith("native")) { + nativeQuery = true; + } + index = 0; + } + + /** + * {@inheritDoc} + */ + public TemplateModel next() { + Object value = next; + next = null; + if (value != null) { + if (nativeQuery && returnType.equals("java.lang.String")) { + return new SimpleScalar((String)value); + } else { + return new ORMObjectModel(value); + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public boolean hasNext() { + int page = index / PAGE_SIZE; + if (query == null || page != currentPage) { + if (nativeQuery) { + query = entityManager.createNativeQuery(queryString); + } else { + query = entityManager.createQuery(queryString); + } + query.setFirstResult(page * PAGE_SIZE); + query.setMaxResults(PAGE_SIZE); + data = query.getResultList(); + currentPage = page; + } + if (next == null && index < data.size()) { + next = data.get(index); + index++; + } + return next != null; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/QueryTemplateModel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/fmpp/QueryTemplateModel.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.fmpp; + +import javax.persistence.EntityManager; + +import freemarker.template.TemplateHashModel; +import freemarker.template.TemplateModel; + +/** + * Internal class to handle the sql query and returns the data in either + * hash or sequence or containers. + */ +class QueryTemplateModel implements TemplateHashModel { + + private EntityManager entityManager; + + private String queryMode; + + private String returnType; + + private TemplateModel resultObject; + + public QueryTemplateModel(EntityManager entityManager, String mode, String retType) { + this.entityManager = entityManager; + queryMode = mode; + returnType = retType; + } + + public TemplateModel get(String query) { + if (queryMode.equals("jpasingle")) { + resultObject = new ORMSequenceModel(entityManager, query); + } else { + resultObject = new ORMQueryModel(entityManager, query, queryMode, returnType); + } + return resultObject; + } + + public boolean isEmpty() { + return false; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/Version.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/Version.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,79 @@ + +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model; + +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + + + +/** + * Entity Version to store the db version. + */ +@Entity +public class Version { + + public static final transient int DB_VERSION = 5; + + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "VERSION_ID") + private int id; + + //DB_VERSION to set as default if version changes + @Basic + @Column(unique = true, nullable = false) + private int version = DB_VERSION; + + /** + * Helper function to set the identifier for the log file. + * @param identifier for the log file. + */ + public void setId(int identifier) { + id = identifier; + } + + /** + * Helper function to get the identifier for the db schema version. + * @return identifier for this log file. + */ + public int getId() { + return id; + } + + /** + * Helper function to set the db schema version. + * @param location of the log file. + */ + public void setVersion(int ver) { + version = ver; + } + + /** + * Helper function to return the current db schema version. + * @return path of the log file.. + */ + public int getVersion() { + return version; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/Component.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/Component.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.metadata.model.metadata; + + +import java.util.List; + +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; + + +/** + * Entity class to store the component information. + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class Component { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "COMPONENT_ID") + private int id; + + @Basic + @Column(nullable = false, length = 500) + private String component; + + @Basic + @Column(name = "LOGFILE_ID", insertable = false, updatable = false) + private int logFileId; + + @Basic + @Column(name = "UNIT_ID", insertable = false, updatable = false) + private int unitId; + + @ManyToOne(cascade = CascadeType.REMOVE) + @JoinColumn(name = "LOGFILE_ID", referencedColumnName = "LOGFILE_ID") + private LogFile logFile; + + @OneToMany(cascade = CascadeType.REMOVE) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private List whatLogEntries; + + @OneToMany(cascade = CascadeType.REMOVE) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private List componentTimes; + + @OneToMany(cascade = CascadeType.REMOVE) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private List metadataEntries; + + @OneToOne + @JoinColumn(name = "UNIT_ID", referencedColumnName = "UNIT_ID") + private SysdefUnit sysdefUnit; + + /** + * Helper function to set the identifier. + * @param identifier to set the identifier for the component. + */ + public void setId(int identifier) { + id = identifier; + } + + /** + * Helper function to set the identifier. + * @return the identifier of the component. + */ + public int getId() { + return id; + } + + /** + * Helper function to set component name. + * @param cmp string to be set to. + */ + public void setComponent(String cmp) { + component = cmp; + } + + /** + * Helper function to set log file associated + * with this component. + * @param file associated file to this component. + */ + public void setLogFile(LogFile file) { + logFile = file; + } + + /** + * Helper function to return component string. + * @return component name of this component. + */ + public String getComponent() { + return component; + } + + /** + * Helper function to return log file associated with this component. + * @return component name of this component. + */ + public LogFile getLogFile() { + return logFile; + } + + /** + * Helper function to return logpath id. + * @return log path id associated with this component. + */ + public int getLogFileId() { + return logFileId; + } + + /** + * Set the related Package. + * @param modelPackage the related package entity + */ + public void setSysdefUnit(SysdefUnit sysdefUnit) { + this.sysdefUnit = sysdefUnit; + } + + /** + * Get the related Package. + * @return Returns the related package entity, null if the component + * is not link to any Package. + */ + + public SysdefUnit getSysdefUnit() { + return sysdefUnit; + } + + public void setUnitId(int unitId) { + this.unitId = unitId; + } + + public int getUnitId() { + return unitId; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/ComponentTime.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/ComponentTime.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.metadata.model.metadata; + +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; + + + + +/** + * Entity component time to store the time taken for each + * component to build. + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class ComponentTime { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "COMPONENTTIME_ID") + private int id; + + @Basic + @Column(name = "TIME") + private double componentTime; + + @Basic + @Column(name = "COMPONENT_ID", insertable = false, updatable = false) + private int componentId; + + + @ManyToOne(cascade = CascadeType.REMOVE) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private Component component; + + /** + * Helper function to set the associated component. + * @param cmpt for which the time to be recorded. + */ + public void setComponent(Component cmpt) { + component = cmpt; + } + + + /**Helper function to return the time taken for this component + * to build. + * @return duration to build this component. + */ + public double getDuration() { + return componentTime; + } + + /** + * Helper function to set the duration for this component to build. + * @param duration to build this component. + */ + + public void setDuration(double duration) { + componentTime = duration; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/ExecutionTime.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/ExecutionTime.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; + + +/** + * Entity to store execution of some step/log. + * + */ +@Entity +public class ExecutionTime { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "EXECUTIONTIME_ID") + private int id; + + @Basic + private int time; + + @Basic + @Column(name = "LOGFILE_ID", insertable = false, updatable = false, unique = true) + private int logFileId; + + @OneToOne(cascade = CascadeType.REMOVE) + @JoinColumn(name = "LOGFILE_ID", referencedColumnName = "LOGFILE_ID") + private LogFile logFile; + + /** + * Set record id. + * @param id + */ + public void setId(int id) { + this.id = id; + } + + /** + * Get The record id. + * @return + */ + public int getId() { + return id; + } + + /** + * Set the execution time in seconds. + * @param time + */ + public void setTime(int time) { + this.time = time; + } + + /** + * Get the execution time in seconds. + * @return + */ + public int getTime() { + return time; + } + + /** + * Set the logPathId. + * @param logPathID + */ + public void setLogFileId(int logFileId) { + this.logFileId = logFileId; + } + + /** + * Get the logPathId. + * @return + */ + public int getLogFileId() { + return logFileId; + } + + /** + * Set the logFile. + * @param logFile + */ + public void setLogFile(LogFile logFile) { + this.logFile = logFile; + } + + /** + * Get the logFile. + * @return + */ + public LogFile getLogFile() { + return logFile; + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/LogFile.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/LogFile.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.io.File; +import java.util.List; + +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; + + +/** + * Entity LogFile to store the information about the log for + * which the data to be written to database. + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class LogFile { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "LOGFILE_ID") + private int id; + + @Basic + @Column(nullable = false, length = 500) + private String path; + + @OneToMany(cascade = CascadeType.REMOVE) + @JoinColumn(name = "LOGFILE_ID", referencedColumnName = "LOGFILE_ID") + private List components; + + @OneToMany(cascade = CascadeType.REMOVE) + @JoinColumn(name = "LOGFILE_ID", referencedColumnName = "LOGFILE_ID") + private List metadataEntries; + + @OneToMany(cascade = CascadeType.REMOVE) + @JoinColumn(name = "LOGFILE_ID", referencedColumnName = "LOGFILE_ID") + private List executionTimes; + + + /** + * Helper function to set the identifier for the log file. + * @param identifier for the log file. + */ + public void setId(int identifier) { + id = identifier; + } + + /** + * Helper function to get the identifier for the log file. + * @return identifier for this log file. + */ + public int getId() { + return id; + } + + /** + * Helper function to set the path of the log file. + * @param location of the log file. + */ + public void setPath(String location) { + path = location.replace('\\', '/'); + } + + /** + * Helper function to set the path of the log file. + * @param location of the log file. + */ + public void setPath(File location) { + setPath(location.getAbsolutePath()); + } + + /** + * Helper function to get the path. + * @return path of the log file.. + */ + public String getPath() { + return path; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/LogFileDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/LogFileDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.io.File; +import java.util.List; + +import javax.persistence.NoResultException; + +import com.nokia.helium.metadata.JpaDAO; + +/** + * Implements DAO for the LogFile. + * Contains all helpers related to LogFile manipulation. + * + */ +public class LogFileDAO extends JpaDAO { + + /** + * Get a logfile instance by file name. + * @param logfile + * @return + */ + public LogFile findByLogName(File logfile) { + LogFile result = null; + try { + List resultList = this.getEntityManager().createQuery("select l from LogFile l where l.path='" + + logfile.getAbsolutePath().replace('\\', '/') + "'", LogFile.class).getResultList(); + if (resultList.size() > 0) { + result = resultList.get(0); + } + } catch (NoResultException ex) { + result = null; + } + return result; + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/MetadataEntry.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/MetadataEntry.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.metadata.model.metadata; + +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; + + + +/** + * Entity class which stores the the mapping of all the other tables + * along with actual error information. + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class MetadataEntry { + + /// Maximum size of the text we store in the metadata + public static final int TEXT_LENGTH = 500; + + @Id + @Column(name = "ENTRY_ID") + @GeneratedValue(strategy = GenerationType.SEQUENCE) + private int id; + + @Basic + private int lineNumber; + + @Basic + @Column(length = TEXT_LENGTH) + private String text; + + @Basic + @Column(name = "COMPONENT_ID", insertable = false, updatable = false) + private int componentId; + + @Basic + @Column(name = "SEVERITY_ID", insertable = false, updatable = false) + private int severityId; + + @ManyToOne(cascade = CascadeType.REMOVE, optional = false) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private Component component; + + @ManyToOne(cascade = CascadeType.REFRESH, optional = false) + @JoinColumn(name = "SEVERITY_ID", referencedColumnName = "SEVERITY_ID") + private Severity severity; + + @Column(name = "LOGFILE_ID", insertable = false, updatable = false) + private int logFileId; + + @ManyToOne(cascade = CascadeType.REMOVE, optional = false) + @JoinColumn(name = "LOGFILE_ID", referencedColumnName = "LOGFILE_ID") + private LogFile logFile; + + /** + * Helper function to get the identifier of the metadata record + * which is being stored in the database. + * @return id - identifier for the log record. + */ + public int getId() { + return id; + } + + /** + * Helper function to set the logfile associated to the metadata entry. + * @param LogFile object associated to this entry. + */ + public void setLogFile(LogFile file) { + logFile = file; + } + + /** + * Helper function to set the severity object associated to this entry. + * @param severity object associated to this entry. + */ + public void setSeverity(Severity severity) { + this.severity = severity; + } + + /** + * Helper function to set the component object associated to this entry. + * @param component object associated to this entry. + */ + public void setComponent(Component component) { + this.component = component; + } + + /** + * Helper function to set the identifier for this entry. + * @param id identifier to be set for this entry. + */ + public void setId(int id) { + this.id = id; + } + + /** + * Helper function to set the log text associated to this entry. + * @param txt - text representing this log entry. + */ + public void setText(String text) { + // Let's trunk ourselves the text we are passing to the + // storage. + if (text.length() > TEXT_LENGTH) { + text = text.substring(0, TEXT_LENGTH); + } + this.text = text; + } + + /** + * Helper function to set the line number for this entry. + * @param line number associated to this entry. + */ + public void setLineNumber(int lineNumber) { + this.lineNumber = lineNumber; + } + + /** + * Helper function to get the text message associated to this entry. + * @return text message of this entry. + */ + public String getText() { + return text; + } + + /** + * Helper function to get line number of the error message associated + * with this object. + * @return line number associated to this entry. + */ + public int getLineNumber() { + return lineNumber; + } + + /** + * Helper function to get the log path id of this entry. + * @return log path id associated to this entry. + */ + public int getLogFileId() { + return logFileId; + } + + /** + * Helper function to set the logpath id associated to this entry. + * @param id logpath id of this entry. + */ + public void setLogFileId(int id) { + logFileId = id; + } + + /** + * Helper function to set the severity id associated to this entry. + * @param severityId severity id of this entry. + */ + public void setSeverityId(int severityId) { + this.severityId = severityId; + } + + /** + * Helper function to set the component id associated to this entry. + * @param componentId component id of this entry. + */ + public void setComponentId(int componentId) { + this.componentId = componentId; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/Severity.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/Severity.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,79 @@ + +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + + + + +/** + * Entity Class stores the severity. + */ +@Entity +public class Severity { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "SEVERITY_ID") + private int id; + + @Basic + @Column(name = "SEVERITY") + private String severity; + + + /** + * Helper function to set the severity string. + * @param prty - severity string to be stored for this + * severity object. + */ + public void setSeverity(String severity) { + this.severity = severity.toUpperCase(); + } + + /** + * Helper function to get the severity of the severity object + * @return severity string of this severity object. + */ + public String getSeverity() { + return severity.toUpperCase(); + } + + /** + * Set the identifier of this severity object in the database. + * @param id for this severity in the database + */ + public void setId(int identifier) { + id = identifier; + } + + /** + * Gets the identifier of the severity object. + * @return id of this severity object. + */ + public int getId() { + return id; + } + +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SeverityDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SeverityDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.Hashtable; +import java.util.Map; + +import com.nokia.helium.metadata.JpaDAO; + +/** + * Implements DAO for the Severity. + * Contains all helpers related to Severity manipulation. + * + */ +public class SeverityDAO extends JpaDAO { + + public Map getSeverities() { + Map result = new Hashtable(); + for (Severity severity : this.getEntityManager().createQuery("SELECT s from Severity s", Severity.class).getResultList()) { + result.put(severity.getSeverity(), severity); + } + return result; + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollection.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollection.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; + +/** + * System definition collection. + * + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class SysdefCollection { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "COLLECTION_ID") + private int id; + + @Column(name = "ID", nullable = false, unique = true, length = 255) + private String collectionId; + + @Column(name = "NAME", nullable = false, length = 255) + private String name; + + @Column(name = "PACKAGE_ID", insertable = false, updatable = false, nullable = false) + private int packageId; + + @ManyToOne(cascade = CascadeType.REMOVE) + @JoinColumn(name = "PACKAGE_ID", referencedColumnName = "PACKAGE_ID") + private SysdefPackage sysdefPackage; + + @OneToMany + @JoinColumn(name = "COLLECTION_ID", referencedColumnName = "COLLECTION_ID") + private List sysdefComponents; + + + public void setSysdefPackage(SysdefPackage sysdefPackage) { + this.sysdefPackage = sysdefPackage; + } + + public SysdefPackage getSysdefPackage() { + return sysdefPackage; + } + + public void setCollectionId(String collectionId) { + this.collectionId = collectionId; + } + + public String getCollectionId() { + return collectionId; + } + + public void setId(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setPackageId(int packageId) { + this.packageId = packageId; + } + + public int getPackageId() { + return packageId; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollectionDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefCollectionDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.Hashtable; +import java.util.Map; + +import javax.persistence.NoResultException; +import javax.persistence.TypedQuery; + +import com.nokia.helium.metadata.JpaDAO; + +/** + * Implements DAO for the Collection. + * Contains all helpers related to Collection manipulation. + * + */ +public class SysdefCollectionDAO extends JpaDAO { + + /** + * Get a map of collections rows based on the collection name. + * @return a map of (collectionName, collection). + */ + public Map getCollections() { + Map result = new Hashtable(); + for (SysdefCollection collection : this.getEntityManager().createQuery("SELECT c from SysdefCollection c", SysdefCollection.class).getResultList()) { + result.put(collection.getCollectionId(), collection); + } + return result; + } + + /** + * Get a collection based on its model Id. + * @param id + * @return the entity representing the collection of null if not found. + */ + public SysdefCollection getCollectionById(String id) { + TypedQuery query = this.getEntityManager().createQuery("SELECT c from SysdefCollection c where c.collectionId=?1", SysdefCollection.class); + query.setParameter(1, id); + try { + return query.getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponent.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponent.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; + +/** + * System definition component. + * + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class SysdefComponent { + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "COMPONENT_ID") + private int id; + + @Column(name = "ID", nullable = false, unique = true, length = 255) + private String componentId; + + @Column(name = "NAME", nullable = false, length = 255) + private String name; + + @Column(name = "COLLECTION_ID", insertable = false, updatable = false, nullable = false) + private int collectionId; + + @ManyToOne(cascade = CascadeType.REMOVE) + @JoinColumn(name = "COLLECTION_ID", referencedColumnName = "COLLECTION_ID") + private SysdefCollection sysdefCollection; + + @OneToMany + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private List sysdefUnits; + + public void setCollectionId(int collectionId) { + this.collectionId = collectionId; + } + + public int getCollectionId() { + return collectionId; + } + + public void setComponentId(String componentId) { + this.componentId = componentId; + } + + public String getComponentId() { + return componentId; + } + + public void setId(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public void setSysdefCollection(SysdefCollection sysdefCollection) { + this.sysdefCollection = sysdefCollection; + } + + public SysdefCollection getSysdefCollection() { + return sysdefCollection; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponentDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefComponentDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.Hashtable; +import java.util.Map; + +import javax.persistence.NoResultException; +import javax.persistence.TypedQuery; + +import com.nokia.helium.metadata.JpaDAO; + +/** + * Implements DAO for the Component. + * Contains all helpers related to Component manipulation. + * + */ +public class SysdefComponentDAO extends JpaDAO { + + /** + * Get a map of components rows based on the component name. + * @return a map of (componentName, component). + */ + public Map getComponents() { + Map result = new Hashtable(); + for (SysdefComponent component : this.getEntityManager().createQuery("SELECT c from SysdefComponent c", SysdefComponent.class).getResultList()) { + result.put(component.getComponentId(), component); + } + return result; + } + + /** + * Get a component based on its model Id. + * @param id + * @return the entity representing the component of null if not found. + */ + public SysdefComponent getComponentById(String id) { + TypedQuery query = this.getEntityManager().createQuery("SELECT c from SysdefComponent c where c.componentId=?1", SysdefComponent.class); + query.setParameter(1, id); + try { + return query.getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackage.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; + +/** + * This class represent the PACKAGE table in the + * database. + * Each package name will be unique across the build + * that is why it is not link to any specific logFile. + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class SysdefPackage { + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "PACKAGE_ID") + private int id; + + @Column(name = "ID", nullable = false, unique = true, length = 255) + private String packageId; + + @Column(name = "NAME", nullable = false, length = 255) + private String name; + + @OneToMany + @JoinColumn(name = "PACKAGE_ID", referencedColumnName = "PACKAGE_ID") + private List sysdefCollections; + + /** + * Set the id of the row. + * @param id + */ + public void setId(int id) { + this.id = id; + } + + /** + * Get the id of the row. + * @return the id + */ + public int getId() { + return id; + } + + public void setPackageId(String packageId) { + this.packageId = packageId; + } + + public String getPackageId() { + return packageId; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackageDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefPackageDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.Hashtable; +import java.util.Map; + +import javax.persistence.NoResultException; +import javax.persistence.TypedQuery; + +import com.nokia.helium.metadata.JpaDAO; + +/** + * Implements DAO for the Package. + * Contains all helpers related to Package manipulation. + * + */ +public class SysdefPackageDAO extends JpaDAO { + + /** + * Get a map of packages rows based on the package name. + * @return a map of (pkgname, Package). + */ + public Map getPackages() { + Map result = new Hashtable(); + for (SysdefPackage pkg : this.getEntityManager().createQuery("SELECT p from SysdefPackage p", SysdefPackage.class).getResultList()) { + result.put(pkg.getPackageId(), pkg); + } + return result; + } + + /** + * Get an package based on its model Id. + * @param id + * @return the entity representing the package of null if not found. + */ + public SysdefPackage getPackageById(String id) { + TypedQuery query = this.getEntityManager().createQuery("SELECT p from SysdefPackage p where p.packageId=?1", SysdefPackage.class); + query.setParameter(1, id); + try { + return query.getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefUnit.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefUnit.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; + +/** + * System definition unit. + * + */ +@SuppressWarnings("PMD.UnusedPrivateField") +@Entity +public class SysdefUnit { + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "UNIT_ID") + private int id; + + @Column(name = "LOCATION", nullable = false, length = 4096) + private String location; + + @Column(name = "COMPONENT_ID", insertable = false, updatable = false, nullable = false) + private int componentId; + + @ManyToOne(cascade = CascadeType.REMOVE) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private SysdefComponent sysdefComponent; + + @OneToMany + @JoinColumn(name = "UNIT_ID", referencedColumnName = "UNIT_ID") + private List components; + + + public void setId(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getLocation() { + return location; + } + + public void setComponentId(int componentId) { + this.componentId = componentId; + } + + public int getComponentId() { + return componentId; + } + + public void setSysdefComponent(SysdefComponent sysdefComponent) { + this.sysdefComponent = sysdefComponent; + } + + public SysdefComponent getSysdefComponent() { + return sysdefComponent; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefUnitDAO.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/SysdefUnitDAO.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.model.metadata; + +import java.io.File; +import java.util.List; + +import javax.persistence.NoResultException; +import javax.persistence.TypedQuery; + +import com.nokia.helium.metadata.JpaDAO; + +/** + * Implements DAO for the Unit. + * Contains all helpers related to Unit manipulation. + * + */ +public class SysdefUnitDAO extends JpaDAO { + + /** + * Get a map of units rows based on the unit name. + * @return a map of (unitName, unit). + */ + public List getUnits() { + return this.getEntityManager().createQuery("SELECT c from SysdefUnit c", SysdefUnit.class).getResultList(); + } + + /** + * Get a unit based on its model Id. + * @param id + * @return the entity representing the unit of null if not found. + */ + public SysdefUnit getUnitByLocation(File epocroot, File location) { + return getUnitByLocation(epocroot.toURI().relativize(location.toURI()).getPath()); + } + + public SysdefUnit getUnitByLocation(String location) { + TypedQuery query = this.getEntityManager().createQuery("SELECT u from SysdefUnit u where u.location=?1", SysdefUnit.class); + query.setParameter(1, location); + try { + return query.getSingleResult(); + } catch (NoResultException ex) { + return null; + } + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/WhatLogEntry.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/com/nokia/helium/metadata/model/metadata/WhatLogEntry.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.metadata.model.metadata; + +import javax.persistence.Basic; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; + + +/** + * Entity class to store the component information. + */ +@Entity +public class WhatLogEntry { + + public static final int PATH_MAX = 4096; + + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE) + @Column(name = "WHATLOG_ENTRY_ID") + private int id; + + @Basic + @Column(name = "COMPONENT_ID", insertable = false, updatable = false) + private int componentId; + + @Basic + @Column(name = "MEMBER", nullable = false, length = PATH_MAX) + private String member; + + @Basic + @Column(name = "MISSING") + private boolean missing; + + @ManyToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "COMPONENT_ID", referencedColumnName = "COMPONENT_ID") + private Component component; + + /** + * Helper function to set the identifier. + * @param identifier to set the identifier for the component. + */ + public void setId(int identifier) { + id = identifier; + } + + /** + * Helper function to set the identifier. + * @return the identifier of the component. + */ + public int getId() { + return id; + } + + /** + * Helper function to set component name. + * @param cmp string to be set to. + */ + public void setComponent(Component cmp) { + component = cmp; + } + + /** + * Helper function to set log file associated + * with this component. + * @param file associated file to this component. + */ + public void setMember(String member) { + // Truncate the string if it doesn't fit to the schema. + if (member.length() > PATH_MAX) { + member = member.substring(0, PATH_MAX); + } + this.member = member; + } + + /** + * Helper function to return component string. + * @return component name of this component. + */ + public Component getComponent() { + return component; + } + + /** + * Helper function to return log file associated with this component. + * @return component name of this component. + */ + public String getMember() { + return member; + } + + public void setMissing(boolean nonexistance) { + missing = nonexistance; + } + + public boolean getMissing() { + return missing; + } + + public int getComponentID() { + return componentId; + } + + public void setComponentId(int componentId) { + this.componentId = componentId; + } +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/log4j.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/src/log4j.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/build_status.xml.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/build_status.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -<#-- -============================================================================ -Name : email.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > -<#assign priority_table = table_info['select * from priority'] > -<#assign priority_ids = priority_table?keys> - -<#list priority_ids as priority> - <#assign priority_count = table_info['select count(data) as COUNT from metadata where priority_id = ${priority} and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] > - <#if (priority_count >= 0)> - <${priority_table['${priority}']?lower_case} count= "${priority_count}"> - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/cc_summary.html.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/cc_summary.html.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -<#-- -============================================================================ -Name : cc_summary.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - -

    ${ant['build.id']}

    - -<#if ant?keys?seq_contains('publish')> - <#if ant?keys?seq_contains('publish.dir.list')> -

    Publish locations

    -

    - <#list ant['publish.dir.list']?split(',') as site> - ${site}
    - -

    - <#else> - <#if ant?keys?seq_contains('publish.dir')> -

    Publish locations

    -

    ${ant['publish.dir']}

    - - - - -<#assign ccm_logpath_table = table_info['select * from logfiles where path like \'%_ccm_get_input.log%\''] > - -<#assign logpath_id = ccm_logpath_table?keys> -<#list logpath_id as logpath> -<#assign metadata_ccm_records = table_info['select * from metadata where logpath_id = ${logpath} and (priority_id = (select id from priority where priority=\'ERROR\') or priority_id = (select id from priority where priority=\'WARNING\'))'] > -

    Synergy errors

    -

    - <#list metadata_ccm_records as recordentry> - ${recordentry['data']} - -

    - - -

    Build errors

    -<#assign compile_logpath_table = table_info['select * from logfiles where (path like \'%_compile.log\' and path not like \'%_clean_compile.log\')'] > -<#assign colors = {'error': 'FF0000', 'critical': 'FF7000', 'warning': 'FFF000', 'remark': '0000FF'}/> - - - - - - - - - -<#assign logpath_id = compile_logpath_table?keys> -<#list logpath_id as logpath> - <#assign component_table = table_info['select id, component from component where logPath_id=${logpath}'] > - <#assign component_ids = component_table?keys?sort > - -<#list component_ids as component_id> - - - <#list colors?keys as type> - <#assign count = "${table_info['select count(data) as COUNT from metadata where logpath_id=${logpath} and (priority_id = (select id from priority where priority like \"${type}\"))'][0]['COUNT']}" > - <#if ( count?number > 0)> - - <#else> - - - - - - -
    ComponentErrorsCriticalsWarningsNotes
    "${component_table['${component_id}']}"${count}0
    - -<#assign rom_logpath_table = table_info['select * from logfiles where (path like \'%roms.log\')'] > -<#assign logpath_id = rom_logpath_table?keys> -<#list logpath_id as logpath> - <#assign romlog_table = table_info['select * from metadata where logpath_id = ${logpath}'] > -

    ROMs ${rom_logpath_table['${logpath}']}

    -

    - <#list romlog_table as recordentry> - ${recordentry['data']}
    - -

    - - -<#assign policy_logpath_table = table_info['select * from logfiles where (path like \'%validate_policy.xml\')'] > -<#assign logpath_id = policy_logpath_table?keys> -<#list logpath_id as logpath> - <#assign policy_table = table_info['select * from metadata where logpath_id = ${logpath}'] > -

    Distribution Policy validation

    -

    - <#list policy_table as recordentry> - ${recordentry['data']}
    - -

    - - -<#if ant?keys?seq_contains('diamonds.build.id')> -

    -

    ATS Test Results

    - http://${ant['diamonds.host']}${ant['diamonds.build.id']}#tab=4 -

    - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/cc_summary_metadata.html.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/cc_summary_metadata.html.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -<#-- -============================================================================ -Name : cc_summary.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - -

    ${ant['build.id']}

    - -<#if ant?keys?seq_contains('publish')> - <#if ant?keys?seq_contains('publish.dir.list')> -

    Publish locations

    -

    - <#list ant['publish.dir.list']?split(',') as site> - ${site}
    - -

    - <#else> - <#if ant?keys?seq_contains('publish.dir')> -

    Publish locations

    -

    ${ant['publish.dir']}

    - - - - -<#assign ccm_logpath_table = table_info['select * from logfiles where path like \'%_ccm_get_input.log%\''] > - -<#assign logpath_id = ccm_logpath_table?keys> -<#list logpath_id as logpath> -<#assign metadata_ccm_records = table_info['select * from metadata where logpath_id = ${logpath} and (priority_id = (select id from priority where priority=\'ERROR\') or priority_id = (select id from priority where priority=\'WARNING\'))'] > -

    Synergy errors

    -

    - <#list metadata_ccm_records as recordentry> - ${recordentry['data']} - -

    - - -

    Build errors

    -<#assign compile_logpath_table = table_info['select * from logfiles where (path like \'%_compile.log\' and path not like \'%_clean_compile.log\')'] > -<#assign colors = {'error': 'FF0000', 'critical': 'FF7000', 'warning': 'FFF000', 'remark': '0000FF'}/> - - - - - - - - - -<#assign logpath_id = compile_logpath_table?keys> -<#list logpath_id as logpath> - <#assign component_table = table_info['select id, component from component where logPath_id=${logpath}'] > - <#assign component_ids = component_table?keys?sort > - -<#list component_ids as component_id> - - - <#list colors?keys as type> - <#assign count = "${table_info['select count(data) as COUNT from metadata where logpath_id=${logpath} and (priority_id = (select id from priority where priority like \"${type}\"))'][0]['COUNT']}" > - <#if ( count?number > 0)> - - <#else> - - - - - - -
    ComponentErrorsCriticalsWarningsNotes
    "${component_table['${component_id}']}"${count}0
    - -<#assign rom_logpath_table = table_info['select * from logfiles where (path like \'%roms.log\')'] > -<#assign logpath_id = rom_logpath_table?keys> -<#list logpath_id as logpath> - <#assign romlog_table = table_info['select * from metadata where logpath_id = ${logpath}'] > -

    ROMs ${rom_logpath_table['${logpath}']}

    -

    - <#list romlog_table as recordentry> - ${recordentry['data']}
    - -

    - - -<#assign policy_logpath_table = table_info['select * from logfiles where (path like \'%validate_policy.xml\')'] > -<#assign logpath_id = policy_logpath_table?keys> -<#list logpath_id as logpath> - <#assign policy_table = table_info['select * from metadata where logpath_id = ${logpath}'] > -

    Distribution Policy validation

    -

    - <#list policy_table as recordentry> - ${recordentry['data']}
    - -

    - - -<#if ant?keys?seq_contains('diamonds.build.id')> -

    -

    ATS Test Results

    - http://${ant['diamonds.host']}${ant['diamonds.build.id']}#tab=4 -

    - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/diamonds_faults.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/diamonds_faults.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -<#-- -============================================================================ -Name : macro.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> -<#setting number_format="0"> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - <#assign priority_table = table_info['select * from priority'] > - <#assign logpath_table = table_info['select * from logfiles'] > - <#assign priority_ids = priority_table?keys> - <#assign logpath_id = logpath_table?keys> - <#assign components = table_info['select component from component where logPath_id=(select id from logfiles where path=\'${logpath}\')'] > - - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'ERROR\') and logpath_id=(select id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'REMARK\')'][0]['COUNT']} - <#list components as component> - - ${component['component']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'ERROR\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'REMARK\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - - - - - - - <#list components as component> - - ${component['component']} - - -<#assign schema_version=10/> \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/diamonds_macro.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/diamonds_macro.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -<#-- -============================================================================ -Name : macro.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> -<#setting number_format="0"> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - <#assign priority_table = table_info['select * from priority'] > - <#assign logpath_table = table_info['select * from logfiles'] > - <#assign priority_ids = priority_table?keys> - <#assign logpath_id = logpath_table?keys> - <#assign components = table_info['select component from component where logPath_id=(select id from logfiles where path=\'${logpath}\')'] > - - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'ERROR\') and logpath_id=(select id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'REMARK\')'][0]['COUNT']} - <#list components as component> - - ${component['component']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'ERROR\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'WARNING\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - ${table_info['select count(data) as COUNT from metadata where priority_id=(select id from priority where priority=\'REMARK\') and logpath_id=(select logpath_id from logfiles where path=\'${logpath}\')'][0]['COUNT']} - - - - - <#list components as component> - - ${component['component']} - - -<#assign schema_version=10/> \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/email_new.html.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/email_new.html.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -<#-- -============================================================================ -Name : email.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - - - - - - - Build result e-mail from ${ant["env.COMPUTERNAME"]}. - - - - - -
    -

    This is an e-mail notification that a build has been completed on ${ant["env.COMPUTERNAME"]}

    -
    - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - -<#assign error_count = table_info['select count(data) as COUNT from metadata where priority_id in (select id from priority where priority like \'ERROR\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'][0]['COUNT'] > - - <#macro create_section title type> -
    -
    ${title}
    -

    - - <#nested> -

    -
    - -<#if (error_count > 0)> - - ${logfile}...FAIL
    - <#list table_info['select * from metadata where priority_id in (select id from priority where priority like \'ERROR\') and logpath_id in (select id from logfiles where path like \'%${logfile}%\')'] as recordentry > -
      - ${recordentry['data']}
      -
    - -
    -<#else> - ${logfile}...OK
    - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/faults.txt.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/faults.txt.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -<#-- -============================================================================ -Name : macro.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> -<#setting number_format="0"> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', - "${dbPath}") > - <#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logpath_id=component.logpath_id where logfile.path like \'%_compile%.log\' and logfile.path not like \'%_compile_clean%.log\''] as component> -${component}:error:${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%ERROR%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0] - + table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\' and w.missing = \'true\''][0]} - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/general_category.txt.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/general_category.txt.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -<#-- -============================================================================ -Name : summary.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - - - -<#assign logpath_table = table_info['select * from logfiles'] > -<#assign logpath_id = logpath_table?keys> -<#list logpath_id as logpath> - <#assign component_table = table_info['select id, component from component where logPath_id=${logpath}'] > - <#assign component_ids = component_table?keys?sort > - <#list component_ids as component_id > - component : ${component_table['${component_id}']} : logfile : ${logpath_table['${logpath}']} - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/macro/expand3.js --- a/buildframework/helium/sf/java/metadata/src/templates/macro/expand3.js Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -function __ToggleNode( divNode ) -{ - var cntNode = document.getElementById(divNode.id.replace(/Img(.+)/, 'Content$1')); - - if(!cntNode) return; - - if(cntNode.style.display == 'none') - { - cntNode.style.display = 'block'; - divNode.style.background = divNode.style.background.replace(/open./, 'close.'); - } - else - { - cntNode.style.display = 'none'; - divNode.style.background = divNode.style.background.replace(/close./, 'open.'); - } - - return cntNode; -} - -function __UpdateNode( divNode, dsp ) -{ - var cntNode = document.getElementById(divNode.id.replace(/Img(.+)/, 'Content$1')); - - if(!cntNode) return; - - cntNode.style.display = dsp; - if(dsp == 'block') - divNode.style.background = divNode.style.background.replace(/open./, 'close.'); - else - divNode.style.background = divNode.style.background.replace(/close./, 'open.'); - - return cntNode; -} - -function __ToggleChilds( divNode ) -{ - var cntNode = __ToggleNode(divNode); - if(!cntNode) return; - var childs = cntNode.getElementsByTagName('div'); - - for(var i = 0; i != childs.length; ++i) - if(/Img/.test(childs[i].id)) - __ToggleChilds(childs[i]); -} - -function __UpdateChilds( divNode, dsp ) -{ - var cntNode = __UpdateNode(divNode, dsp); - if(!cntNode) return; - var childs = cntNode.getElementsByTagName('span'); - - for(var i = 0; i != childs.length; ++i) - if(/Img/.test(childs[i].id)) - __UpdateChilds(childs[i], dsp); -} - -function ToggleNode( id ) -{ __ToggleNode(document.getElementById(id)); } - -function ShowContent( id ) -{ __UpdateNode(document.getElementById(id), 'block'); } - -function HideContent( id ) -{ __UpdateNode(document.getElementById(id), 'none'); } - -function ShowChilds( id ) -{ __UpdateChilds(document.getElementById(id), 'block'); } - -function HideChilds( id ) -{ __UpdateChilds(document.getElementById(id), 'none'); } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/macro/log3.css --- a/buildframework/helium/sf/java/metadata/src/templates/macro/log3.css Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* Main components */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -BODY { font-family: "Nokia Sans Regular", Tahoma; font-size: x-small; margin: 0em; padding: 0em; background: #EEEEFF; } -A { color: #000000; text-decoration: none; } -#mb, #s_mb { margin: 5px; padding: 0px; background: #DADAEE; border: 1px solid #2161B5; } -.mc, .s_mc { margin: 3px; padding: 3px 2px; background: #FFFFFF; border: 1px solid #2161B5; } -.mc h1, .s_mc h1 { padding-left: 5px; margin: 3px 0px; font-weight: bold; color: #2161B5; font-size: x-small; border-bottom: 1px solid #2161B5; } -.s_tag { font-size: x-small; font-weight: bold; padding: 0px 5px 3px 5px; } -.s_val { font-size: x-small } - -/* Header */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -#h_wrapper { } -.h_elmt { color: #0036CC; padding: 5px; margin: 10px; } -.h_title { font-family: "Nokia Large", "Tahoma"; font-size: xx-large; font-weight: bold; } -.h_subtitle { font-size: x-small; font-weight: normal; } - -/* Footer */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -#f_wrapper { } -.f_elmt { font-weight: normal; color: #0036CC; padding: 5px; margin: 10px 15px; border-top: solid 1px #0036CC; } -.f_title { font-size: x-small; padding: 0px; margin: 0px; } -.f_subtitle { font-size: xx-small; padding: 0px; margin: 0px; } - -/* Color cross images */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.cr_r, .cr_b, .cr_y { padding-left: 19px; padding-bottom: 2px; } -.cr_r { background: url(../img/icons/delete_red.gif) no-repeat; } -.cr_b { background: url(../img/icons/delete_blue.gif) no-repeat; } -.cr_y { background: url(../img/icons/delete_yellow.gif) no-repeat; } - -/* Color check images */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.ch_g, .ch_b { padding-left: 19px; padding-bottom: 2px; } -.ch_g { background: url(../img/icons/check_green.gif) no-repeat; } -.ch_b { background: url(../img/icons/check_blue.gif) no-repeat; } - -/* Element icons */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.icn_dir, .icn_cpp, .icn_hpp, .icn_txt, .icn_inf, .icn_bin, .icn_xml, .icn_prj, .icn_mmp, .icn_iby, .icn_oby, .icn_spt, .icn_doc, .icn_xls, .icn_rss -{ padding-left: 23px; padding-bottom: 2px; } -.icn_dir { background: url(../img/icons/dir.gif) no-repeat; } -.icn_cpp { background: url(../img/icons/cpp.gif) no-repeat; } -.icn_hpp { background: url(../img/icons/hpp.gif) no-repeat; } -.icn_txt { background: url(../img/icons/txt.gif) no-repeat; } -.icn_inf { background: url(../img/icons/inf.gif) no-repeat; } -.icn_bin { background: url(../img/icons/bin.gif) no-repeat; } -.icn_xml { background: url(../img/icons/xml.gif) no-repeat; } -.icn_prj { background: url(../img/icons/prj.gif) no-repeat; } -.icn_mmp { background: url(../img/icons/mmp.gif) no-repeat; } -.icn_iby { background: url(../img/icons/iby.gif) no-repeat; } -.icn_oby { background: url(../img/icons/oby.gif) no-repeat; } -.icn_spt { background: url(../img/icons/spt.gif) no-repeat; } -.icn_doc { background: url(../img/icons/doc.gif) no-repeat; } -.icn_xls { background: url(../img/icons/xls.gif) no-repeat; } -.icn_rss { background: url(../img/icons/rss.gif) no-repeat; } - -/* Message counts */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.count_fatal_error, .count_error, .count_warning, .count_remark, .count_note, .count_default { text-align: center; padding: 0px 20px; width: 200px; } -.gbl_count_fatal_error, .gbl_count_error, .gbl_count_warning, .gbl_count_remark, .gbl_count_note, .gbl_count_default, .count_critical, .gbl_count_critical , .count_info, .gbl_count_info{ text-align: center; padding: 0px 20px; margin: 0px 2px; } -.count_fatal_error, .gbl_count_fatal_error { color: #EB320A; border: 1px solid #EB320A; background: #F5C2B9; } -.count_error, .gbl_count_error { color: #EB320A; border: 1px solid #EB320A; background: #FFCC00; } -.count_critical, .gbl_count_critical { color: #FF3200; border: 1px solid #FF3200; background: #FFF476; } -.count_warning, .gbl_count_warning { color: #FFBA00; border: 1px solid #FFBA00; background: #FFF476; } -.count_remark, .gbl_count_remark { color: #4EBE2C; border: 1px solid #4EBE2C; background: #EDEFFF; } -.count_note, .gbl_count_note { color: #2161B5; border: 1px solid #2161B5; background: #EDEFFF; } -.count_info, .gbl_count_info { color: #2161B5; border: 1px solid #2161B5; background: #EDEFFF; } -.count_default, .gbl_count_default { color: #DADADA; border: 1px solid #DADADA; background: #FFFFFF; } - -/* Node components */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.node_head { padding: 1px 0px 2px 0px; } -.node_title { padding-left: 19px; } -.node_info { float: right; margin-top: -18px; padding: 1px 0px; } -.node_content { padding: 2px 0px 2px 3px; margin-bottom: 3px; border-top: 1px solid #EDEDED; border-bottom: 1px solid #EDEDED;border-left: 1px solid #EDEDED; } -.node_action { font-size: xx-small; color: #999999; } - -/* C++ components */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.code_sample { font-family: Anonymous, "Courier New"; font-size: x-small; padding: 3px 6px; border: 1px solid #BABABA; background: #EDEDED; } -.code_kwd { color: #0000FF; } -.code_smb { color: #AA11FF; } -.code_pp { color: #44AA11; } -.code_cmt { color: #767676; } - -/* Error highlight */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.code_fatal_error { background-color: #F5C2B9; } -.code_error { background-color: #FFCC00; } -.code_critical { background-color: #FFDD00; } -.code_warning { background-color: #FFF476; } - -/* Formatting components */ -/*-------------------------------------------------------------------------------------------------------------------------*/ -.separator { margin-top: 5px; } -.t_wrapper { width: 100%; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/macro/logger.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/macro/logger.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -<#-- -============================================================================ -Name : logger.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - -<#macro helium_logger_html_head> - - - - - -<#global helium_node_id = 0> - - -<#macro helium_logger_header title subtitle=""> -
    -
    -
    ${title}
    -
    ${subtitle}
    -
    -
    - - - - -<#macro helium_logger_content title> - <#assign helium_node_id = helium_node_id + 1> -
    -
    -

    ${title}

    -
    -
    -
    - <#nested> -
    -
    -
    -
    - - - - -<#macro helium_logger_print type> - <#if type == ""> - <#nested>
    - <#else> - <#nested>
    - - - -<#macro helium_message_box nodeid type count> - <#if (count > 0)> - - - ${count} ${type}s - - - - - -<#macro helium_logger_node_head nodeid title> - - - - -<#macro helium_logger_node_content nodeid> - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/readdata.xml.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/readdata.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -<#-- -============================================================================ -Name : bmd.macros.xml.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - -<#macro helium_scanlog_entry > - - - - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.SQLFMPPLoader', - "${dbPath}") > - - -

    Summary

    - -<#assign priority_table = table_info['select * from priority'] > -<#assign component_table = table_info['select id, component from component'] > -<#assign logpath_table = table_info['select * from logfiles'] > -<#assign priority_ids = priority_table?keys> - -<#assign quotes='\'' /> -<#list priority_ids as priority> - - - -
    Total     ${priority_table['${priority}']}      -${table_info['select count(data) as COUNT from metadata where priority_id=${priority}'][0]['COUNT']}
    -

    Listing based on Priority

    - -<#list priority_ids as priority> - - - - -<#list table_info['select * from metadata where priority_id=${priority}'] as recordentry > - - - - -
    priority_id:${priority}     
     

    ${priority_table['${priority}']}

    logtext:${recordentry['data']}     lineNo:${recordentry['line_number']}     
    -

    Listing based on Component

    - -<#assign component_ids = component_table?keys> -<#list component_ids as component> - - -<#list table_info['select * from metadata where component_id=${component} order by priority_id'] as recordentry > - - - - - -
     

    ${component_table['${component}']}

    priority:${priority_table["${recordentry['priority_id']}"]}     logtext:${recordentry['data']}     lineNo:${recordentry['line_number']}     
    - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/scan2.html.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/scan2.html.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -<#-- -============================================================================ -Name : scan2.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - -<#macro print_component_summary component href_c_id > -<#assign href_id = 0> -<#assign component_time_list = table_info['jpasingle']['select t.componentTime from ComponentTime t where t.componentId =${component.id}']> - -<#if component_time_list[0]?? > - <#assign time = component_time_list[0]?number> -<#else> - <#assign time = 0> - - -<#assign hours = (time /(60 * 60))?floor> -<#assign minutes_secs = (time % (60 * 60))?floor> -<#assign minutes = (minutes_secs / 60)?floor> -<#assign seconds = (minutes_secs % 60)?floor> - ${component.component} -<#--write each of the component tables information --> -${hours?string("00")}:${minutes?string("00")}:${seconds?string("00")} -<#list color_list?keys as priority> - <#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry as m JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%${priority?upper_case}%\' and c.id=${component.id}'][0] > - <#if count > 0> - <#assign color = color_list['${priority}']> - ${count} - <#else> - ${count} - - <#assign href_id = href_id + 1> - - - - -<#macro print_list_text priority component href_id> -<#assign count = table_info['jpasingle']['select count(m.id) from MetadataEntry as m JOIN m.priority as p JOIN m.component as c where UPPER(p.priority) like \'%${priority?upper_case}%\' and c.id=${component.id}'][0] > -<#if count?? && count?number > 0> -<#if "${component.component}" != "general"> -

    ${component.component}(${count})

    - <#else> -

    Uncategorized(${count})

    - - -<#list table_info['native:com.nokia.helium.jpa.entity.metadata.MetadataEntry']['select * from metadataentry INNER JOIN component ON component.component_id=metadataentry.component_id INNER JOIN priority ON priority.priority_id=metadataentry.priority_id where component.component_id=${component.id} and UPPER(priority.priority) like \'%${priority?upper_case}%\''] as entry > -${logfile}:${entry.lineNumber}>${entry.text}
    - - - -<#macro add_severity_count severity, color, count> - <#if count > 0> -${count} - <#else> - ${count} - - - -<#-- end of macros code starts here --> - - -<#if (doc)??> - <#assign logfile = "${doc.sbsinfo.logfile.@name}" > - <#assign time = "${doc.sbsinfo.duration.@time}" > - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', - "${dbPath}") > -<#-- overall summary --> -<#assign logpath_id_list = table_info['jpasingle']['select l.id from LogFile l where l.path like \'%${logfile}\''] > -<#if logpath_id_list[0]?? > -<#assign logpath_id = logpath_id_list[0] > - - -${logfile} - -

    Overall

    - - - - - - - - - - - -<#-- need to create variables for the items tobe displayed in the comment title Overall_Total -doing this the long winded way because I could not find a way to add items to a hash in a loop --> -<#assign color_list={'error': 'FF0000', 'warning': 'FFF000', 'critical': 'FF7000', 'remark': 'FFCCFF', 'info': 'FFFFFF'}> -<#assign priority_ids = color_list?keys> - - -<#list priority_ids as priority> - <@add_severity_count severity='${priority}' color=color_list['${priority}'] - count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority p where m.logPathId=${logpath_id} and UPPER(p.priority) like \'%${priority?upper_case}%\''][0] /> - - -
     TimeErrorsWarningsCriticalMigration NotesInfo
    Total${time}
    -<#-- Summary for each component --> -

    ${logfile}

    -

    By Component

    - - - - - - - - - - - -<#assign c_id = 0> -<#assign general_component_list = table_info['jpasingle']['select c from Component c where LOWER(c.component) like \'%general%\' and c.logPathID=${logpath_id}']> -<#if general_component_list[0]?? > -<#assign general_component = general_component_list[0] > -<@print_component_summary component=general_component href_c_id="${c_id}"/> -<#assign c_id = c_id + 1> - -<#list table_info['jpa']['select c from Component c where c.logPathID=${logpath_id} and LOWER(c.component) not like \'%general%\' ORDER BY c.component'] as componentEntry> -<@print_component_summary component=componentEntry href_c_id="${c_id}"/> -<#assign c_id = c_id + 1> - - -
    ComponentTimeErrorsWarningsCriticalsNotesInfo
    - -<#-- Individual components status --> -<#list priority_ids as p_id> -<#assign p_count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.priority as p where m.logPathId=${logpath_id} and UPPER(p.priority) like \'%${p_id?upper_case}%\''][0]> -<#if p_count > 0> -

    ${p_id} Details By Component

    - -<#assign href_cid = 0> -<#if general_component??> - <@print_list_text priority="${p_id}" component=general_component href_id="${p_id}${href_cid}" /> - <#assign href_cid = href_cid + 1> - -<#list table_info['jpa']['select c from Component c where c.logPathID=${logpath_id} and LOWER(c.component) not like \'%general%\' ORDER BY c.component'] as componentEntry> - <@print_list_text priority="${p_id}" component=componentEntry href_id="${p_id}${href_cid}" /> - <#assign href_cid = href_cid + 1> - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/src/templates/summary.html.ftl --- a/buildframework/helium/sf/java/metadata/src/templates/summary.html.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -<#-- -============================================================================ -Name : summary.html.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> - - - - - -<#include "/@macro/logger.ftl"/> - - <#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', - "${dbPath}") > - - - -<#if loginfo?? > -<#assign mykey=loginfo.info.id> -<#if (conv[mykey])?exists> -${loginfo.info.id} -</#if> -build summary - <@helium_logger_html_head/> - - - - - - -<#macro logentry text, severity> - <#assign conv={"error": "error", "warning": "warning"}> - <#if (conv['${severity}'])?exists> - <@helium_logger_print type="${conv[\"${severity}\"]}">${text} - <#else> - <@helium_logger_print type="">${text} - - - -<#macro logfile_severity logname, priority, count, helium_node_id> - <@helium_message_box nodeid="${helium_node_id}" type="${priority}" count="${count}"?number /> - - - -<#macro logfile_entry_detail text, priority, helium_node_id> - <@logentry "${text}", "${priority?lower_case}" /> - - - -<#assign mykey=loginfo> -<#if (conv[mykey])?exists> -<@helium_logger_header title="${loginfo.info.id} build"/> - -<@helium_logger_content title="Build overview"> - Time started: ${loginfo.info.startTime}
    - Build machine: ${loginfo.info.machine}
    - Is published?: ${loginfo.info.publish.status}
    - <#if loginfo.info.publish.status?string == true?string> - Published location: ${loginfo.info.publish.location}
    - - - - -<@helium_logger_content title="Errors and warnings details"> -<#list table_info['jpa']['select l from LogFile l'] as logentry> - <#assign helium_node_id = helium_node_id + 1> - <#-- --> - <@helium_logger_node_head nodeid="${helium_node_id}" title="${logentry.path}"> - <#list table_info['jpa']['select p from Priority p where p.priority not like \'%DEFAULT%\''] as priority> - <#assign count = table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.priorityId = ${priority.id} and m.logPathId=${logentry.id}'][0]> - <@logfile_severity "${logentry.path}", "${priority.priority?lower_case}", - "${count}", - "${helium_node_id}" /> - - - <@helium_logger_node_content nodeid="${helium_node_id}"> - <#list table_info['jpa']['select c from Component c where c.logPathID=${logentry.id}'] as component> - <#assign helium_node_id = helium_node_id + 1> - <@helium_logger_node_head nodeid="${helium_node_id}" title="${component.component}"> - <#list table_info['jpa']['select p from Priority p where p.priority not like \'%DEFAULT%\''] as priority> - <@logfile_severity "${component.id}", "${priority.priority}", - table_info['jpasingle']['select Count(m.id) from MetadataEntry m where m.priorityId=${priority.id} and m.componentId = ${component.id}'][0], - "${helium_node_id}" /> - - - <@helium_logger_node_content nodeid="${helium_node_id}"> - <#list table_info['jpa']['select p from Priority p'] as priority> - <#list table_info['native:com.nokia.helium.jpa.entity.metadata.MetadataEntry']['select * from metadataentry where metadataentry.component_id=${component.id} and metadataentry.priority_id = ${priority.id}'] as entry > - <#if entry.text??> - <#-- <#if sublog?node_name == "logfile"> --> - <@logfile_entry_detail "${entry.text}", "${priority.priority}", "${helium_node_id}" /> - - <#-- <#elseif sublog?node_name == "log"> - <@antlognode sublog/> - --> - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_abld_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_abld_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,85 @@ + + + Helium metadata Abld input unittests. + + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + number.of.logs: ${number.of.logs} + number.of.execution.times: ${number.of.execution.times} + number.of.components: ${number.of.components} + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_ant_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_ant_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,81 @@ + + + Helium metadata Ant input unittests. + + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + number.of.logs: ${number.of.logs} + number.of.components: ${number.of.components} + number.of.errors: ${number.of.errors} + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_imaker_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_imaker_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,81 @@ + + + + Helium antlib metadata tests. + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + + number.of.logs: ${number.of.logs} + number.of.components: ${number.of.components} + number.of.errors: ${number.of.errors} + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_metadata.ant.xml --- a/buildframework/helium/sf/java/metadata/tests/antunit/test_metadata.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_metadata.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,62 +23,35 @@ Helium antlib metadata tests. + - - - - - - - - - - - - - - + + + ---=====================================--- + + + - - - - - - macro: ${basedir}/../src/templates - - - templatedir: "${basedir}/src/templates" - template: "components_status.xml.ftl" - dbPath: "tests/metadata_db" - countOnly: "true" - tableName: "out" - queryString: "where priority='WARNING' or priority='error'" - limit: "500" - ant: antProperties() - - + + + ---=====================================--- - + - + - + + @@ -89,7 +62,8 @@ - + + @@ -101,45 +75,211 @@ - - - - - - - - - - - - + + - - - + + + + + + + + + + + + + + - - - - - + + + + + + 0: + f.write("ERROR: error %d\n" % length) + length = length - 1 +finally: + f.close() + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + errors: ${errors} + + + + + + + + + + + + + + + + + - - - dbPath: ${basedir}\metadata_db - ant: antProperties() - - + + errors.before: ${errors.before} + + + + + errors.after: ${errors.after} + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + errors: ${errors} + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_policy_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_policy_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,64 @@ + + + Helium metadata Ant input unittests. + + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + ${errors} + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_regex.ant.xml --- a/buildframework/helium/sf/java/metadata/tests/antunit/test_regex.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_regex.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -37,59 +37,25 @@ + ---=====================================--- + + - - - - - - - - - - - - - - - dbPath: ${test.temp.dir}/categorization_db - ant: antProperties() - - - - - - - - - - - - - - cleanlog_errors: ${cleanlog_errors} - - - + + + ---=====================================--- - + - - - - - + @@ -99,20 +65,16 @@ - + - - - - - + @@ -122,11 +84,12 @@ - + + test-parser-error-ant-call @@ -146,129 +109,16 @@ - - - - - - - - - - - - - - test-categorization-nocleanlog: ${nocleanlog_errors} - - - - - - - - - - - - - - - - - - macro: ${project.dir}/../../src/templates - - - - dbPath: ${test.temp.dir}/log-entry-category_component_check_db - ant: antProperties() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -278,50 +128,25 @@ - + - - - - - - - - - - - - - - - - - - - - + - - - - - + @@ -330,163 +155,80 @@ - + - - - - - - - - - - - - - - + + - - - - - - - - + + + + + + + + + + - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -494,14 +236,10 @@ - - - - - + @@ -510,126 +248,52 @@ - + - - - - - - - - - - - macro: ${project.dir}/../../src/templates/macro - - - dbPath: ${metadata-read-db} - loginfo: xml(${project.dir}/../data/ido_abs_mcl_devlon70_robot_MCL.70.500_info.log) - ant: antProperties() - - - - - - - - + + + - - - + - + - + - + + + + + - + + + + + - + + + + + - - - - - - - - - - - - - - - - - - - @@ -640,161 +304,69 @@ - - + + - + - - - - - - - - - - - - - - - - - - dbPath: ${test.temp.dir}/whatlog_db - ant: antProperties() - - - - - - - - - - - - - + - + - + - + + log-with-same-root-name.log.error: ${log-with-same-root-name.log.error} - + - + - - + test-release-database-fmpp + - + - dbPath: ${test.temp.dir}/test-release-database-fmpp_db + dbPath: ${test.temp.dir}/metadata_db ant: antProperties() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_sbs_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_sbs_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,432 @@ + + + Helium metadata SBS input unittests. + + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/categorization_db + ant: antProperties() + + + + number.of.logs: ${number.of.logs} + number.of.execution.times: ${number.of.execution.times} + number.of.components: ${number.of.components} + execution.time.0: ${execution.time.0} + number.of.component.times: ${number.of.component.times} + + + + + + + + + + + + + + cleanlog_errors: ${cleanlog_errors} + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + empty_nocleanlog_errors: ${empty_nocleanlog_errors} + + + + + + + + + + + + + + + + + + + + + + warnings: ${warnings} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + errors: ${errors} + + + + + + + + + + + + + + + + + + + + errors: ${errors} + + + + + + + test-metadatacount-error-with-missing-files + + + + + + + + + + + + + + error: ${errors} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + component.count: ${component.count} + component.0.unit.id: ${component.0.unit.id} + component.0.unit.location: ${component.0.unit.location} + component.1.unit.id: ${component.1.unit.id} + component.1.unit.location: ${component.1.unit.location} + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_sysdef_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_sysdef_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,97 @@ + + + Helium metadata text input unittests. + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + + + + + + + + + + + dbPath: ${test.temp.dir}/metadata_db + ant: antProperties() + + + + package.count: ${package.count} + collection.count: ${collection.count} + component.count: ${component.count} + unit.count: ${unit.count} + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_text_input.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/antunit/test_text_input.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,67 @@ + + + Helium metadata text input unittests. + + + + + + + ---=====================================--- + + + + + + + + ---=====================================--- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/antunit/test_validity.ant.xml --- a/buildframework/helium/sf/java/metadata/tests/antunit/test_validity.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ - - - - Helium Antlib diamonds unittests. - - - - - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/IDO_lcdo_tb92-ci_MCL.92.64_ant_build.log --- a/buildframework/helium/sf/java/metadata/tests/data/IDO_lcdo_tb92-ci_MCL.92.64_ant_build.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -zip-binaries: - [length] t:\output\temp_build_files\IDO_lcdo_tb92-ci_MCL.92.64_nonhw_binaries_includefile.txt does not exist - -ats-test: -log file not exists -log file not exists - -ats-aste: -log file not exists -log file not exists - -ido-zip-wa: - [echo] Zipping wa - [zip] Building zip: t:\output\src\IDO_lcdo_tb92-ci_MCL.92.64_sources.zip - -build-log-extracts: -Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64.sysdef_GenxmlMerge.log... -Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build.sbs_ant_output.log... -Extracted log is uptodate: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build_compile.log -Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_ant_build.log... -Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_bom.log... -Extracted log is uptodate: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_ccm_get_input.log -Extracted log is uptodate: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_validate-policy.log - -log-merge: -[dependset] Warning: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_bom.log.xml modified in the future. - [echo] Merging all *.log.xml files - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64.sysdef_GenxmlMerge.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build.sbs_ant_output.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build_compile.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_ant_build.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_bom.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_ccm_get_input.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_info.log.xml into summary. - [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_validate-policy.log.xml into summary. - -render-log-summary: - [fmpp] File processed. - -build-log-summary: - -prep-publish: - -ido-publish-sites: - [script] Publishing \\vagrp006\GROUPS5\SP_IDO\LCDo\CI_builds - [script] execute - [IDO] data.drive.letter is already defined to E - [IDO] Build.drive: t:, the drive exists: true - [IDO] Build drive substing skipped - [IDO] data.drive.letter is already defined to E - [IDO] Category folder name: idos - [IDO] Type: ido - [IDO] Updated build.family to ido_lcdo_tb92-ci_sbs-ec_sbs-ec -[IDO] Using S60 version: tb92 -Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro -Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro - -prep-publish: - [mkdir] Created dir: \\vagrp006\GROUPS5\SP_IDO\LCDo\CI_builds\tb92-ci\MCL.92.64 - -publish: - [copy] Copying 26 files to \\vagrp006\GROUPS5\SP_IDO\LCDo\CI_builds\tb92-ci\MCL.92.64 - [echo] ERROR: There are 5214 changes in the publish directory. Uploading the changes again... - -ido-recopy: - [IDO] data.drive.letter is already defined to E - [IDO] Build.drive: t:, the drive exists: true - [IDO] Build drive substing skipped - [IDO] data.drive.letter is already defined to E - [IDO] Category folder name: idos - [IDO] Type: ido - [IDO] Updated build.family to ido_lcdo_tb92-ci_sbs-ec_sbs-ec -[IDO] Using S60 version: tb92 -Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro -Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro - -ido-create-ado-mapping: -[hlm:referenceToFileMacro] Creating t:\output\temp_build_files\null903042207.txt using system.definition.files -[hlm:referenceToFileMacro] E:\Build_E\idoconfiguration\running\common\sysdefs\build.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\btservices\layers.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\printing\layers.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\remoteconn\layers.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\usbservices\layers.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain_osext\LC_Domain_osext\btaudioadaptation_stub\layers.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain_osext\LC_Domain_osext\shortlinksrv\layers.sysdef.xml -[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\SystemSW_Domain_OSExt\SystemSW_Domain_OSExt\devicesrv\layers.sysdef.xml - -ido-prep-copy: - [fmpp] File processed. - -all: - [delete] Deleting directory t:\sf\app\printing_old - [delete] Deleting directory t:\sf\mw\btservices_old - [delete] Deleting directory t:\sf\mw\usbservices_old - [delete] Deleting directory t:\sf\mw\remoteconn_old - [delete] Deleting directory t:\sf\os\devicesrv_old - [delete] Deleting directory t:\sf\adaptation\stubs\btaudioadaptation_stub_old - [delete] Deleting directory t:\sf\os\shortlinksrv_old - [fmpp] File processed. - -all: - [mkdir] Created dir: t:\sf\app\printing - [mkdir] Created dir: t:\sf\adaptation\stubs\btaudioadaptation_stub - [mkdir] Created dir: t:\sf\os\shortlinksrv - [mkdir] Created dir: t:\sf\mw\remoteconn - [mkdir] Created dir: t:\sf\os\devicesrv - [mkdir] Created dir: t:\sf\mw\btservices - [mkdir] Created dir: t:\sf\mw\usbservices - [copy] Copying 30 files to t:\sf\adaptation\stubs\btaudioadaptation_stub - [copy] Copying 359 files to t:\sf\os\shortlinksrv - [copy] Copying 496 files to t:\sf\app\printing - [copy] Copying 1584 files to t:\sf\mw\remoteconn - [copy] Copying 2341 files to t:\sf\mw\btservices - [copy] Copying 1767 files to t:\sf\mw\usbservices - [copy] Copying 6833 files to t:\sf\os\devicesrv - -IDO-additions.final: -Deferred failure: Yes - -BUILD FAILED - -compileSignal: Expected result was 0, actual result was 1 : compile-signal -E:\Build_E\idoconfiguration\running\common\ido-additions.ant.xml:110: if=pending.failure - at com.nokia.helium.core.ant.HeliumExecutor.executeTargets(HeliumExecutor.java:98) - at org.apache.tools.ant.Project.executeTargets(Project.java:1181) - at org.apache.tools.ant.Main.runBuild(Main.java:698) - at org.apache.tools.ant.Main.startAnt(Main.java:199) - at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) - at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/abld/parsing_result.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/abld/parsing_result.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ +<#-- +============================================================================ +Name : whatlog_result.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +number.of.logs=${table_info['jpasingle']['select count(l.path) path from LogFile l'][0]} +number.of.metadata.entries=${table_info['jpasingle']['select count(e) from MetadataEntry e'][0]} +number.of.execution.times=${table_info['jpasingle']['select count(e) path from ExecutionTime e'][0]} +number.of.components=${table_info['jpasingle']['select count(c) path from Component c'][0]} +<#assign c = 0 /> +<#list table_info['jpa']['select e from ExecutionTime e'] as e> +execution.time.${c}=${e.time} +<#assign c = c + 1 /> + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/abld/sample_abld.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/abld/sample_abld.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,486 @@ + +x:\>set +ALLUSERSPROFILE=C:\Documents and Settings\All Users +ANT_ARGS=-lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\helium-antlib\bin" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\java\lib" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\antlibs" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\antlibs\internal" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\jep_1.6_2.5" -logger com.nokia.ant.HeliumLogger -listener com.nokia.helium.diamonds.ant.HeliumListener -listener com.nokia.ant.listener.internaldata.Listener -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.ant.listener.TracingLogger +ANT_CMD_LINE_ARGS=-Dhelium.dir "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium" -listener nokia.ant.XmlLogger -DXmlLogger.file E:\BUILD_E\ido-config-cc-svn\cruisecontrol/../robot/log.xml -Dcclastbuildtimestamp 20090702114112 "-Dcvstimestamp=2009-07-02 12:11:44 GMT" -Dbuildforced false -Dcclastgoodbuildtimestamp 20090606000000 -Dcctimestamp 20090702131144 -Dlabel build.33 -Dprojectname ido_abs_tb92-nightly -Dlastbuildsuccessful false -Dbuild.system ec-helium -Dconfiguration.dir E:\BUILD_E\ido-config-cc-svn\cruisecontrol/../idos/abs/branches/tb92-nightly -Dbuild.drive x: -Ds60.grace.cache E:\BUILD_E\ido-config-cc-svn\build/ido_abs_tb92-nightly_grace_cache.txt -Dskip.codescanner true -Dcc.output.dir E:\BUILD_E\ido-config-cc-svn\build -buildfile E:\BUILD_E\ido-config-cc-svn\cruisecontrol/config/wrapper.xml test-publish-prop ido-build +ANT_HOME=C:\APPS\ant_1.7 +ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml +APPDATA=C:\Documents and Settings\username\Application Data +ARMROOT=\ +ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 593] +CCDIR=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\ +CC_BAT=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\real_cruisecontrol.bat +CC_OPTS= -Ddashboard.config=E:\BUILD_E\ido-config-cc-svn\build\helium-dashboard-config.xml -Xms512m -Xmx1024m +CLASSPATH=e:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib;%CLASSPATH% +CLIENTNAME=4GBD01728 +ClusterLog=C:\EESP\Cluster\cluster.log +CMTHOME=C:\APPS\cmt +CommonProgramFiles=C:\Program Files\Common Files +COMPUTERNAME=FASYM011 +ComSpec=C:\EESP\system32\cmd.exe +COPYCMD=/y +CRUISE_PATH=C:\Apps\j2sdk_1.6.0_02\lib\tools.jar +CTCHOME=C:\APPS\ctc +DERBY_HOME=C:\APPS\j2sdk_1.6.0_02\JavaDB +DIAMONDS_ANT_ARGS= -listener com.nokia.helium.diamonds.ant.HeliumListener +EMAKEFLAGS=--no-print-directory --emake-volatile=.def,.info,.class,.mmp --emake-reg-roots=-\HKEY_CLASSES_ROOT +EMAKE_CM=fawec001 +EMAKE_EMULATION=symbian +EMAKE_ROOT=\;c:\apps +EPOCROOT=\ +EXEC="C:\Apps\j2sdk_1.6.0_02\bin\java" -Ddashboard.config=E:\BUILD_E\ido-config-cc-svn\build\helium-dashboard-config.xml -Xms512m -Xmx1024m -Djmx.remote.x.server.connection.timeout=-1 -Djmx.remote.x.client.connection.check.period=0 -jar "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib\cruisecontrol-launcher.jar" -webapppath E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl/webapps/cruisecontrol -dashboard E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl/webapps/dashboard -webport 8080 -rmiport 1099 +FILTERWHAT_FILE=\output\logs\about_what.log +FLEXLM_BATCH=1 +FLEXLM_TIMEOUT=900000 +FP_NO_HOST_CHECK=NO +HELIUM_CACHE_DIR=C:\DOCUME~1\username\LOCALS~1\Temp\2\helium\username +HELIUM_HOME=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium +HLM_ENABLE_MEM_TRACING=1 +HLM_MEM_TRACING_ANT_ARGS= -listener com.nokia.ant.listener.TracingLogger +HOME=h:\ +HOMEDRIVE=C: +HOMEPATH=\Documents and Settings\username +include=C:\apps\msvc6\VC98\ATL\INCLUDE;C:\apps\msvc6\VC98\INCLUDE;C:\apps\msvc6\VC98\MFC\INCLUDE;C:\apps\msvc6\VC98\atl\include;C:\apps\msvc6\VC98\mfc\include;C:\apps\msvc6\VC98\include +INTERNAL_DATA_ANT_ARGS= -listener com.nokia.ant.listener.internaldata.Listener +JAVA_1_3_1_HOME=C:\APPS\j2sdk_1.3.1_06 +JAVA_HOME=C:\Apps\j2sdk_1.6.0_02 +JAVA_PATH="C:\Apps\j2sdk_1.6.0_02\bin\java" +JEP_HOME=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\jep_1.6_2.5 +LAUNCHER=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib\cruisecontrol-launcher.jar +lib=C:\apps\msvc6\VC98\LIB;C:\apps\msvc6\VC98\MFC\LIB;C:\apps\msvc6\VC98\mfc\lib;C:\apps\msvc6\VC98\lib +LIBDIR=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib +LM_LICENSE_FILE=C:\APPS\licenses\emea.dat;1700@fake1.domain.invalid;C:\APPS\licenses\PCLint.dat;6969@sfake2.domain.invalid; +LOGONSERVER=\\CAWDC101 +MSDevDir=C:\apps\msvc6\Common\msdev98 +MSVCDir=C:\apps\msvc6\VC98 +MSVC_ENV_BAT=c:\APPS\msvc6\VC98\Bin\VCVARS32.BAT +MWCSym2Includes=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK +MWSym2Libraries=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs +MWSym2LibraryFiles=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; +NOKIA_LICENSE_FILE=C:\APPS\licenses\emea.dat; +NUMBER_OF_PROCESSORS=4 +OS=Windows_NT +Path=C:\apps\msvc6\Common\msdev98\BIN;C:\apps\msvc6\VC98\BIN;C:\apps\msvc6\Common\TOOLS\WINNT;C:\apps\msvc6\Common\TOOLS;e:\BUILD_E\ido-config-cc-svn\sbs\bin;e:\BUILD_E\slick-svn\bin;c:\ECloud\i686_win32\bin;C:\Program Files\HP\NCU;c:\apps\actperl\bin\;c:\apps\rvct22_593\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86build\symbian_tools\command_line_tools;c:\apps\symdec;c:\apps\actpython\.;C:\Symbian\SITK\stat\bin;C:\Symbian\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:\Symbian\SITK\ucc\bin;C:\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\TestDriverService\bin;C:\Symbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver\product;C:\Symbian\SITK\imgcheck;C:\Symbian\SITK\SystemModelGenerator;C:\Symbian\SITK/sbs/bin;;c:\program files\hp\ncu;c:\program files\windows resource kits\tools\;c:\eesp\system32;c:\eesp\system32\wbem;c:\apps\msvc6\common\tools\winnt;c:\apps\msvc6\common\msdev98\bin;c:\apps\msvc6\vc98\bin;c:\progra~1\winzip;c:\apps\wget;c:\apps\ant_1.7\bin;c:\apps\understand\bin\pc-win95;c:\etpwin\system32;c:\etpwin\system32\wbem;c:\apps\sbs\bin;c:\apps\pclint;c:\apps\cltools;c:\apps\codescanner;c:\apps\symrec;c:\apps\gracecli\bin;c:\apps\7zip;c:\apps\ctc;c:\apps\unzip;c:\apps\bc;c:\apps\cmt\;c:\apps\j2sdk_1.6.0_02;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\jep_1.6_2.5;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\bin;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\unxutils;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\filedisk;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\info-zip;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\Subversion\bin;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\graphviz\bin;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\LSC_5.2;\tools;\tools\ncp_tools;C:\APPS\ctc;C:\EESP\system32;C:\EESP;C:\EESP\System32\Wbem\;C:\EESP\system32;C:\EESP;C:\EESP\System32\Wbem;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem +PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw +PERL=C:\APPS\actperl\bin\perl.exe +PERL5LIB=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\packages +PID=8296 +ppd_tools=\tools\ +PROCESSOR_ARCHITECTURE=x86 +PROCESSOR_IDENTIFIER=x86 Family 15 Model 5 Stepping 10, AuthenticAMD +PROCESSOR_LEVEL=15 +PROCESSOR_REVISION=050a +ProgramFiles=C:\Program Files +PROMPT=$P$G +PYTHONPATH=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\python\lib\2.5;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\python\lib;e:\BUILD_E\ido-config-cc-svn\sbs\python +RVCT22BIN=C:\APPS\rvct22_593\bin +RVCT22INC=C:\APPS\rvct22_593\include +RVCT22LIB=C:\APPS\rvct22_593\lib +RVCT22_ASMOPT=--licretry --fastlicense --sitelicense +RVCT22_CCOPT=--licretry --fastlicense --sitelicense +RVCT22_LINKOPT=--licretry --fastlicense --sitelicense +SBS_HOME=e:\BUILD_E\ido-config-cc-svn\sbs +SESSIONNAME=RDP-Tcp#22 +SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor +SITK_PATHS=C:\Symbian\SITK\stat\bin;C:\Symbian\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:\Symbian\SITK\ucc\bin;C:\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\TestDriverService\bin;C:\Symbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver\product;C:\Symbian\SITK\imgcheck;C:\Symbian\SITK\SystemModelGenerator;C:\Symbian\SITK/sbs/bin; +spp_tools=\tools\ +SYMBIANBUILD_DEPENDENCYOFF=1 +SYMSEE_VERSION=9.1.0 +SystemDrive=C: +SystemRoot=C:\EESP +TEAM=xxxxxx +TEMP=C:\DOCUME~1\username\LOCALS~1\Temp\2 +TESTED_ANT=C:\APPS\ant_1.7 +TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 +TMP=C:\DOCUME~1\username\LOCALS~1\Temp\2 +USERDNSDOMAIN=fake.domain.invalid +USERDOMAIN=userdomain +USERNAME=username +USERPROFILE=C:\Documents and Settings\username +windir=C:\EESP +_JAVACMD=C:\Apps\j2sdk_1.6.0_02\bin\java.exe +_USE_CLASSPATH=yes + +x:\>emake --emake-build-label=ido_abs_tb92-nightly_5.2.33.dfs_build --emake-class=default --emake-priority=normal --emake-maxagents=0 --emake-job-limit=0 --emake-mem-limit=1000000000 --emake-history=merge --emake-annodetail=basic,history,file,waiting --emake-annofile=x:\output\logs\ido_abs_tb92-nightly_5.2.33.dfs_build.emake.anno.xml --emake-historyfile=x:/emake.data --emake-debug=g --emake-logfile=x:\output\logs\ido_abs_tb92-nightly_5.2.33.dfs_build.emake.g.dlog --emake-root=\;c:\apps;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium --emake-autodepend=1 -k -i -f x:/dfs_build.make LOGBUILDTIME="" VERBOSE="" SAVESPACE="" dfs_build +WARNING EC1137: Unrecognized option '--no-print-directory' in EMAKEFLAGS. +Starting build: 50896 +WARNING EC1137: Unrecognized option '--no-print-directory' in EMAKEFLAGS. +===------------------------------------------------- +=== dfs_build +===------------------------------------------------- +=== dfs_build started Thu Jul 2 13:13:58 2009 +emake -f dfs_build.make dfs_build-bldmake_bldfiles +make[1]: Entering directory `x:/' +=== dfs_build == \sf/os/graphics/group +-- bldmake bldfiles +++ Started at Thu Jul 2 13:13:58 2009 ++++ HiRes Start 1246536838.91662 +cd \sf/os/graphics/group && bldmake bldfiles -keepgoing ++++ HiRes End 1246536840.97909 +++ Finished at Thu Jul 2 13:14:01 2009 +=== dfs_build == \sf/os/textandloc/group +-- bldmake bldfiles +++ Started at Thu Jul 2 13:13:58 2009 ++++ HiRes Start 1246536839.05724 +cd \sf/os/textandloc/group && bldmake bldfiles -keepgoing +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 +WARNING: Should install MSVC6 Service Pack 3 ++++ HiRes End 1246536842.55719 +++ Finished at Thu Jul 2 13:14:02 2009 +make[1]: Leaving directory `x:/' +emake -f dfs_build.make dfs_build-abld_export +make[1]: Entering directory `x:/' +=== dfs_build == \sf/os/graphics/group +-- abld export +++ Started at Thu Jul 2 13:14:02 2009 ++++ HiRes Start 1246536843.01031 +cd \sf/os/graphics/group && abld export -keepgoing + emake -r -k -f "\EPOC32\BUILD\sf\os\graphics\group\EXPORT.make" EXPORT VERBOSE=-s KEEPGOING=-k +make[2]: Entering directory `X:/sf/os/graphics/group' +copy "\sf\os\graphics\graphics_plat\openvg_binding_api\inc\vg\vgcontext.h" "\epoc32\include\platform\vg\vgcontext.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphics_plat\openvg_binding_api\inc\vg\vgcontext_symbian.h" "\epoc32\include\platform\vg\vgcontext_symbian.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphics_plat\m3g_core_api\inc\M3G\m3g_core.h" "\epoc32\include\platform\M3G\m3g_core.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\3d_opengl_es_1_1\group\opengles_nokia.iby" "\epoc32\rom\include\opengles_nokia.iby" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\2d_openvg_1_1\rom\openvg_nokia.iby" "\epoc32\rom\include\core\os\openvg_nokia.iby" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\group\egl_sw_gce.iby" "\epoc32\rom\include\egl_sw_gce.iby" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\group\egl_sw_nongce.iby" "\epoc32\rom\include\egl_sw_nongce.iby" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\eglInternalApi.h" "\epoc32\include\platform\eglInternalApi.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\oglcontextapi.h" "\epoc32\include\platform\oglContextApi.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\ovgContextApi.h" "\epoc32\include\platform\ovgContextApi.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\EGL\eglWrapper.h" "\epoc32\include\platform\EGL\eglWrapper.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\src\symbian\eglsymbianpaniccodes.h" "\epoc32\include\platform\eglsymbianpaniccodes.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\libs\hg\3.1\hgDefs.h" "\epoc32\include\platform\hgDefs.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\libs\hg\3.1\hgPublicDefs.h" "\epoc32\include\platform\hgPublicDefs.h" + 1 file(s) copied. +copy "\sf\os\graphics\graphicsaccelaration\vgi\rom\libvgi.iby" "\epoc32\rom\include\core\os\libvgi.iby" + 1 file(s) copied. +copy "\sf\os\graphics\m3g\m3gcore11\rom\m3gcore.iby" "\epoc32\rom\include\core\os\m3gcore.iby" + 1 file(s) copied. +make[2]: Leaving directory `X:/sf/os/graphics/group' ++++ HiRes End 1246536843.8853 +++ Finished at Thu Jul 2 13:14:03 2009 +=== dfs_build == \sf/os/textandloc/group +-- abld export +++ Started at Thu Jul 2 13:14:02 2009 ++++ HiRes Start 1246536843.04156 +cd \sf/os/textandloc/group && abld export -keepgoing + emake -r -k -f "\EPOC32\BUILD\sf\os\textandloc\group\EXPORT.make" EXPORT VERBOSE=-s KEEPGOING=-k +make[2]: Entering directory `X:/sf/os/textandloc/group' +Creating \sf\os\textandloc\inc +copy "\sf\os\textandloc\textandloc_plat\findutil_api\inc\FindUtil.h" "\epoc32\include\platform\FindUtil.h" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_plat\japanese_language_utilities_api\inc\jplangutil.h" "\epoc32\include\platform\mw\jplangutil.h" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_plat\character_conversion_nonpublic_api\inc\JapaneseCharConv.h" "\epoc32\include\platform\JapaneseCharConv.h" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_plat\sortutil_api\inc\SortUtil.h" "\epoc32\include\platform\SortUtil.h" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\GBK.H" "\epoc32\include\GBK.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\JISX0208.H" "\epoc32\include\JISX0208.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\GB2312.H" "\epoc32\include\GB2312.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CharacterSetConverter.h" "\epoc32\include\CharacterSetConverter.h" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CONVDATA.H" "\epoc32\include\CONVDATA.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\JISX0201.H" "\epoc32\include\JISX0201.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\UTF.H" "\epoc32\include\UTF.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\JISX0212.H" "\epoc32\include\JISX0212.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CharacterSetConverter.inl" "\epoc32\include\CharacterSetConverter.inl" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\BIG5.H" "\epoc32\include\BIG5.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CONVNAMES.H" "\epoc32\include\CONVNAMES.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CHARCONV.H" "\epoc32\include\CHARCONV.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\SHIFTJIS.H" "\epoc32\include\SHIFTJIS.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_plugin_provider_api\inc\CONVUTILS.H" "\epoc32\include\CONVUTILS.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\character_conversion_plugin_provider_api\inc\CONVGENERATEDCPP.H" "\epoc32\include\CONVGENERATEDCPP.H" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\directory_localizer_api\inc\DirectoryLocalizer.rh" "\epoc32\include\mw\DirectoryLocalizer.rh" + 1 file(s) copied. +copy "\sf\os\textandloc\textandloc_pub\directory_localizer_api\inc\CDirectoryLocalizer.h" "\epoc32\include\mw\CDirectoryLocalizer.h" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\localizer\rom\DirectoryLocalizer.iby" "\epoc32\rom\include\core\mw\directorylocalizer.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\localizer\rom\DirectoryLocalizerResources.iby" "\epoc32\rom\include\language\mw\directorylocalizerresources.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\localizer\loc\DirectoryLocalizer.loc" "\epoc32\include\platform\mw\loc\sc\directorylocalizer.loc" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1250.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1250.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1251.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1251.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1252.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1252.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1253.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1253.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1254.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1254.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1255.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1255.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1256.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1256.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1257.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1257.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win874.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win874.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\TIS_620.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\TIS_620.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8U.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\KOI8U.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8R.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\KOI8R.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1258.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1258.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iscii.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\iscii.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\EUCKR.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\EUCKR.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iso2022kr.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\iso2022kr.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\ksc5601.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\ksc5601.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1250.snm" "\epoc32\data\z\Resource\charconv\Win1250.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1251.snm" "\epoc32\data\z\Resource\charconv\Win1251.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1252.snm" "\epoc32\data\z\Resource\charconv\Win1252.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1253.snm" "\epoc32\data\z\Resource\charconv\Win1253.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1254.snm" "\epoc32\data\z\Resource\charconv\Win1254.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1255.snm" "\epoc32\data\z\Resource\charconv\Win1255.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1256.snm" "\epoc32\data\z\Resource\charconv\Win1256.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1257.snm" "\epoc32\data\z\Resource\charconv\Win1257.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win874.snm" "\epoc32\data\z\Resource\charconv\Win874.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\TIS_620.snm" "\epoc32\data\z\Resource\charconv\TIS_620.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8U.snm" "\epoc32\data\z\Resource\charconv\KOI8U.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8R.snm" "\epoc32\data\z\Resource\charconv\KOI8R.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1258.snm" "\epoc32\data\z\Resource\charconv\Win1258.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iscii.snm" "\epoc32\data\z\Resource\charconv\iscii.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\EUCKR.snm" "\epoc32\data\z\Resource\charconv\EUCKR.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iso2022kr.snm" "\epoc32\data\z\Resource\charconv\iso2022kr.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\ksc5601.snm" "\epoc32\data\z\Resource\charconv\ksc5601.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPlugin.iby" "\epoc32\rom\include\core\mw\charconvplugin.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPluginPictograph.IBY" "\epoc32\rom\include\core\mw\charconvpluginpictograph.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPluginPictograph_Variant.iby" "\epoc32\rom\include\customer\mw\charconvpluginpictograph_Variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPlugin_Variant.IBY" "\epoc32\rom\include\customer\mw\charconvplugin_Variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\findutil\rom\Findutil.iby" "\epoc32\rom\include\core\mw\findutil.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\findutil\rom\Findutil_Variant.iby" "\epoc32\rom\include\customer\mw\findutil_Variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\numbergrouping\rom\NumberGrouping.iby" "\epoc32\rom\include\core\mw\numbergrouping.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\numbergrouping\conf\numbergrouping.confml" "\epoc32\rom\config\confml_data\s60\numbergrouping.confml" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\numbergrouping\conf\numbergrouping_101F8775.crml" "\epoc32\rom\config\confml_data\s60\numbergrouping_101F8775.crml" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\gamerecognizer\rom\GameRecognizer.iby" "\epoc32\rom\include\core\mw\gamerecognizer.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\jplangutil\rom\JPLangUtil.iby" "\epoc32\rom\include\core\mw\jplangutil.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\sortutil\rom\Sortutil.iby" "\epoc32\rom\include\core\mw\sortutil.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\sortutil\rom\SortUtil_Variant.iby" "\epoc32\rom\include\customer\mw\sortutil_Variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\aknjapanesereading\rom\AknJapaneseReading.iby" "\epoc32\rom\include\core\mw\aknjapanesereading.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVTOOL.BAT" "\epoc32\tools\CNVTOOL.BAT" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\SNMTOOL.BAT" "\epoc32\tools\SNMTOOL.BAT" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV.BAT" "\epoc32\tools\CHARCONV.BAT" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV.PL" "\epoc32\tools\CHARCONV.PL" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVTOOL.PL" "\epoc32\tools\CNVTOOL.PL" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\SNMTOOL.PL" "\epoc32\tools\SNMTOOL.PL" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\PARSER.PM" "\epoc32\tools\PARSER.PM" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\WRITER.PM" "\epoc32\tools\WRITER.PM" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\UTF.PM" "\epoc32\tools\UTF.PM" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV_EXE.IPR" "\epoc32\engdoc\tools\CHARCONV_EXE.IPR" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV_PERLTOOLS.IPR" "\epoc32\engdoc\tools\CHARCONV_PERLTOOLS.IPR" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVAPI.RTF" "\epoc32\engdoc\charconv\CNVAPI.RTF" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVTOOL.RTF" "\epoc32\engdoc\charconv\CNVTOOL.RTF" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\SNMTOOL.RTF" "\epoc32\engdoc\charconv\SNMTOOL.RTF" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\AUTODETECT.RTF" "\epoc32\engdoc\charconv\AUTODETECT.RTF" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\big5.dat" "\epoc32\tools\charconv\big5.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\cp1252.dat" "\epoc32\tools\charconv\cp1252.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gb12345.dat" "\epoc32\tools\charconv\gb12345.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gb2312.dat" "\epoc32\tools\charconv\gb2312.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gbk.dat" "\epoc32\tools\charconv\gbk.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88591.dat" "\epoc32\tools\charconv\iso88591.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885910.dat" "\epoc32\tools\charconv\iso885910.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885913.dat" "\epoc32\tools\charconv\iso885913.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885914.dat" "\epoc32\tools\charconv\iso885914.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885915.dat" "\epoc32\tools\charconv\iso885915.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88592.dat" "\epoc32\tools\charconv\iso88592.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88593.dat" "\epoc32\tools\charconv\iso88593.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88594.dat" "\epoc32\tools\charconv\iso88594.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88595.dat" "\epoc32\tools\charconv\iso88595.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88596.dat" "\epoc32\tools\charconv\iso88596.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88597.dat" "\epoc32\tools\charconv\iso88597.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88598.dat" "\epoc32\tools\charconv\iso88598.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88599.dat" "\epoc32\tools\charconv\iso88599.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\shiftjis.dat" "\epoc32\tools\charconv\shiftjis.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\shiftjisdirectmap.dat" "\epoc32\tools\charconv\shiftjisdirectmap.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gsm7_turkish_single.dat" "\epoc32\tools\charconv\gsm7_turkish_single.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\turkish_locking_gsm7ext.dat" "\epoc32\tools\charconv\turkish_locking_gsm7ext.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\turkish_locking_single.dat" "\epoc32\tools\charconv\turkish_locking_single.dat" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\include\PictographObserver.h" "\sf\os\textandloc\inc\PictographObserver.h" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\include\CnvPictographShared.h" "\sf\os\textandloc\inc\CnvPictographShared.h" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\include\CnvShiftJisDirectmap.h" "\sf\os\textandloc\inc\CnvShiftJisDirectmap.h" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\snm\basic.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\basic.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\snm\basic.snm" "\epoc32\data\z\Resource\charconv\basic.snm" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV.IBY" "\epoc32\rom\include\core\mw\charconv.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_SIMPLFIED.IBY" "\epoc32\rom\include\customer\mw\charconv_chinese_simplfied.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_TRADITIONAL.IBY" "\epoc32\rom\include\customer\mw\charconv_chinese_traditional.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CODEPAGE.iby" "\epoc32\rom\include\core\mw\charconv_codepage.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_ISO8859X.IBY" "\epoc32\rom\include\core\mw\charconv_iso8859x.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_JAPANESE.IBY" "\epoc32\rom\include\customer\mw\charconv_japanese.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\Charconv_Pictographs_Variant.Iby" "\epoc32\rom\include\customer\mw\charconv_pictographs_variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\charconv_gsm7_turkish_Variant.iby" "\epoc32\rom\include\customer\mw\charconv_gsm7_turkish_Variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\charconv_gsm7_turkish_Variant.iby" "\epoc32\rom\include\charconv_gsm7_turkish_Variant.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV.IBY" "\epoc32\rom\include\charconv.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CharConv_All_Plugins.iby" "\epoc32\rom\include\charconv_all_plugins.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_SIMPLFIED.IBY" "\epoc32\rom\include\charconv_chinese_simplfied.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_TRADITIONAL.IBY" "\epoc32\rom\include\charconv_chinese_traditional.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_JAPANESE.IBY" "\epoc32\rom\include\charconv_japanese.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CODEPAGE.iby" "\epoc32\rom\include\charconv_codepage.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_ISO8859X.IBY" "\epoc32\rom\include\charconv_iso8859x.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\charconv_gsm7_turkish.iby" "\epoc32\rom\include\charconv_gsm7_turkish.iby" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\inlinetext\inc\inlinetextbase.h" "\epoc32\include\platform\mw\inlinetextbase.h" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\inlinetext\inc\inlinetextcompositesource.h" "\epoc32\include\platform\mw\inlinetextcompositesource.h" + 1 file(s) copied. +copy "\sf\os\textandloc\charconvfw\inlinetext\inc\inlinetextnomatchesindicatorsource.h" "\epoc32\include\platform\mw\inlinetextnomatchesindicatorsource.h" + 1 file(s) copied. +make[2]: Leaving directory `X:/sf/os/textandloc/group' ++++ HiRes End 1246536844.10405 +++ Finished at Thu Jul 2 13:14:04 2009 +make[1]: Leaving directory `x:/' +emake -f dfs_build.make dfs_build-abld_makefile-tools +make[1]: Entering directory `x:/' +=== dfs_build == \sf/os/graphics/group +-- abld makefile +++ Started at Thu Jul 2 13:14:05 2009 ++++ HiRes Start 1246536845.63642 +cd \sf/os/graphics/group && abld makefile -keepgoing tools +This project does not support platform or program "TOOLS" ++++ HiRes End 1246536847.1364 +++ Finished at Thu Jul 2 13:14:07 2009 +=== dfs_build == \sf/os/textandloc/group +-- abld makefile +++ Started at Thu Jul 2 13:14:05 2009 ++++ HiRes Start 1246536845.6208 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/ant/package_ant_build.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/ant/package_ant_build.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,129 @@ +zip-binaries: + [length] t:\output\temp_build_files\IDO_lcdo_tb92-ci_MCL.92.64_nonhw_binaries_includefile.txt does not exist + +ats-test: +log file not exists +log file not exists + +ats-aste: +log file not exists +log file not exists + +ido-zip-wa: + [echo] Zipping wa + [zip] Building zip: t:\output\src\IDO_lcdo_tb92-ci_MCL.92.64_sources.zip + +build-log-extracts: +Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64.sysdef_GenxmlMerge.log... +Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build.sbs_ant_output.log... +Extracted log is uptodate: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build_compile.log +Converting t:\output\logs\package_ant_build.log... +Converting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_bom.log... +Extracted log is uptodate: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_ccm_get_input.log +Extracted log is uptodate: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_validate-policy.log + +log-merge: +[dependset] Warning: t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_bom.log.xml modified in the future. + [echo] Merging all *.log.xml files + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64.sysdef_GenxmlMerge.log.xml into summary. + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build.sbs_ant_output.log.xml into summary. + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64__armv5_winscw_armv5.test_dfs_build_compile.log.xml into summary. + [echo] Inserting t:\output\logs\package_ant_build.log.xml into summary. + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_bom.log.xml into summary. + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_ccm_get_input.log.xml into summary. + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_info.log.xml into summary. + [echo] Inserting t:\output\logs\IDO_lcdo_tb92-ci_MCL.92.64_validate-policy.log.xml into summary. + +render-log-summary: + [fmpp] File processed. + +build-log-summary: + +prep-publish: + +ido-publish-sites: + [script] Publishing \\vagrp006\GROUPS5\SP_IDO\LCDo\CI_builds + [script] execute + [IDO] data.drive.letter is already defined to E + [IDO] Build.drive: t:, the drive exists: true + [IDO] Build drive substing skipped + [IDO] data.drive.letter is already defined to E + [IDO] Category folder name: idos + [IDO] Type: ido + [IDO] Updated build.family to ido_lcdo_tb92-ci_sbs-ec_sbs-ec +[IDO] Using S60 version: tb92 +Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro +Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro + +prep-publish: + [mkdir] Created dir: \\vagrp006\GROUPS5\SP_IDO\LCDo\CI_builds\tb92-ci\MCL.92.64 + +publish: + [copy] Copying 26 files to \\vagrp006\GROUPS5\SP_IDO\LCDo\CI_builds\tb92-ci\MCL.92.64 + [echo] ERROR: There are 5214 changes in the publish directory. Uploading the changes again... + +ido-recopy: + [IDO] data.drive.letter is already defined to E + [IDO] Build.drive: t:, the drive exists: true + [IDO] Build drive substing skipped + [IDO] data.drive.letter is already defined to E + [IDO] Category folder name: idos + [IDO] Type: ido + [IDO] Updated build.family to ido_lcdo_tb92-ci_sbs-ec_sbs-ec +[IDO] Using S60 version: tb92 +Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro +Trying to override old definition of task http://www.nokia.com/helium:diskspaceMacro + +ido-create-ado-mapping: +[hlm:referenceToFileMacro] Creating t:\output\temp_build_files\null903042207.txt using system.definition.files +[hlm:referenceToFileMacro] E:\Build_E\idoconfiguration\running\common\sysdefs\build.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\btservices\layers.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\printing\layers.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\remoteconn\layers.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain\LC_Domain\usbservices\layers.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain_osext\LC_Domain_osext\btaudioadaptation_stub\layers.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\LC_Domain_osext\LC_Domain_osext\shortlinksrv\layers.sysdef.xml +[hlm:referenceToFileMacro] E:\Build_E\ido_wa\IDO_lcdo_tb92-ci\SystemSW_Domain_OSExt\SystemSW_Domain_OSExt\devicesrv\layers.sysdef.xml + +ido-prep-copy: + [fmpp] File processed. + +all: + [delete] Deleting directory t:\sf\app\printing_old + [delete] Deleting directory t:\sf\mw\btservices_old + [delete] Deleting directory t:\sf\mw\usbservices_old + [delete] Deleting directory t:\sf\mw\remoteconn_old + [delete] Deleting directory t:\sf\os\devicesrv_old + [delete] Deleting directory t:\sf\adaptation\stubs\btaudioadaptation_stub_old + [delete] Deleting directory t:\sf\os\shortlinksrv_old + [fmpp] File processed. + +all: + [mkdir] Created dir: t:\sf\app\printing + [mkdir] Created dir: t:\sf\adaptation\stubs\btaudioadaptation_stub + [mkdir] Created dir: t:\sf\os\shortlinksrv + [mkdir] Created dir: t:\sf\mw\remoteconn + [mkdir] Created dir: t:\sf\os\devicesrv + [mkdir] Created dir: t:\sf\mw\btservices + [mkdir] Created dir: t:\sf\mw\usbservices + [copy] Copying 30 files to t:\sf\adaptation\stubs\btaudioadaptation_stub + [copy] Copying 359 files to t:\sf\os\shortlinksrv + [copy] Copying 496 files to t:\sf\app\printing + [copy] Copying 1584 files to t:\sf\mw\remoteconn + [copy] Copying 2341 files to t:\sf\mw\btservices + [copy] Copying 1767 files to t:\sf\mw\usbservices + [copy] Copying 6833 files to t:\sf\os\devicesrv + +IDO-additions.final: +Deferred failure: Yes + +BUILD FAILED + +compileSignal: Expected result was 0, actual result was 1 : compile-signal +E:\Build_E\idoconfiguration\running\common\ido-additions.ant.xml:110: if=pending.failure + at com.nokia.helium.core.ant.HeliumExecutor.executeTargets(HeliumExecutor.java:98) + at org.apache.tools.ant.Project.executeTargets(Project.java:1181) + at org.apache.tools.ant.Main.runBuild(Main.java:698) + at org.apache.tools.ant.Main.startAnt(Main.java:199) + at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) + at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/ant/result.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/ant/result.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,27 @@ +<#-- +============================================================================ +Name : result.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +number.of.logs=${table_info['jpasingle']['select count(l.path) from LogFile l'][0]} +number.of.components=${table_info['jpasingle']['select count(c.component) from Component c'][0]} +number.of.errors=${table_info['jpasingle']['select count(e.id) from MetadataEntry e JOIN e.severity as p WHERE p.severity=\'ERROR\''][0]} + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/build_roms_sample.log --- a/buildframework/helium/sf/java/metadata/tests/data/build_roms_sample.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,282 +0,0 @@ -Starting build: 75090 -mkdir epoc32\rombuild\temp -mkdir epoc32\rombuild\temp\config_0 -Number of threads: 4 - -++ Started at Thu May 6 13:08:38 2010 -+++ HiRes Start 1273147718 --- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_482 -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=prd rofs3-dir -iMaker 10.12.01, 23-Mar-2010. -=============================================================================== -Target: rofs3-dir Duration: 00:02 Status: OK -iMaker log = `Y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd_imaker_rofs3-dir.log' -ROFS3 dir = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3' -ROFS3 image = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd.rofs3.img' - DOESN'T EXIST -ROFS3 symbols = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd.rofs3.symbol' - DOESN'T EXIST -ROFS3 flash = `y:/output/release_flash_images/productexample/prd/customer/vanilla/RM-XXX_010.014_00.01_79.92_prd.rofs3.fpsx' - DOESN'T EXIST -------------------------------------------------------------------------------- -Total duration: 00:03 Status: OK -=============================================================================== -+++ HiRes End 1273147721 -++ Finished at Thu May 6 13:08:41 2010 -++ Started at Thu May 6 13:08:41 2010 -+++ HiRes Start 1273147721 --- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_484 -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=rnd udaerase-dir -iMaker 10.12.01, 23-Mar-2010. -=============================================================================== -Target: udaerase-dir Duration: 00:01 Status: OK -iMaker log = `Y:/output/release_flash_images/productexample/rnd/uda/udaerase/udadata/RM-XXX_010.014_79.92.2010.15_rnd_imaker_udaerase-dir.log' -UDA Erase flash = `y:/output/release_flash_images/productexample/rnd/uda/RM-XXX_010.014_79.92.2010.15_rnd.udaerase.fpsx' - DOESN'T EXIST -------------------------------------------------------------------------------- -Total duration: 00:02 Status: OK -=============================================================================== -+++ HiRes End 1273147723 -++ Finished at Thu May 6 13:08:43 2010 -++ Started at Thu May 6 13:08:41 2010 -+++ HiRes Start 1273147721 --- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_485 -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=prd udaerase-dir -iMaker 10.12.01, 23-Mar-2010. -=============================================================================== -Target: udaerase-dir Duration: 00:01 Status: OK -iMaker log = `Y:/output/release_flash_images/productexample/prd/uda/udaerase/udadata/RM-XXX_010.014_79.92_prd_imaker_udaerase-dir.log' -UDA Erase flash = `y:/output/release_flash_images/productexample/prd/uda/RM-XXX_010.014_79.92_prd.udaerase.fpsx' - DOESN'T EXIST -------------------------------------------------------------------------------- -Total duration: 00:02 Status: OK -=============================================================================== -+++ HiRes End 1273147723 -++ Finished at Thu May 6 13:08:43 2010 -++ Started at Thu May 6 13:08:41 2010 -+++ HiRes Start 1273147721 --- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_486 -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=subcon udaerase-dir -iMaker 10.12.01, 23-Mar-2010. -=============================================================================== -Target: udaerase-dir Duration: 00:01 Status: OK -iMaker log = `Y:/output/release_flash_images/productexample/subcon/uda/udaerase/udadata/RM-XXX_010.014_79.92_subcon_imaker_udaerase-dir.log' -UDA Erase flash = `y:/output/release_flash_images/productexample/subcon/uda/RM-XXX_010.014_79.92_subcon.udaerase.fpsx' - DOESN'T EXIST -------------------------------------------------------------------------------- -Total duration: 00:02 Status: OK -=============================================================================== -+++ HiRes End 1273147723 -++ Finished at Thu May 6 13:08:43 2010 -++ Started at Thu May 6 13:08:40 2010 -+++ HiRes Start 1273147720 --- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_483 -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=subcon rofs3-dir -iMaker 10.12.01, 23-Mar-2010. -=============================================================================== -Target: rofs3-dir Duration: 00:02 Status: OK -iMaker log = `Y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon_imaker_rofs3-dir.log' -ROFS3 dir = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3' -ROFS3 image = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon.rofs3.img' - DOESN'T EXIST -ROFS3 symbols = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon.rofs3.symbol' - DOESN'T EXIST -ROFS3 flash = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/RM-XXX_010.014_00.01_79.92_subcon.rofs3.fpsx' - DOESN'T EXIST -------------------------------------------------------------------------------- -Total duration: 00:03 Status: OK -=============================================================================== -+++ HiRes End 1273147724 -++ Finished at Thu May 6 13:08:44 2010 --- imaker -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=rnd core-image -++ Started at Thu May 6 13:08:45 2010 -+++ HiRes Start 1273147725.83 -imaker WORKDIR=epoc32\rombuild\temp/config_16 -f /epoc32/rom/config/ncp79/productexample/image_conf_productexample_ui.mk TYPE=rnd core-image -iMaker 10.12.01, 23-Mar-2010. -Generating file(s) for Core (ROM & ROFS1) image creation -Generating Feature manager file(s) -Creating Core (ROM & ROFS1) SOS image - -Missing file(s): -1) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(1686): Missing file: '/epoc32/data/Z/resource/apps/MPSettingsROPModel.rsc' in statement 'data=' -2) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(1824): Missing file: '/epoc32/data/Z/private/20021377/backup_registration.xml' in statement 'data=' -3) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2596): Missing file: '/epoc32/data/z/data/system/quickoffice/licenses/corolla/data.xml' in statement 'data=' -4) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2597): Missing file: '/epoc32/data/z/data/system/quickoffice/licenses/corolla/key' in statement 'data=' -5) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2614): Missing file: '/epoc32/data/Z/Resource/wappush/si.dtd' in statement 'data=' -6) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2615): Missing file: '/epoc32/data/Z/Resource/wappush/sl.dtd' in statement 'data=' -7) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2616): Missing file: '/epoc32/data/Z/Resource/wappush/si10.tok' in statement 'data=' -8) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2617): Missing file: '/epoc32/data/Z/Resource/wappush/sl10.tok' in statement 'data=' -9) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(4905): Missing file: '/epoc32/data/Z/resource/help/juicehelp.hlp' in statement 'data=' - -Warning(s): - 1) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000003f5 - 2) WARNING: the value of attribute statusflags has been overridden in original feature 0x000003f5 - 3) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000b - 4) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000b - 5) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000584 - 6) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000584 - 7) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000019b - 8) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000019b - 9) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000007 - 10) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000005ff - 11) WARNING: the value of attribute statusflags has been overridden in original feature 0x000005ff - 12) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000001f8 - 13) WARNING: the value of attribute statusflags has been overridden in original feature 0x000001f8 - 14) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000c - 15) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000c - 16) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000007a - 17) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000007a - 18) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000059 - 19) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000059 - 20) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000003 - 21) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000003 - 22) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000126 - 23) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000126 - 24) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000005b - 25) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000066 - 26) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000066 - 27) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000001 - 28) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000001 - 29) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000006b - 30) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000006b - 31) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000005f9 - 32) WARNING: the value of attribute statusflags has been overridden in original feature 0x000005f9 - 33) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000072 - 34) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000d - 35) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000d - 36) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000006a9 - 37) WARNING: the value of attribute statusflags has been overridden in original feature 0x000006a9 - 38) WARNING: Error in reading features database file "/epoc32/include/s60customswfeatures.xml" - 39) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_BEGIN'. Line 2133 ignored - 40) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_END'. Line 2134 ignored - 41) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2210 ignored - 42) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2337 ignored - 43) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2338 ignored - 44) WARNING: Unknown keyword '***'. Line 2602 ignored - 45) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_BEGIN'. Line 2133 ignored - 46) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_END'. Line 2134 ignored - 47) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2210 ignored - 48) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2337 ignored - 49) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2338 ignored - 50) WARNING: Unknown keyword '***'. Line 2602 ignored - 51) WARNING: Kernel/variant/extension - 52) WARNING: Kernel/variant/extension - 53) WARNING: Kernel/variant/extension - 54) Warning: Can't open "\epoc32\release\ARMV5\urel\AR_LServer.exe.map" or "\epoc32\release\ARMV5\urel\AR_LServer.map" - 55) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\AP_CES_CoreComponents.map" - 56) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_HDMetafile2.dll.map" or "\epoc32\release\ARMV5\urel\AP_HDMetafile2.map" - 57) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_HDOfficeCommon2.dll.map" or "\epoc32\release\ARMV5\urel\AP_HDOfficeCommon2.map" - 58) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_QORecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_QORecognizer.map" - 59) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_S60_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_S60_CoreComponents.map" - 60) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_DeviceTransport.DLL.map" or "\epoc32\release\ARMV5\urel\ap_CES_DeviceTransport.map" - 61) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_zip.dll.map" or "\epoc32\release\ARMV5\urel\ap_zip.map" - 62) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_syb_XMLarchive.dll.map" or "\epoc32\release\ARMV5\urel\ap_syb_XMLarchive.map" - 63) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_FMPluginBase.dll.map" or "\epoc32\release\ARMV5\urel\ap_FMPluginBase.map" - 64) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_FILELISTFMPLUGIN.DLL.map" or "\epoc32\release\ARMV5\urel\ap_CES_FILELISTFMPLUGIN.map" - 65) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_QO_FileManager.exe.map" or "\epoc32\release\ARMV5\urel\ap_QO_FileManager.map" - 66) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_ces_ziprecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_ces_ziprecognizer.map" - 67) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PptRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PptRecognizer.map" - 68) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PptXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PptXRecognizer.map" - 69) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_XlsRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_XlsRecognizer.map" - 70) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_XlsXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_XlsXRecognizer.map" - 71) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_TxtRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_TxtRecognizer.map" - 72) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_WrdRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_WrdRecognizer.map" - 73) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_WrdXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_WrdXRecognizer.map" - 74) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_QPDFDescriptor.DLL.map" or "\epoc32\release\ARMV5\urel\AP_CES_QPDFDescriptor.map" - 75) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PdfRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PdfRecognizer.map" - 76) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_PDFFILTERINFO.DLL.map" or "\epoc32\release\ARMV5\urel\AP_CES_PDFFILTERINFO.map" - 77) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_QuickofficeStub.exe.map" or "\epoc32\release\ARMV5\urel\ap_QuickofficeStub.map" - 78) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_quickpdf.exe.map" or "\epoc32\release\ARMV5\urel\ap_quickpdf.map" - 79) WARNING: File \epoc32\data\Z\Resource\APPS\ap_registration.rom does not exist or is 0 bytes in length. - 80) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_HTTP.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_HTTP.map" - 81) WARNING: File \epoc32\data\Z\private\102033E6\installer\inst_plugins.cfg does not exist or is 0 bytes in length. - 82) Warning: Can't open "\epoc32\release\ARMV5\urel\arcimagefundamental.dll.map" or "\epoc32\release\ARMV5\urel\arcimagefundamental.map" - 83) Warning: Can't open "\epoc32\release\ARMV5\urel\arcplatform.dll.map" or "\epoc32\release\ARMV5\urel\arcplatform.map" - 84) Warning: Can't open "\epoc32\release\ARMV5\urel\arcimagecodecs.dll.map" or "\epoc32\release\ARMV5\urel\arcimagecodecs.map" - 85) Warning: Can't open "\epoc32\release\ARMV5\urel\photoeditor.exe.map" or "\epoc32\release\ARMV5\urel\photoeditor.map" - 86) Warning: Can't open "\epoc32\release\ARMV5\urel\arcamui.dll.map" or "\epoc32\release\ARMV5\urel\arcamui.map" - 87) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpebasictool.dll.map" or "\epoc32\release\ARMV5\urel\arcpebasictool.map" - 88) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpebase.dll.map" or "\epoc32\release\ARMV5\urel\arcpebase.map" - 89) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpemanager.dll.map" or "\epoc32\release\ARMV5\urel\arcpemanager.map" - 90) Warning: Can't open "\epoc32\release\ARMV5\urel\arcampe.dll.map" or "\epoc32\release\ARMV5\urel\arcampe.map" - 91) Warning: Can't open "\epoc32\release\ARMV5\urel\photoeditoraiwplugin.dll.map" or "\epoc32\release\ARMV5\urel\photoeditoraiwplugin.map" - 92) WARNING: File \epoc32\data\Z\Resource\APPS\registration.rom does not exist or is 0 bytes in length. - 93) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_LServer.exe.map" or "\epoc32\release\ARMV5\urel\QO_LServer.map" - 94) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_devicetransport.dll.map" or "\epoc32\release\ARMV5\urel\ces_devicetransport.map" - 95) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\CES_CoreComponents.map" - 96) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pdfrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pdfrecognizer.map" - 97) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_OGLES_Charts.dll.map" or "\epoc32\release\ARMV5\urel\CES_OGLES_Charts.map" - 98) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_filelistfmplugin.dll.map" or "\epoc32\release\ARMV5\urel\ces_filelistfmplugin.map" - 99) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptfilterinfo.map" -100) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptfilter.map" -101) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptrecognizer.map" -102) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptxfilterinfo.map" -103) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_ziprecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_ziprecognizer.map" -104) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_PPTX_Engine_Conv.dll.map" or "\epoc32\release\ARMV5\urel\QO_PPTX_Engine_Conv.map" -105) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptxrecognizer.map" -106) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qorecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_qorecognizer.map" -107) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qshdescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qshdescriptor.map" -108) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qwddescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qwddescriptor.map" -109) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qptdescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qptdescriptor.map" -110) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_PPTXFILTER.DLL.map" or "\epoc32\release\ARMV5\urel\CES_PPTXFILTER.map" -111) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_QWS_SpellChecker.dll.map" or "\epoc32\release\ARMV5\urel\CES_QWS_SpellChecker.map" -112) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_RichText_Engine.dll.map" or "\epoc32\release\ARMV5\urel\CES_RichText_Engine.map" -113) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtfilter.map" -114) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtfilterinfo.map" -115) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_S60_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\CES_S60_CoreComponents.map" -116) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtrecognizer.map" -117) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdfilter.map" -118) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdfilterinfo.map" -119) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdrecognizer.map" -120) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxfilterinfo.map" -121) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxrecognizer.map" -122) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxfilter.map" -123) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsfilter.map" -124) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsfilterinfo.map" -125) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsrecognizer.map" -126) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxfilterinfo.map" -127) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxrecognizer.map" -128) Warning: Can't open "\epoc32\release\ARMV5\urel\FMPluginBase.dll.map" or "\epoc32\release\ARMV5\urel\FMPluginBase.map" -129) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxfilter.map" -130) Warning: Can't open "\epoc32\release\ARMV5\urel\HDExcel2.dll.map" or "\epoc32\release\ARMV5\urel\HDExcel2.map" -131) Warning: Can't open "\epoc32\release\ARMV5\urel\HDMetafile2.dll.map" or "\epoc32\release\ARMV5\urel\HDMetafile2.map" -132) Warning: Can't open "\epoc32\release\ARMV5\urel\HDOfficeCommon2.dll.map" or "\epoc32\release\ARMV5\urel\HDOfficeCommon2.map" -133) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_FileManager.exe.map" or "\epoc32\release\ARMV5\urel\QO_FileManager.map" -134) Warning: Can't open "\epoc32\release\ARMV5\urel\HDPowerPoint2.dll.map" or "\epoc32\release\ARMV5\urel\HDPowerPoint2.map" -135) Warning: Can't open "\epoc32\release\ARMV5\urel\HDWord2.dll.map" or "\epoc32\release\ARMV5\urel\HDWord2.map" -136) Warning: Can't open "\epoc32\release\ARMV5\urel\quickpoint.exe.map" or "\epoc32\release\ARMV5\urel\quickpoint.map" -137) Warning: Can't open "\epoc32\release\ARMV5\urel\quicksheet.exe.map" or "\epoc32\release\ARMV5\urel\quicksheet.map" -138) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickpoint_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quickpoint_DOM.map" -139) Warning: Can't open "\epoc32\release\ARMV5\urel\Quicksheet_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quicksheet_DOM.map" -140) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickword.exe.map" or "\epoc32\release\ARMV5\urel\Quickword.map" -141) Warning: Can't open "\epoc32\release\ARMV5\urel\SYB_XMLArchive.dll.map" or "\epoc32\release\ARMV5\urel\SYB_XMLArchive.map" -142) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickword_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quickword_DOM.map" -143) Warning: Can't open "\epoc32\release\ARMV5\urel\QuickPDFStub.exe.map" or "\epoc32\release\ARMV5\urel\QuickPDFStub.map" -144) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_HTTP.dll.map" or "\epoc32\release\ARMV5\urel\CES_HTTP.map" -145) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pdffilterinfostub.dll.map" or "\epoc32\release\ARMV5\urel\ces_pdffilterinfostub.map" -146) Warning: Can't open "\epoc32\release\ARMV5\urel\zip.dll.map" or "\epoc32\release\ARMV5\urel\zip.map" -147) Warning: Can't open "\epoc32\release\ARMV5\urel\videoeditor.exe.map" or "\epoc32\release\ARMV5\urel\videoeditor.map" -148) Warning: Can't open "\epoc32\release\ARMV5\urel\amur.dll.map" or "\epoc32\release\ARMV5\urel\amur.map" -149) Warning: Can't open "\epoc32\release\ARMV5\urel\arcavcodecs.dll.map" or "\epoc32\release\ARMV5\urel\arcavcodecs.map" -150) Warning: Can't open "\epoc32\release\ARMV5\urel\amvesession.dll.map" or "\epoc32\release\ARMV5\urel\amvesession.map" -151) Warning: Can't open "\epoc32\release\ARMV5\urel\videoeditoraiwplugin.dll.map" or "\epoc32\release\ARMV5\urel\videoeditoraiwplugin.map" -152) Warning: Can't open "\epoc32\release\ARMV5\urel\3GPExtParser.dll.map" or "\epoc32\release\ARMV5\urel\3GPExtParser.map" -153) Warning: Can't open "\epoc32\release\ARMV5\urel\VtcpCmpFilter.dll.map" or "\epoc32\release\ARMV5\urel\VtcpCmpFilter.map" -154) Warning: Can't open "\epoc32\release\ARMV5\urel\SenVtcpTransport.dll.map" or "\epoc32\release\ARMV5\urel\SenVtcpTransport.map" -155) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmkeystorage.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmkeystorage.map" -156) Warning: Can't open "\epoc32\release\ARMV5\urel\hxwmdrmplugin.dll.map" or "\epoc32\release\ARMV5\urel\hxwmdrmplugin.map" -157) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmota.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmota.map" -158) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkclient.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpkclient.map" -159) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkserver.exe.map" or "\epoc32\release\ARMV5\urel\wmdrmpkserver.map" -160) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkclientwrapper.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpkclientwrapper.map" -161) Warning: Can't open "\epoc32\release\ARMV5\urel\cameseutility.dll.map" or "\epoc32\release\ARMV5\urel\cameseutility.map" -162) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmagent.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmagent.map" -163) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmdla.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmdla.map" -164) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpd.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpd.map" -165) Warning: Can't open "\epoc32\release\gcce\urel\zipmanager.exe.map" or "\epoc32\release\gcce\urel\zipmanager.map" -166) Warning: Can't open "\epoc32\release\armv5\udeb\ctcmangui.exe.map" or "\epoc32\release\armv5\udeb\ctcmangui.map" -167) Warning: Can't open "\epoc32\release\ARMV5\urel\eunits60gui.exe.map" or "\epoc32\release\ARMV5\urel\eunits60gui.map" -168) Warning: Can't open "\epoc32\release\ARMV5\urel\eunitappenvironment.exe.map" or "\epoc32\release\ARMV5\urel\eunitappenvironment.map" -169) Warning: Can't open "\epoc32\release\ARMV5\urel\euniteikappenvironment.exe.map" or "\epoc32\release\ARMV5\urel\euniteikappenvironment.map" -170) Warning: Can't open "\epoc32\release\ARMV5\urel\qakitcommonui.dll.map" or "\epoc32\release\ARMV5\urel\qakitcommonui.map" -171) Warning: Can't open "\epoc32\release\ARMV5\urel\digiaconnect.exe.map" or "\epoc32\release\ARMV5\urel\digiaconnect.map" - -Error(s): -1) ERROR: (/epoc32/include/s60customswfeatures.xml) Feature "KFEATUREIDFFMOBILITYMANAGEMENTERRORS" already exists -=============================================================================== -Target: core-image Duration: 14:26 Status: OK -iMaker log = `Y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_imaker_core-image.log' -Core (ROM & ROFS1) dir = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd' -Core ROM image = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rom.img' -Core ROM symbols = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rom.symbol' -Core ROFS1 image = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rofs1.img' -Core ROFS1 symbols = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rofs1.symbol' -------------------------------------------------------------------------------- -Total duration: 14:29 Status: OK -=============================================================================== \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/build_whatlog.log --- a/buildframework/helium/sf/java/metadata/tests/data/build_whatlog.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - - -G:/epoc32/include/hrv_gain_mappings.rsg -G:/epoc32/release/armv5/urel/ekeyb.dll - - - -G:/epoc32/include/platform/loc/65/101f6dd6_65.loc -G:/epoc32/include/platform/loc/65/101f6dd7_65.loc - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/build_whatlog.whatlog.log --- a/buildframework/helium/sf/java/metadata/tests/data/build_whatlog.whatlog.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ - - -sbs: version 2.12.3 [2010-02-23 symbian build system 007900c31eef] - -SBS_HOME C:/apps/sbs -Set-up C:/apps/sbs/sbs_init.xml -Command-line-arguments -s G:\output\build\canonical_system_definition_dfs_build_export.xml --filters=FilterMetadataLog -k --logfile G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log --makefile=G:\output\logs/makefile/92_7952_201006_32_dfs_build_export --export-only -e emake --mo=--emake-emulation=gmake --mo=--emake-annofile=#MAKEFILE#.emake.anno --mo=--emake-class=DFS_7x01-64 --mo=--emake-annodetail=basic,history,file,waiting --mo=--case-sensitive=0 --mo=--emake-root=G:/;\;C:\apps;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium;C:\apps\sbs -Current working directory G:\ -Environment /S=BHTEST001 -Environment ABLD_TOOLSMOD_COMPATIBILITY_MODE=alpha -Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users -Environment APTLMHOST=@oupelic4.emea.nsn-net.net -Environment ARMLMD_LICENSE_FILE=8224@trelic01;8224@salmg01;28747@saslmg04; -Environment ARMROOT=\ -Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] -Environment BASE=E:\build_e\wbernard\hudson -Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log -Environment CMTHOME=C:\APPS\cmt -Environment COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files -Environment COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files -Environment COMMONPROGRAMW6432=C:\Program Files\Common Files -Environment COMPUTERNAME=TRWEC090 -Environment COMSPEC=C:\ETPWIN\system32\cmd.exe -Environment COPYCMD=/y -Environment CTCHOME=C:\APPS\ctc -Environment CTC_AGENT_DEBUG=* -Environment CYGWIN=nontsec nosmbntsec -Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB -Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT -Environment EMAKE_CM=trwec001 -Environment EMAKE_EMULATION=symbian -Environment EMAKE_ROOT=\;C:\apps -Environment EPOCROOT=\ -Environment EXECUTOR_NUMBER=3 -Environment FLEXLM_BATCH=1 -Environment FLEXLM_TIMEOUT=900000 -Environment FP_NO_HOST_CHECK=NO -Environment HELIUM_CACHE_DIR=e:\ec_temp\helium\wbernard -Environment HELIUM_HOME=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium -Environment HOME=h:\ -Environment HOSTPLATFORM=win 32 -Environment HOSTPLATFORM_DIR=win32 -Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ -Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 -Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 -Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 -Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 -Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ -Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 -Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK -Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs -Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; -Environment NODE_NAME=trwec090 -Environment NUMBER_OF_PROCESSORS=12 -Environment OS=Windows_NT -Environment PATH=C:\apps\sbs\win32\mingw\bin;C:\apps\sbs\win32\cygwin\bin;C:\apps\sbs\win32\bin;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\HP\NCU;c:\ECloud\i686_win32\bin;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem;C:\ETPWIN\sysWOW64;C:\PROGRA~2\PuTTY;C:\APPS\MSVC6\Common\Tools\WinNT;C:\APPS\MSVC6\Common\MSDev98\Bin;C:\APPS\MSVC6\Common\Tools;C:\APPS\MSVC6\VC98\bin;C:\EESP\System32;C:\APPS\pclint;C:\APPS\cmt\;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\cltools;C:\APPS\symrec;C:\APPS\7zip;C:\APPS\understand\bin\pc-win95;C:\APPS\unzip;C:\APPS\jdk_1.6.0_11\bin;C:\apps\mercurial;C:\APPS\ant_1.7\bin;C:\Program Files\subversion;C:\APPS\sbs\bin;C:\APPS\actpython\.;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\symdec;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\unxutils;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\Subversion\bin;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc -Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 -Environment PERL=C:\APPS\actperl\bin\perl.exe -Environment PERL5LIB=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\tools\common\packages -Environment PID=6932 -Environment PROCESSOR_ARCHITECTURE=x86 -Environment PROCESSOR_ARCHITEW6432=AMD64 -Environment PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 8 Stepping 0, AuthenticAMD -Environment PROCESSOR_LEVEL=16 -Environment PROCESSOR_REVISION=0800 -Environment PROGRAMFILES=C:\Program Files (x86) -Environment PROGRAMFILES(X86)=C:\Program Files (x86) -Environment PROGRAMW6432=C:\Program Files -Environment PROMPT=$P$G -Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ -Environment PYTHONPATH=C:\apps\sbs\win32\python264 -Environment PYTHONVERSION=2.6 -Environment RVCT22BIN=C:\APPS\rvct22_686\bin -Environment RVCT22INC=C:\APPS\rvct22_686\include -Environment RVCT22LIB=C:\APPS\rvct22_686\lib -Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense -Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense -Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense -Environment SBS_CLEAN_LOG_FILE=G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log.clean.log -Environment SBS_HOME=C:\apps\sbs -Environment SBS_PYTHON=C:\APPS\actpython\python.exe -Environment SYMSEE_VERSION=11.2.0 -Environment SYSTEMDRIVE=C: -Environment SYSTEMROOT=C:\ETPWIN -Environment TEAM=helium_tampere64.92 -Environment TEMP=e:\ec_temp -Environment TESTED_ANT=C:\APPS\ant_1.7 -Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 -Environment TMP=e:\ec_temp -Environment TMPDIR=e:\ec_tmpdir -Environment WINDIR=C:\ETPWIN -Environment WORKSPACE=E:\build_e\wbernard\hudson\workspace\TB92-64bit -Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe -Environment _USE_CLASSPATH=no -Environment __CYGWIN__=C:\apps\sbs\win32\cygwin -Environment __MINGW__=C:\apps\sbs\win32\mingw -Environment __PYTHON__=C:\APPS\actpython\python.exe -Duplicate alias 'make' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Duplicate alias 'emake' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Buildable configuration 'armv5_urel' -Buildable configuration 'armv5_udeb' -Buildable configuration 'winscw_udeb' -Buildable configuration 'winscw_urel' -System Definition file G:/output/build/canonical_system_definition_dfs_build_export.xml -Found 372 bld.inf references in G:/output/build/canonical_system_definition_dfs_build_export.xml within 10 layers: - ncp_layer, mw_layer, os_layer, bldfirst_mw_layer, bldfirst_app_layer, app_layer, tools_layer, addon_layer, unit_test_layer, complementary_layer -Found 95 bld.inf references in layer "ncp_layer" -Found 112 bld.inf references in layer "mw_layer" -Found 25 bld.inf references in layer "os_layer" -Found 2 bld.inf references in layer "bldfirst_mw_layer" -Found 1 bld.inf references in layer "bldfirst_app_layer" -Found 98 bld.inf references in layer "app_layer" -Found 3 bld.inf references in layer "tools_layer" -Found 30 bld.inf references in layer "addon_layer" -Found 0 bld.inf references in layer "unit_test_layer" -Found 6 bld.inf references in layer "complementary_layer" -Toolcheck cache G:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed - -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "armv5_urel". -'armv5_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "armv5_udeb". -'armv5_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "winscw_udeb". -'winscw_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "winscw_urel". -'winscw_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -Processing G:/sf/mw/svgt/group/bld.inf -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/epoc32/include/platform/mw/SVGImageLoadingObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/epoc32/include/platform/mw/SVGListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/epoc32/include/platform/mw/SVGErrorImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/epoc32/include/platform/mw/SVGHyperlinkListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/epoc32/include/platform/mw/SVGAnimationListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/epoc32/include/platform/mw/SVGRequestObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/epoc32/include/platform/mw/SVGRendererId.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/epoc32/include/platform/mw/nvg.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/epoc32/include/platform/mw/MVGImageBinder.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/epoc32/include/platform/mw/NVGIcon.h -Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/epoc32/rom/include/core/mw/SVGEngine.iby -Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/epoc32/rom/include/core/mw/SvgtPluginEcom.iby -Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/epoc32/rom/include/core/mw/NVGDecoder.iby -Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/epoc32/rom/include/core/mw/NVGDecoder_SW.iby -Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/epoc32/rom/include/core/mw/VGRenderer.iby - - -G:/epoc32/include/hrv_gain_mappings.rsg -G:/epoc32/release/armv5/urel/ekeyb.dll - - -G:/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped - - - -G:/epoc32/include/platform/loc/65/101f6dd6_65.loc -G:/epoc32/include/platform/loc/65/101f6dd7_65.loc - - -The make-engine exited successfully. -Run time 999 seconds -Created/Updated toolcheck cache: G:/epoc32/build/toolcheck_cache_.tmp - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/categorization.log --- a/buildframework/helium/sf/java/metadata/tests/data/categorization.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ - - - - -make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o] Error 1 - -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb -X:/epoc32/release/armv5/udeb -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5.product/udeb - -Run time 226 seconds - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/categorization_clean.log --- a/buildframework/helium/sf/java/metadata/tests/data/categorization_clean.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb -X:/epoc32/release/armv5/udeb -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5.product/udeb - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/categorization_compile.log --- a/buildframework/helium/sf/java/metadata/tests/data/categorization_compile.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ - - - - -make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o] Error 1 - -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb -X:/epoc32/release/armv5/udeb -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5.product/udeb - -Run time 226 seconds - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/categorization_failed_empty_recipe.log --- a/buildframework/helium/sf/java/metadata/tests/data/categorization_failed_empty_recipe.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - - - -make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/urel/srchuiresultview.o] Error 1 - -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb -X:/epoc32/release/armv5/udeb -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5.product/udeb - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/categorization_failed_error_in_recipe.log --- a/buildframework/helium/sf/java/metadata/tests/data/categorization_failed_error_in_recipe.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - - - - -make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/urel/srchuiresultview.o] Error 1 - -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb -X:/epoc32/release/armv5/udeb -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5.product/udeb - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/common.csv --- a/buildframework/helium/sf/java/metadata/tests/data/common.csv Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/tests/data/common.csv Mon Sep 13 13:11:19 2010 +0800 @@ -1,4 +1,4 @@ -priority,regex,description +severity,regex,description FATAL,.*mingw_make\.exe.*, ERROR,.*\): Missing file:.*, ERROR,^(?:(?:\s*\d+\)\s*)|(?:\s*\*\*\*\s*))ERROR:.*, diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/countseverity/package_build_fixslashes_raptor.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/countseverity/package_build_fixslashes_raptor.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,36 @@ + +No changes to P:\sf\mw\svgt\svgtopt\SVG\SVGRecog\Group\SvgRecog.MMP +ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: // to the same name in \epoc32\include +ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: \agnmodel\inc\AGMCOMON.H +ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: \agnmodel\group\agnmodel.mmp +ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: \agnmodel\group\agsvexe.mmp +PRINT ONLY -> Writing P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf +No changes to P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\svgtmodule.mmp +ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: SOURCEPATH ..\src +ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: SOURCEPATH ..\data +ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: TARGETPATH resource\apps +ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: TARGETPATH \private\10003a3f\apps +ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: USERINCLUDE ..\inc +PRINT ONLY -> Writing P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp +No changes to P:\sf\mw\classicui\uifw\AvKon\odeconf\inc\odeconf.hrh +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: _LIT( KAICal2ArabicSummaryLocationSeparator, " \x060c" ); +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x0009 horizontal tab +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000a new line +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000b line tabulation (vertical +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000c form feed +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000d carriage return +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x2028 line separator +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x2029 paragraph separator +ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: "\x0009\x000A\x000B\x000C\x000D\x2028\x2029" ); +PRINT ONLY -> Writing P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh +No changes to P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2uids.hrh +No changes to P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\calendar.hrh +No changes to P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\CalendarVariant.hrh +ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KStandardPuncExclamatoryPoint, "\x0021"); +ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KStandardPuncDotPoint, "\x002E"); +ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncComma, "\x060C"); +ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncSemicolon, "\x061B"); +ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncQuestion, "\x061F"); +ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncWaw, "\x0648"); +PRINT ONLY -> Writing P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/countseverity/text_has_severity.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/countseverity/text_has_severity.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,4 @@ +ERROR: foobar +WARNING: warn +bla bla.... +bla bla.... diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/ido_abs_mcl_devlon70_robot_MCL.70.500_fixslashes_raptor.log --- a/buildframework/helium/sf/java/metadata/tests/data/ido_abs_mcl_devlon70_robot_MCL.70.500_fixslashes_raptor.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - -No changes to P:\sf\mw\svgt\svgtopt\SVG\SVGRecog\Group\SvgRecog.MMP -ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: // to the same name in \epoc32\include -ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: \agnmodel\inc\AGMCOMON.H -ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: \agnmodel\group\agnmodel.mmp -ERROR: P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf: #1: \agnmodel\group\agsvexe.mmp -PRINT ONLY -> Writing P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\Bld.inf -No changes to P:\sf\mw\svgt\svgt_plat\svgt_api\tsrc\group\svgtmodule.mmp -ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: SOURCEPATH ..\src -ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: SOURCEPATH ..\data -ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: TARGETPATH resource\apps -ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: TARGETPATH \private\10003a3f\apps -ERROR: P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp: #1: USERINCLUDE ..\inc -PRINT ONLY -> Writing P:\sf\mw\classicui\uifw\AvKon\odeconf\group\odeconf.mmp -No changes to P:\sf\mw\classicui\uifw\AvKon\odeconf\inc\odeconf.hrh -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: _LIT( KAICal2ArabicSummaryLocationSeparator, " \x060c" ); -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x0009 horizontal tab -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000a new line -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000b line tabulation (vertical -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000c form feed -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x000d carriage return -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x2028 line separator -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: * \x2029 paragraph separator -ERROR: P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh: #1: "\x0009\x000A\x000B\x000C\x000D\x2028\x2029" ); -PRINT ONLY -> Writing P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2constants.hrh -No changes to P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\aicalendarplugin2uids.hrh -No changes to P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\calendar.hrh -No changes to P:\sf\app\homescreen\idlehomescreen\hsplugins\organizer\aiagendaplugin2\inc\CalendarVariant.hrh -ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KStandardPuncExclamatoryPoint, "\x0021"); -ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KStandardPuncDotPoint, "\x002E"); -ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncComma, "\x060C"); -ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncSemicolon, "\x061B"); -ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncQuestion, "\x061F"); -ERROR: P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh: #1: _LIT(KArabicPuncWaw, "\x0648"); -PRINT ONLY -> Writing P:\sf\mw\inputmethods\textinput\peninputgenerichwr\inc\peninputhwrarabic.hrh - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/ido_abs_mcl_devlon70_robot_MCL.70.500_info.log --- a/buildframework/helium/sf/java/metadata/tests/data/ido_abs_mcl_devlon70_robot_MCL.70.500_info.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - ido_abs_mcl_devlon70_robot_MCL.70.500 - 500 - 2009-04-25T19:31:43 - FASYM011 - - true - \\fasamba\dfs\r1120_isis\NT\Build_and_Release\IDO_Statistics\ABS_Domain\Releases - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/ido_abs_tb92-nightly_5.2.58_validate_policy.log --- a/buildframework/helium/sf/java/metadata/tests/data/ido_abs_tb92-nightly_5.2.58_validate_policy.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/imaker/build_roms_sample.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/imaker/build_roms_sample.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,281 @@ +Starting build: 75090 +mkdir epoc32\rombuild\temp +Number of threads: 4 + +++ Started at Thu May 6 13:08:38 2010 ++++ HiRes Start 1273147718 +-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_482 -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=prd rofs3-dir +iMaker 10.12.01, 23-Mar-2010. +=============================================================================== +Target: rofs3-dir Duration: 00:02 Status: OK +iMaker log = `Y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd_imaker_rofs3-dir.log' +ROFS3 dir = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3' +ROFS3 image = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd.rofs3.img' - DOESN'T EXIST +ROFS3 symbols = `y:/output/release_flash_images/productexample/prd/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_prd.rofs3.symbol' - DOESN'T EXIST +ROFS3 flash = `y:/output/release_flash_images/productexample/prd/customer/vanilla/RM-XXX_010.014_00.01_79.92_prd.rofs3.fpsx' - DOESN'T EXIST +------------------------------------------------------------------------------- +Total duration: 00:03 Status: OK +=============================================================================== ++++ HiRes End 1273147721 +++ Finished at Thu May 6 13:08:41 2010 +++ Started at Thu May 6 13:08:41 2010 ++++ HiRes Start 1273147721 +-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_484 -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=rnd udaerase-dir +iMaker 10.12.01, 23-Mar-2010. +=============================================================================== +Target: udaerase-dir Duration: 00:01 Status: OK +iMaker log = `Y:/output/release_flash_images/productexample/rnd/uda/udaerase/udadata/RM-XXX_010.014_79.92.2010.15_rnd_imaker_udaerase-dir.log' +UDA Erase flash = `y:/output/release_flash_images/productexample/rnd/uda/RM-XXX_010.014_79.92.2010.15_rnd.udaerase.fpsx' - DOESN'T EXIST +------------------------------------------------------------------------------- +Total duration: 00:02 Status: OK +=============================================================================== ++++ HiRes End 1273147723 +++ Finished at Thu May 6 13:08:43 2010 +++ Started at Thu May 6 13:08:41 2010 ++++ HiRes Start 1273147721 +-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_485 -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=prd udaerase-dir +iMaker 10.12.01, 23-Mar-2010. +=============================================================================== +Target: udaerase-dir Duration: 00:01 Status: OK +iMaker log = `Y:/output/release_flash_images/productexample/prd/uda/udaerase/udadata/RM-XXX_010.014_79.92_prd_imaker_udaerase-dir.log' +UDA Erase flash = `y:/output/release_flash_images/productexample/prd/uda/RM-XXX_010.014_79.92_prd.udaerase.fpsx' - DOESN'T EXIST +------------------------------------------------------------------------------- +Total duration: 00:02 Status: OK +=============================================================================== ++++ HiRes End 1273147723 +++ Finished at Thu May 6 13:08:43 2010 +++ Started at Thu May 6 13:08:41 2010 ++++ HiRes Start 1273147721 +-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_486 -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=subcon udaerase-dir +iMaker 10.12.01, 23-Mar-2010. +=============================================================================== +Target: udaerase-dir Duration: 00:01 Status: OK +iMaker log = `Y:/output/release_flash_images/productexample/subcon/uda/udaerase/udadata/RM-XXX_010.014_79.92_subcon_imaker_udaerase-dir.log' +UDA Erase flash = `y:/output/release_flash_images/productexample/subcon/uda/RM-XXX_010.014_79.92_subcon.udaerase.fpsx' - DOESN'T EXIST +------------------------------------------------------------------------------- +Total duration: 00:02 Status: OK +=============================================================================== ++++ HiRes End 1273147723 +++ Finished at Thu May 6 13:08:43 2010 +++ Started at Thu May 6 13:08:40 2010 ++++ HiRes Start 1273147720 +-- cmd /c imaker WORKDIR=epoc32\rombuild\temp/config_483 -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=subcon rofs3-dir +iMaker 10.12.01, 23-Mar-2010. +=============================================================================== +Target: rofs3-dir Duration: 00:02 Status: OK +iMaker log = `Y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon_imaker_rofs3-dir.log' +ROFS3 dir = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3' +ROFS3 image = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon.rofs3.img' - DOESN'T EXIST +ROFS3 symbols = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/rofs3/RM-XXX_010.014_00.01_79.92_subcon.rofs3.symbol' - DOESN'T EXIST +ROFS3 flash = `y:/output/release_flash_images/productexample/subcon/customer/vanilla/RM-XXX_010.014_00.01_79.92_subcon.rofs3.fpsx' - DOESN'T EXIST +------------------------------------------------------------------------------- +Total duration: 00:03 Status: OK +=============================================================================== ++++ HiRes End 1273147724 +++ Finished at Thu May 6 13:08:44 2010 +-- imaker -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=rnd core-image +++ Started at Thu May 6 13:08:45 2010 ++++ HiRes Start 1273147725.83 +imaker WORKDIR=epoc32\rombuild\temp/config_16 -f /epoc32/rom/config/platform/productexample/image_conf_productexample_ui.mk TYPE=rnd core-image +iMaker 10.12.01, 23-Mar-2010. +Generating file(s) for Core (ROM & ROFS1) image creation +Generating Feature manager file(s) +Creating Core (ROM & ROFS1) SOS image + +Missing file(s): +1) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(1686): Missing file: '/epoc32/data/Z/resource/apps/MPSettingsROPModel.rsc' in statement 'data=' +2) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(1824): Missing file: '/epoc32/data/Z/private/20021377/backup_registration.xml' in statement 'data=' +3) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2596): Missing file: '/epoc32/data/z/data/system/application/licenses/product/data.xml' in statement 'data=' +4) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2597): Missing file: '/epoc32/data/z/data/system/application/licenses/product/key' in statement 'data=' +5) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2614): Missing file: '/epoc32/data/Z/Resource/wappush/si.dtd' in statement 'data=' +6) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2615): Missing file: '/epoc32/data/Z/Resource/wappush/sl.dtd' in statement 'data=' +7) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2616): Missing file: '/epoc32/data/Z/Resource/wappush/si10.tok' in statement 'data=' +8) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(2617): Missing file: '/epoc32/data/Z/Resource/wappush/sl10.tok' in statement 'data=' +9) y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_core_master.oby(4905): Missing file: '/epoc32/data/Z/resource/help/juicehelp.hlp' in statement 'data=' + +Warning(s): + 1) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000003f5 + 2) WARNING: the value of attribute statusflags has been overridden in original feature 0x000003f5 + 3) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000b + 4) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000b + 5) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000584 + 6) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000584 + 7) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000019b + 8) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000019b + 9) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000007 + 10) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000005ff + 11) WARNING: the value of attribute statusflags has been overridden in original feature 0x000005ff + 12) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000001f8 + 13) WARNING: the value of attribute statusflags has been overridden in original feature 0x000001f8 + 14) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000c + 15) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000c + 16) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000007a + 17) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000007a + 18) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000059 + 19) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000059 + 20) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000003 + 21) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000003 + 22) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000126 + 23) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000126 + 24) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000005b + 25) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000066 + 26) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000066 + 27) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x00000001 + 28) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000001 + 29) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000006b + 30) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000006b + 31) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000005f9 + 32) WARNING: the value of attribute statusflags has been overridden in original feature 0x000005f9 + 33) WARNING: the value of attribute statusflags has been overridden in original feature 0x00000072 + 34) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x0000000d + 35) WARNING: the value of attribute statusflags has been overridden in original feature 0x0000000d + 36) WARNING: the value of attribute hrhmacro has been overridden in original feature 0x000006a9 + 37) WARNING: the value of attribute statusflags has been overridden in original feature 0x000006a9 + 38) WARNING: Error in reading features database file "/epoc32/include/s60customswfeatures.xml" + 39) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_BEGIN'. Line 2133 ignored + 40) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_END'. Line 2134 ignored + 41) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2210 ignored + 42) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2337 ignored + 43) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2338 ignored + 44) WARNING: Unknown keyword '***'. Line 2602 ignored + 45) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_BEGIN'. Line 2133 ignored + 46) WARNING: Unknown keyword 'LOCALISE_ALL_RESOURCES_END'. Line 2134 ignored + 47) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2210 ignored + 48) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2337 ignored + 49) WARNING: Unknown keyword '-----------------------------------------------------------'. Line 2338 ignored + 50) WARNING: Unknown keyword '***'. Line 2602 ignored + 51) WARNING: Kernel/variant/extension + 52) WARNING: Kernel/variant/extension + 53) WARNING: Kernel/variant/extension + 54) Warning: Can't open "\epoc32\release\ARMV5\urel\AR_LServer.exe.map" or "\epoc32\release\ARMV5\urel\AR_LServer.map" + 55) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\AP_CES_CoreComponents.map" + 56) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_HDMetafile2.dll.map" or "\epoc32\release\ARMV5\urel\AP_HDMetafile2.map" + 57) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_HDOfficeCommon2.dll.map" or "\epoc32\release\ARMV5\urel\AP_HDOfficeCommon2.map" + 58) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_QORecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_QORecognizer.map" + 59) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_S60_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_S60_CoreComponents.map" + 60) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_DeviceTransport.DLL.map" or "\epoc32\release\ARMV5\urel\ap_CES_DeviceTransport.map" + 61) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_zip.dll.map" or "\epoc32\release\ARMV5\urel\ap_zip.map" + 62) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_syb_XMLarchive.dll.map" or "\epoc32\release\ARMV5\urel\ap_syb_XMLarchive.map" + 63) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_FMPluginBase.dll.map" or "\epoc32\release\ARMV5\urel\ap_FMPluginBase.map" + 64) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_FILELISTFMPLUGIN.DLL.map" or "\epoc32\release\ARMV5\urel\ap_CES_FILELISTFMPLUGIN.map" + 65) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_QO_FileManager.exe.map" or "\epoc32\release\ARMV5\urel\ap_QO_FileManager.map" + 66) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_ces_ziprecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_ces_ziprecognizer.map" + 67) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PptRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PptRecognizer.map" + 68) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PptXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PptXRecognizer.map" + 69) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_XlsRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_XlsRecognizer.map" + 70) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_XlsXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_XlsXRecognizer.map" + 71) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_TxtRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_TxtRecognizer.map" + 72) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_WrdRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_WrdRecognizer.map" + 73) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_WrdXRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_WrdXRecognizer.map" + 74) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_QPDFDescriptor.DLL.map" or "\epoc32\release\ARMV5\urel\AP_CES_QPDFDescriptor.map" + 75) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_PdfRecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_PdfRecognizer.map" + 76) Warning: Can't open "\epoc32\release\ARMV5\urel\AP_CES_PDFFILTERINFO.DLL.map" or "\epoc32\release\ARMV5\urel\AP_CES_PDFFILTERINFO.map" + 77) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_applicationStub.exe.map" or "\epoc32\release\ARMV5\urel\ap_applicationStub.map" + 78) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_quickpdf.exe.map" or "\epoc32\release\ARMV5\urel\ap_quickpdf.map" + 79) WARNING: File \epoc32\data\Z\Resource\APPS\ap_registration.rom does not exist or is 0 bytes in length. + 80) Warning: Can't open "\epoc32\release\ARMV5\urel\ap_CES_HTTP.dll.map" or "\epoc32\release\ARMV5\urel\ap_CES_HTTP.map" + 81) WARNING: File \epoc32\data\Z\private\102033E6\installer\inst_plugins.cfg does not exist or is 0 bytes in length. + 82) Warning: Can't open "\epoc32\release\ARMV5\urel\arcimagefundamental.dll.map" or "\epoc32\release\ARMV5\urel\arcimagefundamental.map" + 83) Warning: Can't open "\epoc32\release\ARMV5\urel\arcplatform.dll.map" or "\epoc32\release\ARMV5\urel\arcplatform.map" + 84) Warning: Can't open "\epoc32\release\ARMV5\urel\arcimagecodecs.dll.map" or "\epoc32\release\ARMV5\urel\arcimagecodecs.map" + 85) Warning: Can't open "\epoc32\release\ARMV5\urel\photoeditor.exe.map" or "\epoc32\release\ARMV5\urel\photoeditor.map" + 86) Warning: Can't open "\epoc32\release\ARMV5\urel\arcamui.dll.map" or "\epoc32\release\ARMV5\urel\arcamui.map" + 87) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpebasictool.dll.map" or "\epoc32\release\ARMV5\urel\arcpebasictool.map" + 88) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpebase.dll.map" or "\epoc32\release\ARMV5\urel\arcpebase.map" + 89) Warning: Can't open "\epoc32\release\ARMV5\urel\arcpemanager.dll.map" or "\epoc32\release\ARMV5\urel\arcpemanager.map" + 90) Warning: Can't open "\epoc32\release\ARMV5\urel\arcampe.dll.map" or "\epoc32\release\ARMV5\urel\arcampe.map" + 91) Warning: Can't open "\epoc32\release\ARMV5\urel\photoeditoraiwplugin.dll.map" or "\epoc32\release\ARMV5\urel\photoeditoraiwplugin.map" + 92) WARNING: File \epoc32\data\Z\Resource\APPS\registration.rom does not exist or is 0 bytes in length. + 93) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_LServer.exe.map" or "\epoc32\release\ARMV5\urel\QO_LServer.map" + 94) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_devicetransport.dll.map" or "\epoc32\release\ARMV5\urel\ces_devicetransport.map" + 95) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\CES_CoreComponents.map" + 96) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pdfrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pdfrecognizer.map" + 97) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_OGLES_Charts.dll.map" or "\epoc32\release\ARMV5\urel\CES_OGLES_Charts.map" + 98) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_filelistfmplugin.dll.map" or "\epoc32\release\ARMV5\urel\ces_filelistfmplugin.map" + 99) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptfilterinfo.map" +100) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptfilter.map" +101) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptrecognizer.map" +102) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptxfilterinfo.map" +103) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_ziprecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_ziprecognizer.map" +104) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_PPTX_Engine_Conv.dll.map" or "\epoc32\release\ARMV5\urel\QO_PPTX_Engine_Conv.map" +105) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pptxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_pptxrecognizer.map" +106) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qorecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_qorecognizer.map" +107) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qshdescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qshdescriptor.map" +108) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qwddescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qwddescriptor.map" +109) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_qptdescriptor.dll.map" or "\epoc32\release\ARMV5\urel\ces_qptdescriptor.map" +110) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_PPTXFILTER.DLL.map" or "\epoc32\release\ARMV5\urel\CES_PPTXFILTER.map" +111) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_QWS_SpellChecker.dll.map" or "\epoc32\release\ARMV5\urel\CES_QWS_SpellChecker.map" +112) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_RichText_Engine.dll.map" or "\epoc32\release\ARMV5\urel\CES_RichText_Engine.map" +113) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtfilter.map" +114) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtfilterinfo.map" +115) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_S60_CoreComponents.dll.map" or "\epoc32\release\ARMV5\urel\CES_S60_CoreComponents.map" +116) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_txtrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_txtrecognizer.map" +117) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdfilter.map" +118) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdfilterinfo.map" +119) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdrecognizer.map" +120) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxfilterinfo.map" +121) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxrecognizer.map" +122) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_wrdxfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_wrdxfilter.map" +123) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsfilter.map" +124) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsfilterinfo.map" +125) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsrecognizer.map" +126) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxfilterinfo.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxfilterinfo.map" +127) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxrecognizer.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxrecognizer.map" +128) Warning: Can't open "\epoc32\release\ARMV5\urel\FMPluginBase.dll.map" or "\epoc32\release\ARMV5\urel\FMPluginBase.map" +129) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_xlsxfilter.dll.map" or "\epoc32\release\ARMV5\urel\ces_xlsxfilter.map" +130) Warning: Can't open "\epoc32\release\ARMV5\urel\HDExcel2.dll.map" or "\epoc32\release\ARMV5\urel\HDExcel2.map" +131) Warning: Can't open "\epoc32\release\ARMV5\urel\HDMetafile2.dll.map" or "\epoc32\release\ARMV5\urel\HDMetafile2.map" +132) Warning: Can't open "\epoc32\release\ARMV5\urel\HDOfficeCommon2.dll.map" or "\epoc32\release\ARMV5\urel\HDOfficeCommon2.map" +133) Warning: Can't open "\epoc32\release\ARMV5\urel\QO_FileManager.exe.map" or "\epoc32\release\ARMV5\urel\QO_FileManager.map" +134) Warning: Can't open "\epoc32\release\ARMV5\urel\HDPowerPoint2.dll.map" or "\epoc32\release\ARMV5\urel\HDPowerPoint2.map" +135) Warning: Can't open "\epoc32\release\ARMV5\urel\HDWord2.dll.map" or "\epoc32\release\ARMV5\urel\HDWord2.map" +136) Warning: Can't open "\epoc32\release\ARMV5\urel\quickpoint.exe.map" or "\epoc32\release\ARMV5\urel\quickpoint.map" +137) Warning: Can't open "\epoc32\release\ARMV5\urel\quicksheet.exe.map" or "\epoc32\release\ARMV5\urel\quicksheet.map" +138) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickpoint_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quickpoint_DOM.map" +139) Warning: Can't open "\epoc32\release\ARMV5\urel\Quicksheet_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quicksheet_DOM.map" +140) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickword.exe.map" or "\epoc32\release\ARMV5\urel\Quickword.map" +141) Warning: Can't open "\epoc32\release\ARMV5\urel\SYB_XMLArchive.dll.map" or "\epoc32\release\ARMV5\urel\SYB_XMLArchive.map" +142) Warning: Can't open "\epoc32\release\ARMV5\urel\Quickword_DOM.dll.map" or "\epoc32\release\ARMV5\urel\Quickword_DOM.map" +143) Warning: Can't open "\epoc32\release\ARMV5\urel\QuickPDFStub.exe.map" or "\epoc32\release\ARMV5\urel\QuickPDFStub.map" +144) Warning: Can't open "\epoc32\release\ARMV5\urel\CES_HTTP.dll.map" or "\epoc32\release\ARMV5\urel\CES_HTTP.map" +145) Warning: Can't open "\epoc32\release\ARMV5\urel\ces_pdffilterinfostub.dll.map" or "\epoc32\release\ARMV5\urel\ces_pdffilterinfostub.map" +146) Warning: Can't open "\epoc32\release\ARMV5\urel\zip.dll.map" or "\epoc32\release\ARMV5\urel\zip.map" +147) Warning: Can't open "\epoc32\release\ARMV5\urel\videoeditor.exe.map" or "\epoc32\release\ARMV5\urel\videoeditor.map" +148) Warning: Can't open "\epoc32\release\ARMV5\urel\amur.dll.map" or "\epoc32\release\ARMV5\urel\amur.map" +149) Warning: Can't open "\epoc32\release\ARMV5\urel\arcavcodecs.dll.map" or "\epoc32\release\ARMV5\urel\arcavcodecs.map" +150) Warning: Can't open "\epoc32\release\ARMV5\urel\amvesession.dll.map" or "\epoc32\release\ARMV5\urel\amvesession.map" +151) Warning: Can't open "\epoc32\release\ARMV5\urel\videoeditoraiwplugin.dll.map" or "\epoc32\release\ARMV5\urel\videoeditoraiwplugin.map" +152) Warning: Can't open "\epoc32\release\ARMV5\urel\3GPExtParser.dll.map" or "\epoc32\release\ARMV5\urel\3GPExtParser.map" +153) Warning: Can't open "\epoc32\release\ARMV5\urel\VtcpCmpFilter.dll.map" or "\epoc32\release\ARMV5\urel\VtcpCmpFilter.map" +154) Warning: Can't open "\epoc32\release\ARMV5\urel\SenVtcpTransport.dll.map" or "\epoc32\release\ARMV5\urel\SenVtcpTransport.map" +155) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmkeystorage.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmkeystorage.map" +156) Warning: Can't open "\epoc32\release\ARMV5\urel\hxwmdrmplugin.dll.map" or "\epoc32\release\ARMV5\urel\hxwmdrmplugin.map" +157) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmota.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmota.map" +158) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkclient.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpkclient.map" +159) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkserver.exe.map" or "\epoc32\release\ARMV5\urel\wmdrmpkserver.map" +160) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpkclientwrapper.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpkclientwrapper.map" +161) Warning: Can't open "\epoc32\release\ARMV5\urel\cameseutility.dll.map" or "\epoc32\release\ARMV5\urel\cameseutility.map" +162) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmagent.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmagent.map" +163) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmdla.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmdla.map" +164) Warning: Can't open "\epoc32\release\ARMV5\urel\wmdrmpd.dll.map" or "\epoc32\release\ARMV5\urel\wmdrmpd.map" +165) Warning: Can't open "\epoc32\release\gcce\urel\zipmanager.exe.map" or "\epoc32\release\gcce\urel\zipmanager.map" +166) Warning: Can't open "\epoc32\release\armv5\udeb\ctcmangui.exe.map" or "\epoc32\release\armv5\udeb\ctcmangui.map" +167) Warning: Can't open "\epoc32\release\ARMV5\urel\eunits60gui.exe.map" or "\epoc32\release\ARMV5\urel\eunits60gui.map" +168) Warning: Can't open "\epoc32\release\ARMV5\urel\eunitappenvironment.exe.map" or "\epoc32\release\ARMV5\urel\eunitappenvironment.map" +169) Warning: Can't open "\epoc32\release\ARMV5\urel\euniteikappenvironment.exe.map" or "\epoc32\release\ARMV5\urel\euniteikappenvironment.map" +170) Warning: Can't open "\epoc32\release\ARMV5\urel\qakitcommonui.dll.map" or "\epoc32\release\ARMV5\urel\qakitcommonui.map" +171) Warning: Can't open "\epoc32\release\ARMV5\urel\digiaconnect.exe.map" or "\epoc32\release\ARMV5\urel\digiaconnect.map" + +Error(s): +1) ERROR: (/epoc32/include/s60customswfeatures.xml) Feature "KFEATUREIDFFMOBILITYMANAGEMENTERRORS" already exists +=============================================================================== +Target: core-image Duration: 14:26 Status: OK +iMaker log = `Y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd_imaker_core-image.log' +Core (ROM & ROFS1) dir = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd' +Core ROM image = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rom.img' +Core ROM symbols = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rom.symbol' +Core ROFS1 image = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rofs1.img' +Core ROFS1 symbols = `y:/output/release_flash_images/productexample/rnd/core/RM-XXX_010.014_79.92.2010.15_rnd/RM-XXX_010.014_79.92.2010.15_rnd.rofs1.symbol' +------------------------------------------------------------------------------- +Total duration: 14:29 Status: OK +=============================================================================== \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/imaker/rombuild_result.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/imaker/rombuild_result.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,27 @@ +<#-- +============================================================================ +Name : whatlog_result.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +number.of.logs=${table_info['jpasingle']['select count(l.path) from LogFile l'][0]} +number.of.components=${table_info['jpasingle']['select count(c.component) from Component c'][0]} +number.of.errors=${table_info['jpasingle']['select count(e.id) from MetadataEntry e JOIN e.severity as p WHERE p.severity=\'ERROR\''][0]} + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/log-with-same-root-name.log --- a/buildframework/helium/sf/java/metadata/tests/data/log-with-same-root-name.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -ERROR: from log-with-same-root-name.log \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/log-with-same-root-name.log.log --- a/buildframework/helium/sf/java/metadata/tests/data/log-with-same-root-name.log.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -ERROR: from log-with-same-root-name.log.log \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/metadata_regex.csv --- a/buildframework/helium/sf/java/metadata/tests/data/metadata_regex.csv Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/tests/data/metadata_regex.csv Mon Sep 13 13:11:19 2010 +0800 @@ -1,4 +1,4 @@ -priority,regex,description +severity,regex,description CRITICAL,.*Error:.*mingw_make\.exe.*, ERROR,.*\): Missing file:.*, ERROR,(?:(?:\s*\d+\)\s*)|(?:\s*\*\*\*\s*))ERROR:.*, diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/metadata_regex_compile.csv --- a/buildframework/helium/sf/java/metadata/tests/data/metadata_regex_compile.csv Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/tests/data/metadata_regex_compile.csv Mon Sep 13 13:11:19 2010 +0800 @@ -1,4 +1,4 @@ -priority,regex,description +severity,regex,description ERROR,.*target pattern contains no.*, ERROR,.*mixed implicit and static pattern rules.*, ERROR,.*multiple target patterns.*, diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/metadatacount_error_and_missing_files.log --- a/buildframework/helium/sf/java/metadata/tests/data/metadatacount_error_and_missing_files.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ - - -sbs: version 2.12.3 [2010-02-23 symbian build system 007900c31eef] - -SBS_HOME C:/apps/sbs -Set-up C:/apps/sbs/sbs_init.xml -Command-line-arguments -s G:\output\build\canonical_system_definition_dfs_build_export.xml --filters=FilterMetadataLog -k --logfile G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log --makefile=G:\output\logs/makefile/92_7952_201006_32_dfs_build_export --export-only -e emake --mo=--emake-emulation=gmake --mo=--emake-annofile=#MAKEFILE#.emake.anno --mo=--emake-class=DFS_7x01-64 --mo=--emake-annodetail=basic,history,file,waiting --mo=--case-sensitive=0 --mo=--emake-root=G:/;\;C:\apps;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium;C:\apps\sbs -Current working directory G:\ -Environment /S=BHTEST001 -Environment ABLD_TOOLSMOD_COMPATIBILITY_MODE=alpha -Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users -Environment APTLMHOST=@oupelic4.emea.nsn-net.net -Environment ARMLMD_LICENSE_FILE=8224@trelic01;8224@salmg01;28747@saslmg04; -Environment ARMROOT=\ -Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] -Environment BASE=E:\build_e\wbernard\hudson -Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log -Environment CMTHOME=C:\APPS\cmt -Environment COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files -Environment COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files -Environment COMMONPROGRAMW6432=C:\Program Files\Common Files -Environment COMPUTERNAME=TRWEC090 -Environment COMSPEC=C:\ETPWIN\system32\cmd.exe -Environment COPYCMD=/y -Environment CTCHOME=C:\APPS\ctc -Environment CTC_AGENT_DEBUG=* -Environment CYGWIN=nontsec nosmbntsec -Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB -Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT -Environment EMAKE_CM=trwec001 -Environment EMAKE_EMULATION=symbian -Environment EMAKE_ROOT=\;C:\apps -Environment EPOCROOT=\ -Environment EXECUTOR_NUMBER=3 -Environment FLEXLM_BATCH=1 -Environment FLEXLM_TIMEOUT=900000 -Environment FP_NO_HOST_CHECK=NO -Environment HELIUM_CACHE_DIR=e:\ec_temp\helium\wbernard -Environment HELIUM_HOME=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium -Environment HOME=h:\ -Environment HOSTPLATFORM=win 32 -Environment HOSTPLATFORM_DIR=win32 -Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ -Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 -Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 -Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 -Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 -Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ -Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 -Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK -Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs -Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; -Environment NODE_NAME=trwec090 -Environment NUMBER_OF_PROCESSORS=12 -Environment OS=Windows_NT -Environment PATH=C:\apps\sbs\win32\mingw\bin;C:\apps\sbs\win32\cygwin\bin;C:\apps\sbs\win32\bin;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\HP\NCU;c:\ECloud\i686_win32\bin;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem;C:\ETPWIN\sysWOW64;C:\PROGRA~2\PuTTY;C:\APPS\MSVC6\Common\Tools\WinNT;C:\APPS\MSVC6\Common\MSDev98\Bin;C:\APPS\MSVC6\Common\Tools;C:\APPS\MSVC6\VC98\bin;C:\EESP\System32;C:\APPS\pclint;C:\APPS\cmt\;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\cltools;C:\APPS\symrec;C:\APPS\7zip;C:\APPS\understand\bin\pc-win95;C:\APPS\unzip;C:\APPS\jdk_1.6.0_11\bin;C:\apps\mercurial;C:\APPS\ant_1.7\bin;C:\Program Files\subversion;C:\APPS\sbs\bin;C:\APPS\actpython\.;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\symdec;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\unxutils;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\Subversion\bin;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc -Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 -Environment PERL=C:\APPS\actperl\bin\perl.exe -Environment PERL5LIB=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\tools\common\packages -Environment PID=6932 -Environment PROCESSOR_ARCHITECTURE=x86 -Environment PROCESSOR_ARCHITEW6432=AMD64 -Environment PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 8 Stepping 0, AuthenticAMD -Environment PROCESSOR_LEVEL=16 -Environment PROCESSOR_REVISION=0800 -Environment PROGRAMFILES=C:\Program Files (x86) -Environment PROGRAMFILES(X86)=C:\Program Files (x86) -Environment PROGRAMW6432=C:\Program Files -Environment PROMPT=$P$G -Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ -Environment PYTHONPATH=C:\apps\sbs\win32\python264 -Environment PYTHONVERSION=2.6 -Environment RVCT22BIN=C:\APPS\rvct22_686\bin -Environment RVCT22INC=C:\APPS\rvct22_686\include -Environment RVCT22LIB=C:\APPS\rvct22_686\lib -Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense -Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense -Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense -Environment SBS_CLEAN_LOG_FILE=G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log.clean.log -Environment SBS_HOME=C:\apps\sbs -Environment SBS_PYTHON=C:\APPS\actpython\python.exe -Environment SYMSEE_VERSION=11.2.0 -Environment SYSTEMDRIVE=C: -Environment SYSTEMROOT=C:\ETPWIN -Environment TEAM=helium_tampere64.92 -Environment TEMP=e:\ec_temp -Environment TESTED_ANT=C:\APPS\ant_1.7 -Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 -Environment TMP=e:\ec_temp -Environment TMPDIR=e:\ec_tmpdir -Environment WINDIR=C:\ETPWIN -Environment WORKSPACE=E:\build_e\wbernard\hudson\workspace\TB92-64bit -Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe -Environment _USE_CLASSPATH=no -Environment __CYGWIN__=C:\apps\sbs\win32\cygwin -Environment __MINGW__=C:\apps\sbs\win32\mingw -Environment __PYTHON__=C:\APPS\actpython\python.exe -Duplicate alias 'make' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Duplicate alias 'emake' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Buildable configuration 'armv5_urel' -Buildable configuration 'armv5_udeb' -Buildable configuration 'winscw_udeb' -Buildable configuration 'winscw_urel' -System Definition file G:/output/build/canonical_system_definition_dfs_build_export.xml -Found 372 bld.inf references in G:/output/build/canonical_system_definition_dfs_build_export.xml within 10 layers: - ncp_layer, mw_layer, os_layer, bldfirst_mw_layer, bldfirst_app_layer, app_layer, tools_layer, addon_layer, unit_test_layer, complementary_layer -Found 95 bld.inf references in layer "ncp_layer" -Found 112 bld.inf references in layer "mw_layer" -Found 25 bld.inf references in layer "os_layer" -Found 2 bld.inf references in layer "bldfirst_mw_layer" -Found 1 bld.inf references in layer "bldfirst_app_layer" -Found 98 bld.inf references in layer "app_layer" -Found 3 bld.inf references in layer "tools_layer" -Found 30 bld.inf references in layer "addon_layer" -Found 0 bld.inf references in layer "unit_test_layer" -Found 6 bld.inf references in layer "complementary_layer" -Toolcheck cache G:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed - -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "armv5_urel". -'armv5_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "armv5_udeb". -'armv5_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "winscw_udeb". -'winscw_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "winscw_urel". -'winscw_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -Processing G:/sf/mw/svgt/group/bld.inf -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/epoc32/include/platform/mw/SVGImageLoadingObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/epoc32/include/platform/mw/SVGListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/epoc32/include/platform/mw/SVGErrorImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/epoc32/include/platform/mw/SVGHyperlinkListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/epoc32/include/platform/mw/SVGAnimationListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/epoc32/include/platform/mw/SVGRequestObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/epoc32/include/platform/mw/SVGRendererId.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/epoc32/include/platform/mw/nvg.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/epoc32/include/platform/mw/MVGImageBinder.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/epoc32/include/platform/mw/NVGIcon.h -Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/epoc32/rom/include/core/mw/SVGEngine.iby -Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/epoc32/rom/include/core/mw/SvgtPluginEcom.iby -Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/epoc32/rom/include/core/mw/NVGDecoder.iby -Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/epoc32/rom/include/core/mw/NVGDecoder_SW.iby -Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/epoc32/rom/include/core/mw/VGRenderer.iby - - -G:/epoc32/include/hrv_gain_mappings.rsg -G:/epoc32/release/armv5/urel/ekeyb.dll - - - - -G:/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped - - - -G:/epoc32/include/platform/loc/65/101f6dd6_65.loc -G:/epoc32/include/platform/loc/65/101f6dd7_65.loc - - -The make-engine exited successfully. -Run time 999 seconds -Created/Updated toolcheck cache: G:/epoc32/build/toolcheck_cache_.tmp - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/metadatacount_missing_files.log --- a/buildframework/helium/sf/java/metadata/tests/data/metadatacount_missing_files.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ - - -sbs: version 2.12.3 [2010-02-23 symbian build system 007900c31eef] - -SBS_HOME C:/apps/sbs -Set-up C:/apps/sbs/sbs_init.xml -Command-line-arguments -s G:\output\build\canonical_system_definition_dfs_build_export.xml --filters=FilterMetadataLog -k --logfile G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log --makefile=G:\output\logs/makefile/92_7952_201006_32_dfs_build_export --export-only -e emake --mo=--emake-emulation=gmake --mo=--emake-annofile=#MAKEFILE#.emake.anno --mo=--emake-class=DFS_7x01-64 --mo=--emake-annodetail=basic,history,file,waiting --mo=--case-sensitive=0 --mo=--emake-root=G:/;\;C:\apps;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium;C:\apps\sbs -Current working directory G:\ -Environment /S=BHTEST001 -Environment ABLD_TOOLSMOD_COMPATIBILITY_MODE=alpha -Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users -Environment APTLMHOST=@oupelic4.emea.nsn-net.net -Environment ARMLMD_LICENSE_FILE=8224@trelic01;8224@salmg01;28747@saslmg04; -Environment ARMROOT=\ -Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] -Environment BASE=E:\build_e\wbernard\hudson -Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log -Environment CMTHOME=C:\APPS\cmt -Environment COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files -Environment COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files -Environment COMMONPROGRAMW6432=C:\Program Files\Common Files -Environment COMPUTERNAME=TRWEC090 -Environment COMSPEC=C:\ETPWIN\system32\cmd.exe -Environment COPYCMD=/y -Environment CTCHOME=C:\APPS\ctc -Environment CTC_AGENT_DEBUG=* -Environment CYGWIN=nontsec nosmbntsec -Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB -Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT -Environment EMAKE_CM=trwec001 -Environment EMAKE_EMULATION=symbian -Environment EMAKE_ROOT=\;C:\apps -Environment EPOCROOT=\ -Environment EXECUTOR_NUMBER=3 -Environment FLEXLM_BATCH=1 -Environment FLEXLM_TIMEOUT=900000 -Environment FP_NO_HOST_CHECK=NO -Environment HELIUM_CACHE_DIR=e:\ec_temp\helium\wbernard -Environment HELIUM_HOME=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium -Environment HOME=h:\ -Environment HOSTPLATFORM=win 32 -Environment HOSTPLATFORM_DIR=win32 -Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ -Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 -Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 -Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 -Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 -Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ -Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 -Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK -Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs -Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; -Environment NODE_NAME=trwec090 -Environment NUMBER_OF_PROCESSORS=12 -Environment OS=Windows_NT -Environment PATH=C:\apps\sbs\win32\mingw\bin;C:\apps\sbs\win32\cygwin\bin;C:\apps\sbs\win32\bin;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\HP\NCU;c:\ECloud\i686_win32\bin;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem;C:\ETPWIN\sysWOW64;C:\PROGRA~2\PuTTY;C:\APPS\MSVC6\Common\Tools\WinNT;C:\APPS\MSVC6\Common\MSDev98\Bin;C:\APPS\MSVC6\Common\Tools;C:\APPS\MSVC6\VC98\bin;C:\EESP\System32;C:\APPS\pclint;C:\APPS\cmt\;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\cltools;C:\APPS\symrec;C:\APPS\7zip;C:\APPS\understand\bin\pc-win95;C:\APPS\unzip;C:\APPS\jdk_1.6.0_11\bin;C:\apps\mercurial;C:\APPS\ant_1.7\bin;C:\Program Files\subversion;C:\APPS\sbs\bin;C:\APPS\actpython\.;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\symdec;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\unxutils;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\Subversion\bin;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc -Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 -Environment PERL=C:\APPS\actperl\bin\perl.exe -Environment PERL5LIB=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\tools\common\packages -Environment PID=6932 -Environment PROCESSOR_ARCHITECTURE=x86 -Environment PROCESSOR_ARCHITEW6432=AMD64 -Environment PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 8 Stepping 0, AuthenticAMD -Environment PROCESSOR_LEVEL=16 -Environment PROCESSOR_REVISION=0800 -Environment PROGRAMFILES=C:\Program Files (x86) -Environment PROGRAMFILES(X86)=C:\Program Files (x86) -Environment PROGRAMW6432=C:\Program Files -Environment PROMPT=$P$G -Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ -Environment PYTHONPATH=C:\apps\sbs\win32\python264 -Environment PYTHONVERSION=2.6 -Environment RVCT22BIN=C:\APPS\rvct22_686\bin -Environment RVCT22INC=C:\APPS\rvct22_686\include -Environment RVCT22LIB=C:\APPS\rvct22_686\lib -Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense -Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense -Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense -Environment SBS_CLEAN_LOG_FILE=G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log.clean.log -Environment SBS_HOME=C:\apps\sbs -Environment SBS_PYTHON=C:\APPS\actpython\python.exe -Environment SYMSEE_VERSION=11.2.0 -Environment SYSTEMDRIVE=C: -Environment SYSTEMROOT=C:\ETPWIN -Environment TEAM=helium_tampere64.92 -Environment TEMP=e:\ec_temp -Environment TESTED_ANT=C:\APPS\ant_1.7 -Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 -Environment TMP=e:\ec_temp -Environment TMPDIR=e:\ec_tmpdir -Environment WINDIR=C:\ETPWIN -Environment WORKSPACE=E:\build_e\wbernard\hudson\workspace\TB92-64bit -Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe -Environment _USE_CLASSPATH=no -Environment __CYGWIN__=C:\apps\sbs\win32\cygwin -Environment __MINGW__=C:\apps\sbs\win32\mingw -Environment __PYTHON__=C:\APPS\actpython\python.exe -Duplicate alias 'make' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Duplicate alias 'emake' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') -Buildable configuration 'armv5_urel' -Buildable configuration 'armv5_udeb' -Buildable configuration 'winscw_udeb' -Buildable configuration 'winscw_urel' -System Definition file G:/output/build/canonical_system_definition_dfs_build_export.xml -Found 372 bld.inf references in G:/output/build/canonical_system_definition_dfs_build_export.xml within 10 layers: - ncp_layer, mw_layer, os_layer, bldfirst_mw_layer, bldfirst_app_layer, app_layer, tools_layer, addon_layer, unit_test_layer, complementary_layer -Found 95 bld.inf references in layer "ncp_layer" -Found 112 bld.inf references in layer "mw_layer" -Found 25 bld.inf references in layer "os_layer" -Found 2 bld.inf references in layer "bldfirst_mw_layer" -Found 1 bld.inf references in layer "bldfirst_app_layer" -Found 98 bld.inf references in layer "app_layer" -Found 3 bld.inf references in layer "tools_layer" -Found 30 bld.inf references in layer "addon_layer" -Found 0 bld.inf references in layer "unit_test_layer" -Found 6 bld.inf references in layer "complementary_layer" -Toolcheck cache G:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed - -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "armv5_urel". -'armv5_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "armv5_udeb". -'armv5_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "winscw_udeb". -'winscw_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" -applying the OS variant to the configuration "winscw_urel". -'winscw_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' -Processing G:/sf/mw/svgt/group/bld.inf -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/epoc32/include/platform/mw/SVGImageLoadingObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/epoc32/include/platform/mw/SVGListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/epoc32/include/platform/mw/SVGErrorImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/epoc32/include/platform/mw/SVGHyperlinkListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/epoc32/include/platform/mw/SVGAnimationListener.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/epoc32/include/platform/mw/SVGRequestObserver.h -Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/epoc32/include/platform/mw/SVGRendererId.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/epoc32/include/platform/mw/nvg.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/epoc32/include/platform/mw/MVGImageBinder.h -Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/epoc32/include/platform/mw/NVGIcon.h -Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/epoc32/rom/include/core/mw/SVGEngine.iby -Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/epoc32/rom/include/core/mw/SvgtPluginEcom.iby -Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/epoc32/rom/include/core/mw/NVGDecoder.iby -Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/epoc32/rom/include/core/mw/NVGDecoder_SW.iby -Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/epoc32/rom/include/core/mw/VGRenderer.iby - - -G:/epoc32/include/hrv_gain_mappings.rsg -G:/epoc32/release/armv5/urel/ekeyb.dll - - -G:/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped - - - -G:/epoc32/include/platform/loc/65/101f6dd6_65.loc -G:/epoc32/include/platform/loc/65/101f6dd7_65.loc - - -The make-engine exited successfully. -Run time 999 seconds -Created/Updated toolcheck cache: G:/epoc32/build/toolcheck_cache_.tmp - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/parser_error.log --- a/buildframework/helium/sf/java/metadata/tests/data/parser_error.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ - - - - -make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/urel/srchuiresultview.o] Error 1 - -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" -"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via -X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym -X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 -X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb -X:/epoc32/release/armv5/udeb -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5/lib -X:/epoc32/release/armv5.product/udeb - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/parsing_result.ini.ftl --- a/buildframework/helium/sf/java/metadata/tests/data/parsing_result.ini.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -<#-- -============================================================================ -Name : whatlog_result.ini.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> -<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > -number.of.logs=${table_info['jpasingle']['select count(l.path) path from LogFile l'][0]} -number.of.metadata.entries=${table_info['jpasingle']['select count(e) from MetadataEntry e'][0]} -number.of.execution.times=${table_info['jpasingle']['select count(e) path from ExecutionTime e'][0]} -number.of.components=${table_info['jpasingle']['select count(c) path from Component c'][0]} -<#assign c = 0 /> -<#list table_info['jpa']['select e from ExecutionTime e'] as e> -execution.time.${c}=${e.time} -<#assign c = c + 1 /> - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/policy/validate_policy.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/policy/validate_policy.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/receipe_lengthy_warn.log --- a/buildframework/helium/sf/java/metadata/tests/data/receipe_lengthy_warn.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ - - -sbs: version 2.5.3 [2009-03-12 release] - -SBS_HOME E:/Build_E/ido-config-df/sbs -Set-up E:/Build_E/ido-config-df/sbs/sbs_init.xml -Command-line-arguments -s z:\output/build/canonical_system_definition_build.xml -k -c armv5 -j 4 -m z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_Makefile --filters=FilterHeliumLog -f z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_compile.log - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/regex/empty.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/regex/empty.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,2 @@ + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/regex/log-with-same-root-name.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/regex/log-with-same-root-name.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,1 @@ +ERROR: from log-with-same-root-name.log \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/regex/log-with-same-root-name.log.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/regex/log-with-same-root-name.log.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,1 @@ +ERROR: from log-with-same-root-name.log.log \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sample_abld.log --- a/buildframework/helium/sf/java/metadata/tests/data/sample_abld.log Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,488 +0,0 @@ - -x:\>set -ALLUSERSPROFILE=C:\Documents and Settings\All Users -ANT_ARGS=-lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\helium-antlib\bin" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\java\lib" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\antlibs" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\antlibs\internal" -lib "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\jep_1.6_2.5" -logger com.nokia.ant.HeliumLogger -listener com.nokia.helium.diamonds.ant.HeliumListener -listener com.nokia.ant.listener.internaldata.Listener -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.ant.listener.TracingLogger -ANT_CMD_LINE_ARGS=-Dhelium.dir "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium" -listener nokia.ant.XmlLogger -DXmlLogger.file E:\BUILD_E\ido-config-cc-svn\cruisecontrol/../robot/log.xml -Dcclastbuildtimestamp 20090702114112 "-Dcvstimestamp=2009-07-02 12:11:44 GMT" -Dbuildforced false -Dcclastgoodbuildtimestamp 20090606000000 -Dcctimestamp 20090702131144 -Dlabel build.33 -Dprojectname ido_abs_tb92-nightly -Dlastbuildsuccessful false -Dbuild.system ec-helium -Dconfiguration.dir E:\BUILD_E\ido-config-cc-svn\cruisecontrol/../idos/abs/branches/tb92-nightly -Dbuild.drive x: -Ds60.grace.cache E:\BUILD_E\ido-config-cc-svn\build/ido_abs_tb92-nightly_grace_cache.txt -Dskip.codescanner true -Dcc.output.dir E:\BUILD_E\ido-config-cc-svn\build -buildfile E:\BUILD_E\ido-config-cc-svn\cruisecontrol/config/wrapper.xml test-publish-prop ido-build -ANT_HOME=C:\APPS\ant_1.7 -ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -APPDATA=C:\Documents and Settings\username\Application Data -APTLMHOST=@oupelic4.emea.nsn-net.net -ARMLMD_LICENSE_FILE=8224@fake1.domain.invalid;8224@fake2.domain.invalid; -ARMROOT=\ -ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 593] -CCDIR=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\ -CC_BAT=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\real_cruisecontrol.bat -CC_OPTS= -Ddashboard.config=E:\BUILD_E\ido-config-cc-svn\build\helium-dashboard-config.xml -Xms512m -Xmx1024m -CLASSPATH=e:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib;%CLASSPATH% -CLIENTNAME=4GBD01728 -ClusterLog=C:\EESP\Cluster\cluster.log -CMTHOME=C:\APPS\cmt -CommonProgramFiles=C:\Program Files\Common Files -COMPUTERNAME=FASYM011 -ComSpec=C:\EESP\system32\cmd.exe -COPYCMD=/y -CRUISE_PATH=C:\Apps\j2sdk_1.6.0_02\lib\tools.jar -CTCHOME=C:\APPS\ctc -DERBY_HOME=C:\APPS\j2sdk_1.6.0_02\JavaDB -DIAMONDS_ANT_ARGS= -listener com.nokia.helium.diamonds.ant.HeliumListener -EMAKEFLAGS=--no-print-directory --emake-volatile=.def,.info,.class,.mmp --emake-reg-roots=-\HKEY_CLASSES_ROOT -EMAKE_CM=fawec001 -EMAKE_EMULATION=symbian -EMAKE_ROOT=\;c:\apps -EPOCROOT=\ -EXEC="C:\Apps\j2sdk_1.6.0_02\bin\java" -Ddashboard.config=E:\BUILD_E\ido-config-cc-svn\build\helium-dashboard-config.xml -Xms512m -Xmx1024m -Djmx.remote.x.server.connection.timeout=-1 -Djmx.remote.x.client.connection.check.period=0 -jar "E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib\cruisecontrol-launcher.jar" -webapppath E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl/webapps/cruisecontrol -dashboard E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl/webapps/dashboard -webport 8080 -rmiport 1099 -FILTERWHAT_FILE=\output\logs\about_what.log -FLEXLM_BATCH=1 -FLEXLM_TIMEOUT=900000 -FP_NO_HOST_CHECK=NO -HELIUM_CACHE_DIR=C:\DOCUME~1\username\LOCALS~1\Temp\2\helium\varamana -HELIUM_HOME=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium -HLM_ENABLE_MEM_TRACING=1 -HLM_MEM_TRACING_ANT_ARGS= -listener com.nokia.ant.listener.TracingLogger -HOME=h:\ -HOMEDRIVE=C: -HOMEPATH=\Documents and Settings\username -include=C:\apps\msvc6\VC98\ATL\INCLUDE;C:\apps\msvc6\VC98\INCLUDE;C:\apps\msvc6\VC98\MFC\INCLUDE;C:\apps\msvc6\VC98\atl\include;C:\apps\msvc6\VC98\mfc\include;C:\apps\msvc6\VC98\include -INTERNAL_DATA_ANT_ARGS= -listener com.nokia.ant.listener.internaldata.Listener -JAVA_1_3_1_HOME=C:\APPS\j2sdk_1.3.1_06 -JAVA_HOME=C:\Apps\j2sdk_1.6.0_02 -JAVA_PATH="C:\Apps\j2sdk_1.6.0_02\bin\java" -JEP_HOME=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\jep_1.6_2.5 -LAUNCHER=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib\cruisecontrol-launcher.jar -lib=C:\apps\msvc6\VC98\LIB;C:\apps\msvc6\VC98\MFC\LIB;C:\apps\msvc6\VC98\mfc\lib;C:\apps\msvc6\VC98\lib -LIBDIR=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\CruiseControl\lib -LM_LICENSE_FILE=C:\APPS\licenses\emea.dat;1700@fake1.domain.invalid;C:\APPS\licenses\PCLint.dat;6969@sfake2.domain.invalid; -LOGONSERVER=\\CAWDC101 -MSDevDir=C:\apps\msvc6\Common\msdev98 -MSVCDir=C:\apps\msvc6\VC98 -MSVC_ENV_BAT=c:\APPS\msvc6\VC98\Bin\VCVARS32.BAT -MWCSym2Includes=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK -MWSym2Libraries=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs -MWSym2LibraryFiles=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; -NOKIA_LICENSE_FILE=C:\APPS\licenses\emea.dat; -NUMBER_OF_PROCESSORS=4 -OS=Windows_NT -Path=C:\apps\msvc6\Common\msdev98\BIN;C:\apps\msvc6\VC98\BIN;C:\apps\msvc6\Common\TOOLS\WINNT;C:\apps\msvc6\Common\TOOLS;e:\BUILD_E\ido-config-cc-svn\sbs\bin;e:\BUILD_E\slick-svn\bin;c:\ECloud\i686_win32\bin;C:\Program Files\HP\NCU;c:\apps\actperl\bin\;c:\apps\rvct22_593\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86build\symbian_tools\command_line_tools;c:\apps\symdec;c:\apps\actpython\.;C:\Symbian\SITK\stat\bin;C:\Symbian\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:\Symbian\SITK\ucc\bin;C:\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\TestDriverService\bin;C:\Symbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver\product;C:\Symbian\SITK\imgcheck;C:\Symbian\SITK\SystemModelGenerator;C:\Symbian\SITK/sbs/bin;;c:\program files\hp\ncu;c:\program files\windows resource kits\tools\;c:\eesp\system32;c:\eesp\system32\wbem;c:\apps\msvc6\common\tools\winnt;c:\apps\msvc6\common\msdev98\bin;c:\apps\msvc6\vc98\bin;c:\progra~1\winzip;c:\apps\wget;c:\apps\ant_1.7\bin;c:\apps\understand\bin\pc-win95;c:\etpwin\system32;c:\etpwin\system32\wbem;c:\apps\sbs\bin;c:\apps\pclint;c:\apps\cltools;c:\apps\codescanner;c:\apps\symrec;c:\apps\gracecli\bin;c:\apps\7zip;c:\apps\ctc;c:\apps\unzip;c:\apps\bc;c:\apps\cmt\;c:\apps\j2sdk_1.6.0_02;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\jep_1.6_2.5;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\bin;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\unxutils;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\filedisk;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\info-zip;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\Subversion\bin;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\graphviz\bin;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\LSC_5.2;\tools;\tools\ncp_tools;C:\APPS\ctc;C:\EESP\system32;C:\EESP;C:\EESP\System32\Wbem\;C:\EESP\system32;C:\EESP;C:\EESP\System32\Wbem;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem -PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw -PERL=C:\APPS\actperl\bin\perl.exe -PERL5LIB=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\packages -PID=8296 -ppd_tools=\tools\ -PROCESSOR_ARCHITECTURE=x86 -PROCESSOR_IDENTIFIER=x86 Family 15 Model 5 Stepping 10, AuthenticAMD -PROCESSOR_LEVEL=15 -PROCESSOR_REVISION=050a -ProgramFiles=C:\Program Files -PROMPT=$P$G -PYTHONPATH=E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\external\python\lib\2.5;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium\tools\common\python\lib;e:\BUILD_E\ido-config-cc-svn\sbs\python -RVCT22BIN=C:\APPS\rvct22_593\bin -RVCT22INC=C:\APPS\rvct22_593\include -RVCT22LIB=C:\APPS\rvct22_593\lib -RVCT22_ASMOPT=--licretry --fastlicense --sitelicense -RVCT22_CCOPT=--licretry --fastlicense --sitelicense -RVCT22_LINKOPT=--licretry --fastlicense --sitelicense -SBS_HOME=e:\BUILD_E\ido-config-cc-svn\sbs -SESSIONNAME=RDP-Tcp#22 -SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -SITK_PATHS=C:\Symbian\SITK\stat\bin;C:\Symbian\SITK;C:\Symbian\SITK\edgd\bin\;C:\Symbian\SITK\cbr;C:\Symbian\SITK\ucc\bin;C:\Symbian\SITK\ucc\SyncService\bin;C:\Symbian\SITK\ucc\TestDriverService\bin;C:\Symbian\SITK\sqlite-db-creator;C:\Symbian\SITK\testdriver\product;C:\Symbian\SITK\imgcheck;C:\Symbian\SITK\SystemModelGenerator;C:\Symbian\SITK/sbs/bin; -spp_tools=\tools\ -SYMBIANBUILD_DEPENDENCYOFF=1 -SYMSEE_VERSION=9.1.0 -SystemDrive=C: -SystemRoot=C:\EESP -TEAM=xxxxxx -TEMP=C:\DOCUME~1\username\LOCALS~1\Temp\2 -TESTED_ANT=C:\APPS\ant_1.7 -TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02 -TMP=C:\DOCUME~1\username\LOCALS~1\Temp\2 -USERDNSDOMAIN=fake.domain.invalid -USERDOMAIN=userdomain -USERNAME=username -USERPROFILE=C:\Documents and Settings\username -windir=C:\EESP -_JAVACMD=C:\Apps\j2sdk_1.6.0_02\bin\java.exe -_USE_CLASSPATH=yes - -x:\>emake --emake-build-label=ido_abs_tb92-nightly_5.2.33.dfs_build --emake-class=default --emake-priority=normal --emake-maxagents=0 --emake-job-limit=0 --emake-mem-limit=1000000000 --emake-history=merge --emake-annodetail=basic,history,file,waiting --emake-annofile=x:\output\logs\ido_abs_tb92-nightly_5.2.33.dfs_build.emake.anno.xml --emake-historyfile=x:/emake.data --emake-debug=g --emake-logfile=x:\output\logs\ido_abs_tb92-nightly_5.2.33.dfs_build.emake.g.dlog --emake-root=\;c:\apps;E:\BUILD_E\ido-config-cc-svn\helium-4.0.x_lat\helium --emake-autodepend=1 -k -i -f x:/dfs_build.make LOGBUILDTIME="" VERBOSE="" SAVESPACE="" dfs_build -WARNING EC1137: Unrecognized option '--no-print-directory' in EMAKEFLAGS. -Starting build: 50896 -WARNING EC1137: Unrecognized option '--no-print-directory' in EMAKEFLAGS. -===------------------------------------------------- -=== dfs_build -===------------------------------------------------- -=== dfs_build started Thu Jul 2 13:13:58 2009 -emake -f dfs_build.make dfs_build-bldmake_bldfiles -make[1]: Entering directory `x:/' -=== dfs_build == \sf/os/graphics/group --- bldmake bldfiles -++ Started at Thu Jul 2 13:13:58 2009 -+++ HiRes Start 1246536838.91662 -cd \sf/os/graphics/group && bldmake bldfiles -keepgoing -+++ HiRes End 1246536840.97909 -++ Finished at Thu Jul 2 13:14:01 2009 -=== dfs_build == \sf/os/textandloc/group --- bldmake bldfiles -++ Started at Thu Jul 2 13:13:58 2009 -+++ HiRes Start 1246536839.05724 -cd \sf/os/textandloc/group && bldmake bldfiles -keepgoing -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -WARNING: Should install MSVC6 Service Pack 3 -+++ HiRes End 1246536842.55719 -++ Finished at Thu Jul 2 13:14:02 2009 -make[1]: Leaving directory `x:/' -emake -f dfs_build.make dfs_build-abld_export -make[1]: Entering directory `x:/' -=== dfs_build == \sf/os/graphics/group --- abld export -++ Started at Thu Jul 2 13:14:02 2009 -+++ HiRes Start 1246536843.01031 -cd \sf/os/graphics/group && abld export -keepgoing - emake -r -k -f "\EPOC32\BUILD\sf\os\graphics\group\EXPORT.make" EXPORT VERBOSE=-s KEEPGOING=-k -make[2]: Entering directory `X:/sf/os/graphics/group' -copy "\sf\os\graphics\graphics_plat\openvg_binding_api\inc\vg\vgcontext.h" "\epoc32\include\platform\vg\vgcontext.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphics_plat\openvg_binding_api\inc\vg\vgcontext_symbian.h" "\epoc32\include\platform\vg\vgcontext_symbian.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphics_plat\m3g_core_api\inc\M3G\m3g_core.h" "\epoc32\include\platform\M3G\m3g_core.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\3d_opengl_es_1_1\group\opengles_nokia.iby" "\epoc32\rom\include\opengles_nokia.iby" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\2d_openvg_1_1\rom\openvg_nokia.iby" "\epoc32\rom\include\core\os\openvg_nokia.iby" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\group\egl_sw_gce.iby" "\epoc32\rom\include\egl_sw_gce.iby" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\group\egl_sw_nongce.iby" "\epoc32\rom\include\egl_sw_nongce.iby" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\eglInternalApi.h" "\epoc32\include\platform\eglInternalApi.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\oglcontextapi.h" "\epoc32\include\platform\oglContextApi.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\ovgContextApi.h" "\epoc32\include\platform\ovgContextApi.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\include\EGL\eglWrapper.h" "\epoc32\include\platform\EGL\eglWrapper.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\products\egl\3.0\src\symbian\eglsymbianpaniccodes.h" "\epoc32\include\platform\eglsymbianpaniccodes.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\libs\hg\3.1\hgDefs.h" "\epoc32\include\platform\hgDefs.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\egl\implementation\libs\hg\3.1\hgPublicDefs.h" "\epoc32\include\platform\hgPublicDefs.h" - 1 file(s) copied. -copy "\sf\os\graphics\graphicsaccelaration\vgi\rom\libvgi.iby" "\epoc32\rom\include\core\os\libvgi.iby" - 1 file(s) copied. -copy "\sf\os\graphics\m3g\m3gcore11\rom\m3gcore.iby" "\epoc32\rom\include\core\os\m3gcore.iby" - 1 file(s) copied. -make[2]: Leaving directory `X:/sf/os/graphics/group' -+++ HiRes End 1246536843.8853 -++ Finished at Thu Jul 2 13:14:03 2009 -=== dfs_build == \sf/os/textandloc/group --- abld export -++ Started at Thu Jul 2 13:14:02 2009 -+++ HiRes Start 1246536843.04156 -cd \sf/os/textandloc/group && abld export -keepgoing - emake -r -k -f "\EPOC32\BUILD\sf\os\textandloc\group\EXPORT.make" EXPORT VERBOSE=-s KEEPGOING=-k -make[2]: Entering directory `X:/sf/os/textandloc/group' -Creating \sf\os\textandloc\inc -copy "\sf\os\textandloc\textandloc_plat\findutil_api\inc\FindUtil.h" "\epoc32\include\platform\FindUtil.h" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_plat\japanese_language_utilities_api\inc\jplangutil.h" "\epoc32\include\platform\mw\jplangutil.h" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_plat\character_conversion_nonpublic_api\inc\JapaneseCharConv.h" "\epoc32\include\platform\JapaneseCharConv.h" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_plat\sortutil_api\inc\SortUtil.h" "\epoc32\include\platform\SortUtil.h" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\GBK.H" "\epoc32\include\GBK.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\JISX0208.H" "\epoc32\include\JISX0208.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\GB2312.H" "\epoc32\include\GB2312.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CharacterSetConverter.h" "\epoc32\include\CharacterSetConverter.h" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CONVDATA.H" "\epoc32\include\CONVDATA.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\JISX0201.H" "\epoc32\include\JISX0201.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\UTF.H" "\epoc32\include\UTF.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\JISX0212.H" "\epoc32\include\JISX0212.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CharacterSetConverter.inl" "\epoc32\include\CharacterSetConverter.inl" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\BIG5.H" "\epoc32\include\BIG5.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CONVNAMES.H" "\epoc32\include\CONVNAMES.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\CHARCONV.H" "\epoc32\include\CHARCONV.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_api\inc\SHIFTJIS.H" "\epoc32\include\SHIFTJIS.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_plugin_provider_api\inc\CONVUTILS.H" "\epoc32\include\CONVUTILS.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\character_conversion_plugin_provider_api\inc\CONVGENERATEDCPP.H" "\epoc32\include\CONVGENERATEDCPP.H" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\directory_localizer_api\inc\DirectoryLocalizer.rh" "\epoc32\include\mw\DirectoryLocalizer.rh" - 1 file(s) copied. -copy "\sf\os\textandloc\textandloc_pub\directory_localizer_api\inc\CDirectoryLocalizer.h" "\epoc32\include\mw\CDirectoryLocalizer.h" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\localizer\rom\DirectoryLocalizer.iby" "\epoc32\rom\include\core\mw\directorylocalizer.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\localizer\rom\DirectoryLocalizerResources.iby" "\epoc32\rom\include\language\mw\directorylocalizerresources.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\localizer\loc\DirectoryLocalizer.loc" "\epoc32\include\platform\mw\loc\sc\directorylocalizer.loc" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1250.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1250.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1251.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1251.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1252.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1252.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1253.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1253.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1254.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1254.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1255.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1255.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1256.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1256.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1257.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1257.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win874.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win874.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\TIS_620.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\TIS_620.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8U.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\KOI8U.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8R.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\KOI8R.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1258.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\Win1258.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iscii.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\iscii.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\EUCKR.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\EUCKR.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iso2022kr.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\iso2022kr.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\ksc5601.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\ksc5601.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1250.snm" "\epoc32\data\z\Resource\charconv\Win1250.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1251.snm" "\epoc32\data\z\Resource\charconv\Win1251.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1252.snm" "\epoc32\data\z\Resource\charconv\Win1252.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1253.snm" "\epoc32\data\z\Resource\charconv\Win1253.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1254.snm" "\epoc32\data\z\Resource\charconv\Win1254.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1255.snm" "\epoc32\data\z\Resource\charconv\Win1255.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1256.snm" "\epoc32\data\z\Resource\charconv\Win1256.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1257.snm" "\epoc32\data\z\Resource\charconv\Win1257.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win874.snm" "\epoc32\data\z\Resource\charconv\Win874.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\TIS_620.snm" "\epoc32\data\z\Resource\charconv\TIS_620.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8U.snm" "\epoc32\data\z\Resource\charconv\KOI8U.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\KOI8R.snm" "\epoc32\data\z\Resource\charconv\KOI8R.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\Win1258.snm" "\epoc32\data\z\Resource\charconv\Win1258.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iscii.snm" "\epoc32\data\z\Resource\charconv\iscii.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\EUCKR.snm" "\epoc32\data\z\Resource\charconv\EUCKR.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\iso2022kr.snm" "\epoc32\data\z\Resource\charconv\iso2022kr.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\Data\ksc5601.snm" "\epoc32\data\z\Resource\charconv\ksc5601.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPlugin.iby" "\epoc32\rom\include\core\mw\charconvplugin.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPluginPictograph.IBY" "\epoc32\rom\include\core\mw\charconvpluginpictograph.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPluginPictograph_Variant.iby" "\epoc32\rom\include\customer\mw\charconvpluginpictograph_Variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconvplugin\rom\CharConvPlugin_Variant.IBY" "\epoc32\rom\include\customer\mw\charconvplugin_Variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\findutil\rom\Findutil.iby" "\epoc32\rom\include\core\mw\findutil.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\findutil\rom\Findutil_Variant.iby" "\epoc32\rom\include\customer\mw\findutil_Variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\numbergrouping\rom\NumberGrouping.iby" "\epoc32\rom\include\core\mw\numbergrouping.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\numbergrouping\conf\numbergrouping.confml" "\epoc32\rom\config\confml_data\s60\numbergrouping.confml" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\numbergrouping\conf\numbergrouping_101F8775.crml" "\epoc32\rom\config\confml_data\s60\numbergrouping_101F8775.crml" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\gamerecognizer\rom\GameRecognizer.iby" "\epoc32\rom\include\core\mw\gamerecognizer.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\jplangutil\rom\JPLangUtil.iby" "\epoc32\rom\include\core\mw\jplangutil.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\sortutil\rom\Sortutil.iby" "\epoc32\rom\include\core\mw\sortutil.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\sortutil\rom\SortUtil_Variant.iby" "\epoc32\rom\include\customer\mw\sortutil_Variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\aknjapanesereading\rom\AknJapaneseReading.iby" "\epoc32\rom\include\core\mw\aknjapanesereading.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVTOOL.BAT" "\epoc32\tools\CNVTOOL.BAT" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\SNMTOOL.BAT" "\epoc32\tools\SNMTOOL.BAT" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV.BAT" "\epoc32\tools\CHARCONV.BAT" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV.PL" "\epoc32\tools\CHARCONV.PL" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVTOOL.PL" "\epoc32\tools\CNVTOOL.PL" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\SNMTOOL.PL" "\epoc32\tools\SNMTOOL.PL" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\PARSER.PM" "\epoc32\tools\PARSER.PM" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\WRITER.PM" "\epoc32\tools\WRITER.PM" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\UTF.PM" "\epoc32\tools\UTF.PM" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV_EXE.IPR" "\epoc32\engdoc\tools\CHARCONV_EXE.IPR" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CHARCONV_PERLTOOLS.IPR" "\epoc32\engdoc\tools\CHARCONV_PERLTOOLS.IPR" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVAPI.RTF" "\epoc32\engdoc\charconv\CNVAPI.RTF" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\CNVTOOL.RTF" "\epoc32\engdoc\charconv\CNVTOOL.RTF" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\SNMTOOL.RTF" "\epoc32\engdoc\charconv\SNMTOOL.RTF" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\group\AUTODETECT.RTF" "\epoc32\engdoc\charconv\AUTODETECT.RTF" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\big5.dat" "\epoc32\tools\charconv\big5.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\cp1252.dat" "\epoc32\tools\charconv\cp1252.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gb12345.dat" "\epoc32\tools\charconv\gb12345.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gb2312.dat" "\epoc32\tools\charconv\gb2312.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gbk.dat" "\epoc32\tools\charconv\gbk.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88591.dat" "\epoc32\tools\charconv\iso88591.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885910.dat" "\epoc32\tools\charconv\iso885910.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885913.dat" "\epoc32\tools\charconv\iso885913.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885914.dat" "\epoc32\tools\charconv\iso885914.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso885915.dat" "\epoc32\tools\charconv\iso885915.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88592.dat" "\epoc32\tools\charconv\iso88592.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88593.dat" "\epoc32\tools\charconv\iso88593.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88594.dat" "\epoc32\tools\charconv\iso88594.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88595.dat" "\epoc32\tools\charconv\iso88595.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88596.dat" "\epoc32\tools\charconv\iso88596.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88597.dat" "\epoc32\tools\charconv\iso88597.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88598.dat" "\epoc32\tools\charconv\iso88598.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\iso88599.dat" "\epoc32\tools\charconv\iso88599.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\shiftjis.dat" "\epoc32\tools\charconv\shiftjis.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\shiftjisdirectmap.dat" "\epoc32\tools\charconv\shiftjisdirectmap.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\gsm7_turkish_single.dat" "\epoc32\tools\charconv\gsm7_turkish_single.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\turkish_locking_gsm7ext.dat" "\epoc32\tools\charconv\turkish_locking_gsm7ext.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\generateddat\turkish_locking_single.dat" "\epoc32\tools\charconv\turkish_locking_single.dat" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\include\PictographObserver.h" "\sf\os\textandloc\inc\PictographObserver.h" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\include\CnvPictographShared.h" "\sf\os\textandloc\inc\CnvPictographShared.h" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\include\CnvShiftJisDirectmap.h" "\sf\os\textandloc\inc\CnvShiftJisDirectmap.h" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\snm\basic.snm" "\epoc32\release\winscw\udeb\z\Resource\charconv\basic.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\data\snm\basic.snm" "\epoc32\data\z\Resource\charconv\basic.snm" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV.IBY" "\epoc32\rom\include\core\mw\charconv.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_SIMPLFIED.IBY" "\epoc32\rom\include\customer\mw\charconv_chinese_simplfied.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_TRADITIONAL.IBY" "\epoc32\rom\include\customer\mw\charconv_chinese_traditional.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CODEPAGE.iby" "\epoc32\rom\include\core\mw\charconv_codepage.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_ISO8859X.IBY" "\epoc32\rom\include\core\mw\charconv_iso8859x.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_JAPANESE.IBY" "\epoc32\rom\include\customer\mw\charconv_japanese.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\Charconv_Pictographs_Variant.Iby" "\epoc32\rom\include\customer\mw\charconv_pictographs_variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\charconv_gsm7_turkish_Variant.iby" "\epoc32\rom\include\customer\mw\charconv_gsm7_turkish_Variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\charconv_gsm7_turkish_Variant.iby" "\epoc32\rom\include\charconv_gsm7_turkish_Variant.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV.IBY" "\epoc32\rom\include\charconv.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CharConv_All_Plugins.iby" "\epoc32\rom\include\charconv_all_plugins.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_SIMPLFIED.IBY" "\epoc32\rom\include\charconv_chinese_simplfied.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CHINESE_TRADITIONAL.IBY" "\epoc32\rom\include\charconv_chinese_traditional.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_JAPANESE.IBY" "\epoc32\rom\include\charconv_japanese.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_CODEPAGE.iby" "\epoc32\rom\include\charconv_codepage.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\CHARCONV_ISO8859X.IBY" "\epoc32\rom\include\charconv_iso8859x.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\charconv\ongoing\rom\charconv_gsm7_turkish.iby" "\epoc32\rom\include\charconv_gsm7_turkish.iby" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\inlinetext\inc\inlinetextbase.h" "\epoc32\include\platform\mw\inlinetextbase.h" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\inlinetext\inc\inlinetextcompositesource.h" "\epoc32\include\platform\mw\inlinetextcompositesource.h" - 1 file(s) copied. -copy "\sf\os\textandloc\charconvfw\inlinetext\inc\inlinetextnomatchesindicatorsource.h" "\epoc32\include\platform\mw\inlinetextnomatchesindicatorsource.h" - 1 file(s) copied. -make[2]: Leaving directory `X:/sf/os/textandloc/group' -+++ HiRes End 1246536844.10405 -++ Finished at Thu Jul 2 13:14:04 2009 -make[1]: Leaving directory `x:/' -emake -f dfs_build.make dfs_build-abld_makefile-tools -make[1]: Entering directory `x:/' -=== dfs_build == \sf/os/graphics/group --- abld makefile -++ Started at Thu Jul 2 13:14:05 2009 -+++ HiRes Start 1246536845.63642 -cd \sf/os/graphics/group && abld makefile -keepgoing tools -This project does not support platform or program "TOOLS" -+++ HiRes End 1246536847.1364 -++ Finished at Thu Jul 2 13:14:07 2009 -=== dfs_build == \sf/os/textandloc/group --- abld makefile -++ Started at Thu Jul 2 13:14:05 2009 -+++ HiRes Start 1246536845.6208 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/build_whatlog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/build_whatlog.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,14 @@ + + + + +G:/epoc32/include/hrv_gain_mappings.rsg +G:/epoc32/release/armv5/urel/ekeyb.dll + + + +G:/epoc32/include/platform/loc/65/101f6dd6_65.loc +G:/epoc32/include/platform/loc/65/101f6dd7_65.loc + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/build_whatlog.whatlog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/build_whatlog.whatlog.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,167 @@ + + +sbs: version 2.12.3 [2010-02-23 symbian build system 007900c31eef] + +SBS_HOME C:/apps/sbs +Set-up C:/apps/sbs/sbs_init.xml +Command-line-arguments -s G:\output\build\canonical_system_definition_dfs_build_export.xml --filters=FilterMetadataLog -k --logfile G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log --makefile=G:\output\logs/makefile/92_7952_201006_32_dfs_build_export --export-only -e emake --mo=--emake-emulation=gmake --mo=--emake-annofile=#MAKEFILE#.emake.anno --mo=--emake-class=DFS_7x01-64 --mo=--emake-annodetail=basic,history,file,waiting --mo=--case-sensitive=0 --mo=--emake-root=G:/;\;C:\apps;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium;C:\apps\sbs +Current working directory G:\ +Environment /S=BHTEST001 +Environment ABLD_TOOLSMOD_COMPATIBILITY_MODE=alpha +Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users +Environment APTLMHOST=@oupelic4.emea.nsn-net.net +Environment ARMLMD_LICENSE_FILE=8224@trelic01;8224@salmg01;28747@saslmg04; +Environment ARMROOT=\ +Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] +Environment BASE=E:\build_e\wbernard\hudson +Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log +Environment CMTHOME=C:\APPS\cmt +Environment COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files +Environment COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files +Environment COMMONPROGRAMW6432=C:\Program Files\Common Files +Environment COMPUTERNAME=TRWEC090 +Environment COMSPEC=C:\ETPWIN\system32\cmd.exe +Environment COPYCMD=/y +Environment CTCHOME=C:\APPS\ctc +Environment CTC_AGENT_DEBUG=* +Environment CYGWIN=nontsec nosmbntsec +Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB +Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT +Environment EMAKE_CM=trwec001 +Environment EMAKE_EMULATION=symbian +Environment EMAKE_ROOT=\;C:\apps +Environment EPOCROOT=\ +Environment EXECUTOR_NUMBER=3 +Environment FLEXLM_BATCH=1 +Environment FLEXLM_TIMEOUT=900000 +Environment FP_NO_HOST_CHECK=NO +Environment HELIUM_CACHE_DIR=e:\ec_temp\helium\wbernard +Environment HELIUM_HOME=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium +Environment HOME=h:\ +Environment HOSTPLATFORM=win 32 +Environment HOSTPLATFORM_DIR=win32 +Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ +Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 +Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 +Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 +Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 +Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ +Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 +Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK +Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs +Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; +Environment NODE_NAME=trwec090 +Environment NUMBER_OF_PROCESSORS=12 +Environment OS=Windows_NT +Environment PATH=C:\apps\sbs\win32\mingw\bin;C:\apps\sbs\win32\cygwin\bin;C:\apps\sbs\win32\bin;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\HP\NCU;c:\ECloud\i686_win32\bin;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem;C:\ETPWIN\sysWOW64;C:\PROGRA~2\PuTTY;C:\APPS\MSVC6\Common\Tools\WinNT;C:\APPS\MSVC6\Common\MSDev98\Bin;C:\APPS\MSVC6\Common\Tools;C:\APPS\MSVC6\VC98\bin;C:\EESP\System32;C:\APPS\pclint;C:\APPS\cmt\;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\cltools;C:\APPS\symrec;C:\APPS\7zip;C:\APPS\understand\bin\pc-win95;C:\APPS\unzip;C:\APPS\jdk_1.6.0_11\bin;C:\apps\mercurial;C:\APPS\ant_1.7\bin;C:\Program Files\subversion;C:\APPS\sbs\bin;C:\APPS\actpython\.;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\symdec;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\unxutils;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\Subversion\bin;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc +Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 +Environment PERL=C:\APPS\actperl\bin\perl.exe +Environment PERL5LIB=E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium\tools\common\packages +Environment PID=6932 +Environment PROCESSOR_ARCHITECTURE=x86 +Environment PROCESSOR_ARCHITEW6432=AMD64 +Environment PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 8 Stepping 0, AuthenticAMD +Environment PROCESSOR_LEVEL=16 +Environment PROCESSOR_REVISION=0800 +Environment PROGRAMFILES=C:\Program Files (x86) +Environment PROGRAMFILES(X86)=C:\Program Files (x86) +Environment PROGRAMW6432=C:\Program Files +Environment PROMPT=$P$G +Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ +Environment PYTHONPATH=C:\apps\sbs\win32\python264 +Environment PYTHONVERSION=2.6 +Environment RVCT22BIN=C:\APPS\rvct22_686\bin +Environment RVCT22INC=C:\APPS\rvct22_686\include +Environment RVCT22LIB=C:\APPS\rvct22_686\lib +Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense +Environment SBS_CLEAN_LOG_FILE=G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log.clean.log +Environment SBS_HOME=C:\apps\sbs +Environment SBS_PYTHON=C:\APPS\actpython\python.exe +Environment SYMSEE_VERSION=11.2.0 +Environment SYSTEMDRIVE=C: +Environment SYSTEMROOT=C:\ETPWIN +Environment TEAM=helium_tampere64.92 +Environment TEMP=e:\ec_temp +Environment TESTED_ANT=C:\APPS\ant_1.7 +Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 +Environment TMP=e:\ec_temp +Environment TMPDIR=e:\ec_tmpdir +Environment WINDIR=C:\ETPWIN +Environment WORKSPACE=E:\build_e\wbernard\hudson\workspace\TB92-64bit +Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe +Environment _USE_CLASSPATH=no +Environment __CYGWIN__=C:\apps\sbs\win32\cygwin +Environment __MINGW__=C:\apps\sbs\win32\mingw +Environment __PYTHON__=C:\APPS\actpython\python.exe +Duplicate alias 'make' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'emake' (the one from 'G:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Buildable configuration 'armv5_urel' +Buildable configuration 'armv5_udeb' +Buildable configuration 'winscw_udeb' +Buildable configuration 'winscw_urel' +System Definition file G:/output/build/canonical_system_definition_dfs_build_export.xml +Found 372 bld.inf references in G:/output/build/canonical_system_definition_dfs_build_export.xml within 10 layers: + ncp_layer, mw_layer, os_layer, bldfirst_mw_layer, bldfirst_app_layer, app_layer, tools_layer, addon_layer, unit_test_layer, complementary_layer +Found 95 bld.inf references in layer "ncp_layer" +Found 112 bld.inf references in layer "mw_layer" +Found 25 bld.inf references in layer "os_layer" +Found 2 bld.inf references in layer "bldfirst_mw_layer" +Found 1 bld.inf references in layer "bldfirst_app_layer" +Found 98 bld.inf references in layer "app_layer" +Found 3 bld.inf references in layer "tools_layer" +Found 30 bld.inf references in layer "addon_layer" +Found 0 bld.inf references in layer "unit_test_layer" +Found 6 bld.inf references in layer "complementary_layer" +Toolcheck cache G:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed + +OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "armv5_urel". +'armv5_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "armv5_udeb". +'armv5_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "winscw_udeb". +'winscw_udeb' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "winscw_urel". +'winscw_urel' uses variant hrh file 'G:/epoc32/include/feature_settings.hrh' +Processing G:/sf/mw/svgt/group/bld.inf +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/epoc32/include/platform/mw/SVGImageLoadingObserver.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/epoc32/include/platform/mw/SVGListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/epoc32/include/platform/mw/SVGErrorImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/epoc32/include/platform/mw/SVGHyperlinkListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/epoc32/include/platform/mw/SVGAnimationListener.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/epoc32/include/platform/mw/SVGRequestObserver.h +Copied G:/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/epoc32/include/platform/mw/SVGRendererId.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/epoc32/include/platform/mw/nvg.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/epoc32/include/platform/mw/MVGImageBinder.h +Copied G:/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/epoc32/include/platform/mw/NVGIcon.h +Copied G:/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/epoc32/rom/include/core/mw/SVGEngine.iby +Copied G:/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/epoc32/rom/include/core/mw/SvgtPluginEcom.iby +Copied G:/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/epoc32/rom/include/core/mw/NVGDecoder.iby +Copied G:/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/epoc32/rom/include/core/mw/NVGDecoder_SW.iby +Copied G:/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/epoc32/rom/include/core/mw/VGRenderer.iby + + +G:/epoc32/include/hrv_gain_mappings.rsg +G:/epoc32/release/armv5/urel/ekeyb.dll + + +G:/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped + + + +G:/epoc32/include/platform/loc/65/101f6dd6_65.loc +G:/epoc32/include/platform/loc/65/101f6dd7_65.loc + + +The make-engine exited successfully. +Run time 999 seconds +Created/Updated toolcheck cache: G:/epoc32/build/toolcheck_cache_.tmp + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/categorization.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/categorization.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,46 @@ + + + + +make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o] Error 1 + +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb +X:/epoc32/release/armv5/udeb +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5.product/udeb + +Run time 226 seconds + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_compile.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_compile.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,46 @@ + + + + +make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o] Error 1 + +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb +X:/epoc32/release/armv5/udeb +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5.product/udeb + +Run time 226 seconds + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_error_after_compile.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_error_after_compile.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,46 @@ + + + + + +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb +X:/epoc32/release/armv5/udeb +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5.product/udeb + +make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o] Error 1 +Run time 226 seconds + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_failed_empty_recipe.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_failed_empty_recipe.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,39 @@ + + + + +make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/urel/srchuiresultview.o] Error 1 + +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb +X:/epoc32/release/armv5/udeb +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5.product/udeb + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_failed_error_in_recipe.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/categorization_failed_error_in_recipe.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,40 @@ + + + + +make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/urel/srchuiresultview.o] Error 1 + +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb +X:/epoc32/release/armv5/udeb +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5.product/udeb + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/invalid_xml_log_format.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/invalid_xml_log_format.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,46 @@ + + + + +make: *** [X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/urel/srchuiresultview.o] Error 1 + +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.def" +"X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin{000a0000}.dso" +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresviewplugin_udeb_objects.via +X:/epoc32/release/armv5/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o.d +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultview.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultcontainer.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/srchuiresultmodel.o +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb/proxy.o +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.sym +X:/epoc32/release/armv5.product/udeb/srchuiresviewplugin.dll.map +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5 +X:/epoc32/build/organizer/c_aff6bae36b1df6c4/srchuiresviewplugin_dll/armv5/udeb +X:/epoc32/release/armv5/udeb +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5/lib +X:/epoc32/release/armv5.product/udeb + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/metadatacount_error_and_missing_files.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/metadatacount_error_and_missing_files.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,168 @@ + + +sbs: version 2.12.3 [2010-02-23 symbian build system 007900c31eef] + +SBS_HOME C:/apps/sbs +Set-up C:/apps/sbs/sbs_init.xml +Command-line-arguments -s G:\output\build\canonical_system_definition_dfs_build_export.xml --filters=FilterMetadataLog -k --logfile G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log --makefile=G:\output\logs/makefile/92_7952_201006_32_dfs_build_export --export-only -e emake --mo=--emake-emulation=gmake --mo=--emake-annofile=#MAKEFILE#.emake.anno --mo=--emake-class=DFS_7x01-64 --mo=--emake-annodetail=basic,history,file,waiting --mo=--case-sensitive=0 --mo=--emake-root=G:/unexisting_sdk/;\;C:\apps;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium;C:\apps\sbs +Current working directory G:\ +Environment ABLD_TOOLSMOD_COMPATIBILITY_MODE=alpha +Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users +Environment ARMROOT=\ +Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] +Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log +Environment CMTHOME=C:\APPS\cmt +Environment COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files +Environment COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files +Environment COMMONPROGRAMW6432=C:\Program Files\Common Files +Environment COMPUTERNAME=TRWEC090 +Environment COMSPEC=C:\ETPWIN\system32\cmd.exe +Environment COPYCMD=/y +Environment CTCHOME=C:\APPS\ctc +Environment CTC_AGENT_DEBUG=* +Environment CYGWIN=nontsec nosmbntsec +Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB +Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT +Environment EMAKE_CM=trwec001 +Environment EMAKE_EMULATION=symbian +Environment EMAKE_ROOT=\;C:\apps +Environment EPOCROOT=\ +Environment EXECUTOR_NUMBER=3 +Environment FLEXLM_BATCH=1 +Environment FLEXLM_TIMEOUT=900000 +Environment FP_NO_HOST_CHECK=NO +Environment HELIUM_CACHE_DIR=e:\ec_temp\helium\user +Environment HELIUM_HOME=E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium +Environment HOME=h:\ +Environment HOSTPLATFORM=win 32 +Environment HOSTPLATFORM_DIR=win32 +Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ +Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 +Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 +Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 +Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 +Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ +Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 +Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK +Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs +Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; +Environment NODE_NAME=trwec090 +Environment NUMBER_OF_PROCESSORS=12 +Environment OS=Windows_NT +Environment PATH=C:\apps\sbs\win32\mingw\bin;C:\apps\sbs\win32\cygwin\bin;C:\apps\sbs\win32\bin;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\HP\NCU;c:\ECloud\i686_win32\bin;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem;C:\ETPWIN\sysWOW64;C:\PROGRA~2\PuTTY;C:\APPS\MSVC6\Common\Tools\WinNT;C:\APPS\MSVC6\Common\MSDev98\Bin;C:\APPS\MSVC6\Common\Tools;C:\APPS\MSVC6\VC98\bin;C:\EESP\System32;C:\APPS\pclint;C:\APPS\cmt\;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\cltools;C:\APPS\symrec;C:\APPS\7zip;C:\APPS\understand\bin\pc-win95;C:\APPS\unzip;C:\APPS\jdk_1.6.0_11\bin;C:\apps\mercurial;C:\APPS\ant_1.7\bin;C:\Program Files\subversion;C:\APPS\sbs\bin;C:\APPS\actpython\.;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\symdec;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\unxutils;E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\Subversion\bin;E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc +Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 +Environment PERL=C:\APPS\actperl\bin\perl.exe +Environment PERL5LIB=E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\tools\common\packages +Environment PID=6932 +Environment PROCESSOR_ARCHITECTURE=x86 +Environment PROCESSOR_ARCHITEW6432=AMD64 +Environment PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 8 Stepping 0, AuthenticAMD +Environment PROCESSOR_LEVEL=16 +Environment PROCESSOR_REVISION=0800 +Environment PROGRAMFILES=C:\Program Files (x86) +Environment PROGRAMFILES(X86)=C:\Program Files (x86) +Environment PROGRAMW6432=C:\Program Files +Environment PROMPT=$P$G +Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ +Environment PYTHONPATH=C:\apps\sbs\win32\python264 +Environment PYTHONVERSION=2.6 +Environment RVCT22BIN=C:\APPS\rvct22_686\bin +Environment RVCT22INC=C:\APPS\rvct22_686\include +Environment RVCT22LIB=C:\APPS\rvct22_686\lib +Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense +Environment SBS_CLEAN_LOG_FILE=G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log.clean.log +Environment SBS_HOME=C:\apps\sbs +Environment SBS_PYTHON=C:\APPS\actpython\python.exe +Environment SYMSEE_VERSION=11.2.0 +Environment SYSTEMDRIVE=C: +Environment SYSTEMROOT=C:\ETPWIN +Environment TEAM=helium_tampere64.92 +Environment TEMP=e:\ec_temp +Environment TESTED_ANT=C:\APPS\ant_1.7 +Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 +Environment TMP=e:\ec_temp +Environment TMPDIR=e:\ec_tmpdir +Environment WINDIR=C:\ETPWIN +Environment WORKSPACE=E:\build_e\user\hudson\workspace\TB92-64bit +Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe +Environment _USE_CLASSPATH=no +Environment __CYGWIN__=C:\apps\sbs\win32\cygwin +Environment __MINGW__=C:\apps\sbs\win32\mingw +Environment __PYTHON__=C:\APPS\actpython\python.exe +Duplicate alias 'make' (the one from 'G:/unexisting_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'emake' (the one from 'G:/unexisting_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Buildable configuration 'armv5_urel' +Buildable configuration 'armv5_udeb' +Buildable configuration 'winscw_udeb' +Buildable configuration 'winscw_urel' +System Definition file G:/unexisting_sdk/output/build/canonical_system_definition_dfs_build_export.xml +Found 372 bld.inf references in G:/unexisting_sdk/output/build/canonical_system_definition_dfs_build_export.xml within 10 layers: + ncp_layer, mw_layer, os_layer, bldfirst_mw_layer, bldfirst_app_layer, app_layer, tools_layer, addon_layer, unit_test_layer, complementary_layer +Found 95 bld.inf references in layer "ncp_layer" +Found 112 bld.inf references in layer "mw_layer" +Found 25 bld.inf references in layer "os_layer" +Found 2 bld.inf references in layer "bldfirst_mw_layer" +Found 1 bld.inf references in layer "bldfirst_app_layer" +Found 98 bld.inf references in layer "app_layer" +Found 3 bld.inf references in layer "tools_layer" +Found 30 bld.inf references in layer "addon_layer" +Found 0 bld.inf references in layer "unit_test_layer" +Found 6 bld.inf references in layer "complementary_layer" +Toolcheck cache G:/unexisting_sdk/epoc32/build/toolcheck_cache_.tmp ignored - environment changed + +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "armv5_urel". +'armv5_urel' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "armv5_udeb". +'armv5_udeb' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "winscw_udeb". +'winscw_udeb' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "winscw_urel". +'winscw_urel' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +Processing G:/unexisting_sdk/sf/mw/svgt/group/bld.inf +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGImageLoadingObserver.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGListener.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGErrorImpl.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/unexisting_sdk/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGHyperlinkListener.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGAnimationListener.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGRequestObserver.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGRendererId.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/unexisting_sdk/epoc32/include/platform/mw/nvg.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/unexisting_sdk/epoc32/include/platform/mw/MVGImageBinder.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/unexisting_sdk/epoc32/include/platform/mw/NVGIcon.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/SVGEngine.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/SvgtPluginEcom.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/NVGDecoder.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/NVGDecoder_SW.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/VGRenderer.iby + + +G:/unexisting_sdk/epoc32/include/hrv_gain_mappings.rsg +G:/unexisting_sdk/epoc32/release/armv5/urel/ekeyb.dll + + + + +G:/unexisting_sdk/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped + + + +G:/unexisting_sdk/epoc32/include/platform/loc/65/101f6dd6_65.loc +G:/unexisting_sdk/epoc32/include/platform/loc/65/101f6dd7_65.loc + + +The make-engine exited successfully. +Run time 999 seconds +Created/Updated toolcheck cache: G:/unexisting_sdk/epoc32/build/toolcheck_cache_.tmp + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/metadatacount_missing_files.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/metadatacount_missing_files.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,165 @@ + + +sbs: version 2.12.3 [2010-02-23 symbian build system 007900c31eef] + +SBS_HOME C:/apps/sbs +Set-up C:/apps/sbs/sbs_init.xml +Command-line-arguments -s G:\output\build\canonical_system_definition_dfs_build_export.xml --filters=FilterMetadataLog -k --logfile G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log --makefile=G:\output\logs/makefile/92_7952_201006_32_dfs_build_export --export-only -e emake --mo=--emake-emulation=gmake --mo=--emake-annofile=#MAKEFILE#.emake.anno --mo=--emake-class=DFS_7x01-64 --mo=--emake-annodetail=basic,history,file,waiting --mo=--case-sensitive=0 --mo=--emake-root=G:/unexisting_sdk/;\;C:\apps;E:\build_e\wbernard\hudson\workspace\TB92-64bit\helium-svn\helium;C:\apps\sbs +Current working directory G:\ +Environment /S=BHTEST001 +Environment ABLD_TOOLSMOD_COMPATIBILITY_MODE=alpha +Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users +Environment ARMROOT=\ +Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] +Environment BASE=E:\build_e\user\hudson +Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log +Environment CMTHOME=C:\APPS\cmt +Environment COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files +Environment COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files +Environment COMMONPROGRAMW6432=C:\Program Files\Common Files +Environment COMPUTERNAME=TRWEC090 +Environment COMSPEC=C:\ETPWIN\system32\cmd.exe +Environment COPYCMD=/y +Environment CTCHOME=C:\APPS\ctc +Environment CTC_AGENT_DEBUG=* +Environment CYGWIN=nontsec nosmbntsec +Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB +Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT +Environment EMAKE_CM=trwec001 +Environment EMAKE_EMULATION=symbian +Environment EMAKE_ROOT=\;C:\apps +Environment EPOCROOT=\ +Environment EXECUTOR_NUMBER=3 +Environment FLEXLM_BATCH=1 +Environment FLEXLM_TIMEOUT=900000 +Environment FP_NO_HOST_CHECK=NO +Environment HELIUM_CACHE_DIR=e:\ec_temp\helium\user +Environment HELIUM_HOME=E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium +Environment HOME=h:\ +Environment HOSTPLATFORM=win 32 +Environment HOSTPLATFORM_DIR=win32 +Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ +Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 +Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 +Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 +Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 +Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ +Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 +Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK +Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs +Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; +Environment NODE_NAME=trwec090 +Environment NUMBER_OF_PROCESSORS=12 +Environment OS=Windows_NT +Environment PATH=C:\apps\sbs\win32\mingw\bin;C:\apps\sbs\win32\cygwin\bin;C:\apps\sbs\win32\bin;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\HP\NCU;c:\ECloud\i686_win32\bin;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\ETPWIN\system32;C:\ETPWIN;C:\ETPWIN\System32\Wbem;C:\ETPWIN\sysWOW64;C:\PROGRA~2\PuTTY;C:\APPS\MSVC6\Common\Tools\WinNT;C:\APPS\MSVC6\Common\MSDev98\Bin;C:\APPS\MSVC6\Common\Tools;C:\APPS\MSVC6\VC98\bin;C:\EESP\System32;C:\APPS\pclint;C:\APPS\cmt\;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\cltools;C:\APPS\symrec;C:\APPS\7zip;C:\APPS\understand\bin\pc-win95;C:\APPS\unzip;C:\APPS\jdk_1.6.0_11\bin;C:\apps\mercurial;C:\APPS\ant_1.7\bin;C:\Program Files\subversion;C:\APPS\sbs\bin;C:\APPS\actpython\.;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\symdec;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\unxutils;E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\Subversion\bin;E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc +Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 +Environment PERL=C:\APPS\actperl\bin\perl.exe +Environment PERL5LIB=E:\build_e\user\hudson\workspace\TB92-64bit\helium-svn\helium\tools\common\packages +Environment PID=6932 +Environment PROCESSOR_ARCHITECTURE=x86 +Environment PROCESSOR_ARCHITEW6432=AMD64 +Environment PROCESSOR_IDENTIFIER=AMD64 Family 16 Model 8 Stepping 0, AuthenticAMD +Environment PROCESSOR_LEVEL=16 +Environment PROCESSOR_REVISION=0800 +Environment PROGRAMFILES=C:\Program Files (x86) +Environment PROGRAMFILES(X86)=C:\Program Files (x86) +Environment PROGRAMW6432=C:\Program Files +Environment PROMPT=$P$G +Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ +Environment PYTHONPATH=C:\apps\sbs\win32\python264 +Environment PYTHONVERSION=2.6 +Environment RVCT22BIN=C:\APPS\rvct22_686\bin +Environment RVCT22INC=C:\APPS\rvct22_686\include +Environment RVCT22LIB=C:\APPS\rvct22_686\lib +Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense +Environment SBS_CLEAN_LOG_FILE=G:\output\logs\compile/92_7952_201006_32_dfs_build_export.log.clean.log +Environment SBS_HOME=C:\apps\sbs +Environment SBS_PYTHON=C:\APPS\actpython\python.exe +Environment SYMSEE_VERSION=11.2.0 +Environment SYSTEMDRIVE=C: +Environment SYSTEMROOT=C:\ETPWIN +Environment TEAM=helium_tampere64.92 +Environment TEMP=e:\ec_temp +Environment TESTED_ANT=C:\APPS\ant_1.7 +Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 +Environment TMP=e:\ec_temp +Environment TMPDIR=e:\ec_tmpdir +Environment WINDIR=C:\ETPWIN +Environment WORKSPACE=E:\build_e\user\hudson\workspace\TB92-64bit +Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe +Environment _USE_CLASSPATH=no +Environment __CYGWIN__=C:\apps\sbs\win32\cygwin +Environment __MINGW__=C:\apps\sbs\win32\mingw +Environment __PYTHON__=C:\APPS\actpython\python.exe +Duplicate alias 'make' (the one from 'G:/unexisting_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Duplicate alias 'emake' (the one from 'G:/unexisting_sdk/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/apps/sbs/lib/config\make.xml') +Buildable configuration 'armv5_urel' +Buildable configuration 'armv5_udeb' +Buildable configuration 'winscw_udeb' +Buildable configuration 'winscw_urel' +System Definition file G:/unexisting_sdk/output/build/canonical_system_definition_dfs_build_export.xml +Found 372 bld.inf references in G:/unexisting_sdk/output/build/canonical_system_definition_dfs_build_export.xml within 10 layers: + ncp_layer, mw_layer, os_layer, bldfirst_mw_layer, bldfirst_app_layer, app_layer, tools_layer, addon_layer, unit_test_layer, complementary_layer +Found 95 bld.inf references in layer "ncp_layer" +Found 112 bld.inf references in layer "mw_layer" +Found 25 bld.inf references in layer "os_layer" +Found 2 bld.inf references in layer "bldfirst_mw_layer" +Found 1 bld.inf references in layer "bldfirst_app_layer" +Found 98 bld.inf references in layer "app_layer" +Found 3 bld.inf references in layer "tools_layer" +Found 30 bld.inf references in layer "addon_layer" +Found 0 bld.inf references in layer "unit_test_layer" +Found 6 bld.inf references in layer "complementary_layer" +Toolcheck cache G:/unexisting_sdk/epoc32/build/toolcheck_cache_.tmp ignored - environment changed + +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "armv5_urel". +'armv5_urel' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "armv5_udeb". +'armv5_udeb' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "winscw_udeb". +'winscw_udeb' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +OS version "vtb92sf" determined from file "G:/unexisting_sdk/epoc32/data/buildinfo.txt" +applying the OS variant to the configuration "winscw_urel". +'winscw_urel' uses variant hrh file 'G:/unexisting_sdk/epoc32/include/feature_settings.hrh' +Processing G:/unexisting_sdk/sf/mw/svgt/group/bld.inf +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGImageLoadingObserver.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGImageLoadingObserver.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGEngineInterfaceImpl.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGEngineInterfaceImpl.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgListener.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGListener.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGErrorImpl.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGErrorImpl.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h to G:/unexisting_sdk/epoc32/include/platform/mw/SvgJavaInterfaceImpl.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGHyperlinkListener.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGHyperlinkListener.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGAnimationListener.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGAnimationListener.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRequestObserver.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGRequestObserver.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/svgt_api/inc/SVGRendererId.h to G:/unexisting_sdk/epoc32/include/platform/mw/SVGRendererId.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/nvg_api/inc/nvg.h to G:/unexisting_sdk/epoc32/include/platform/mw/nvg.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/nvg_api/inc/MVGImageBinder.h to G:/unexisting_sdk/epoc32/include/platform/mw/MVGImageBinder.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgt_plat/nvg_api/inc/NVGIcon.h to G:/unexisting_sdk/epoc32/include/platform/mw/NVGIcon.h +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/SVGEngine.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/SVGEngine.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/SvgtPluginEcom.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/SvgtPluginEcom.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/nvgdecoder.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/NVGDecoder.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/NVGDecoder_SW.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/NVGDecoder_SW.iby +Copied G:/unexisting_sdk/sf/mw/svgt/svgtopt/rom/VGRenderer.iby to G:/unexisting_sdk/epoc32/rom/include/core/mw/VGRenderer.iby + + +G:/unexisting_sdk/epoc32/include/hrv_gain_mappings.rsg +G:/unexisting_sdk/epoc32/release/armv5/urel/ekeyb.dll + + +G:/unexisting_sdk/epoc32/build/G__sf_os_deviceplatformrelease_locfiles_data_65.zipG__epoc32_include_platform_loc.unzipped + + + +G:/unexisting_sdk/epoc32/include/platform/loc/65/101f6dd6_65.loc +G:/unexisting_sdk/epoc32/include/platform/loc/65/101f6dd7_65.loc + + +The make-engine exited successfully. +Run time 999 seconds +Created/Updated toolcheck cache: G:/unexisting_sdk/epoc32/build/toolcheck_cache_.tmp + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/parsing_result.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/parsing_result.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,32 @@ +<#-- +============================================================================ +Name : whatlog_result.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +number.of.logs=${table_info['jpasingle']['select count(l.path) path from LogFile l'][0]} +number.of.metadata.entries=${table_info['jpasingle']['select count(e) from MetadataEntry e'][0]} +number.of.execution.times=${table_info['jpasingle']['select count(e) path from ExecutionTime e'][0]} +number.of.component.times=${table_info['jpasingle']['select count(ct) from ComponentTime ct'][0]} +number.of.components=${table_info['jpasingle']['select count(c) path from Component c'][0]} +<#assign c = 0 /> +<#list table_info['jpa']['select e from ExecutionTime e'] as e> +execution.time.${c}=${e.time} +<#assign c = c + 1 /> + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/receipe_lengthy_warn.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/receipe_lengthy_warn.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,17 @@ + + +sbs: version 2.5.3 [2009-03-12 release] + +SBS_HOME E:/Build_E/ido-config-df/sbs +Set-up E:/Build_E/ido-config-df/sbs/sbs_init.xml +Command-line-arguments -s z:\output/build/canonical_system_definition_build.xml -k -c armv5 -j 4 -m z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_Makefile --filters=FilterHeliumLog -f z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_compile.log +Environment ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir="e:\ec_temp\helium\username" -Dpython.path=E:\Build_E\username\helium-bin\helium\external\python\lib\2.5\jython-2.5-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipnotsafe\Jinja2-2.2.1.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipnotsafe\blockspackager-1.0.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipnotsafe\dp-1.0.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\Sphinx-0.5.1-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\docutils-0.5-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\psyco-1.6-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\PyRTF-0.45.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\iadnokia-1.0.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\jython-2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\mocker-0.10.1.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\path-2.2.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\py_dom_xpath-0.1.py2.6.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\pythoncore-1.0.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\pythonnokia-1.0.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\pyxml-0.8.4.py2.6.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto\zipsafe\setuptools-0.6c5.py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\Jinja-1.2-py2.5-win32.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\Pygments-0.10-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\coverage-2.85-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\epydoc-3.0beta1-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\mocker-0.10.1-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\nose-0.11.1-py2.6.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\setuptools-0.6c5-py2.5.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\common\simplejson-1.9.1-py2.5-win32.egg;;E:\Build_E\username\helium-bin\helium\external\python\lib\auto;E:\Build_E\username\helium-bin\helium\external\python\lib\2.6;E:\Build_E\username\helium-bin\helium\external\python\lib\common;E:\Build_E\username\helium-bin\helium\extensions\nokia\external\python\lib\2.6;C:\Apps\sbs\python + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/receipe_lengthy_whatlog.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/receipe_lengthy_whatlog.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,12 @@ + + +sbs: version 2.5.3 [2009-03-12 release] + +SBS_HOME E:/Build_E/ido-config-df/sbs +Set-up E:/Build_E/ido-config-df/sbs/sbs_init.xml +Command-line-arguments -s z:\output/build/canonical_system_definition_build.xml -k -c armv5 -j 4 -m z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_Makefile --filters=FilterHeliumLog -f z:\output\logs/ido_imm_mcl_devlon70_robot_5.1.005__armv5_multiple_thread_build_compile.log + +/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path/very/long/path + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/sbs_compile_emake_errors.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/sbs_compile_emake_errors.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,35 @@ + + +sbs: version 2.12.1 [2010-01-29 symbian build system 4e477ddf2eed] + +SBS_HOME C:/APPS/sbs +Set-up C:/APPS/sbs/sbs_init.xml +Processing V:/sf/app/HelloWorldCons/group/HelloWorldCons.mmp for platform armv5_urel + armv5_udeb +Processing V:/sf/mw/HelloWorldAPI/group/HelloWorldAPI.mmp for platform armv5_urel + armv5_udeb +Running C:/APPS/sbs/win32/bin/talonctl.exe start +Making V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.export +Executing 'emake HAVE_ORDERONLY= -r -f "V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.export" -k -j 20 --emake-emulation=gmake --emake-class=s60 --emake-annodetail=basic,history,waiting --case-sensitive=0 '--emake-root=\;C:\apps;E:\hacs\helium_3\helium;C:\APPS\sbs' --emake-maxagents=1 '--emake-historyfile=V:\output\logs/ec_history/raptor_clean.emake.data' TALON_DESCRAMBLE=0 2>'V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.export.stderr' ' +WARNING EC1003: Ignoring redundant EMAKE_ROOT value - C:/apps/sbs (It is already included by EMAKE_ROOT value - C:/apps) +ERROR EC1128: History file path references non-existent or read-only directory: V:\output\logs/ec_history +Making V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.bitmap +Executing 'emake HAVE_ORDERONLY= -r -f "V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.bitmap" -k -j 20 --emake-emulation=gmake --emake-class=s60 --emake-annodetail=basic,history,waiting --case-sensitive=0 '--emake-root=\;C:\apps;E:\hacs\helium_3\helium;C:\APPS\sbs' --emake-maxagents=1 '--emake-historyfile=V:\output\logs/ec_history/raptor_clean.emake.data' TALON_DESCRAMBLE=0 2>'V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.bitmap.stderr' ' +WARNING EC1003: Ignoring redundant EMAKE_ROOT value - C:/apps/sbs (It is already included by EMAKE_ROOT value - C:/apps) +ERROR EC1128: History file path references non-existent or read-only directory: V:\output\logs/ec_history +Making V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.resource_deps +Executing 'emake HAVE_ORDERONLY= -r -f "V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.resource_deps" -k -j 20 --emake-emulation=gmake --emake-class=s60 --emake-annodetail=basic,history,waiting --case-sensitive=0 '--emake-root=\;C:\apps;E:\hacs\helium_3\helium;C:\APPS\sbs' --emake-maxagents=1 '--emake-historyfile=V:\output\logs/ec_history/raptor_clean.emake.data' TALON_DESCRAMBLE=0 2>'V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.resource_deps.stderr' ' +WARNING EC1003: Ignoring redundant EMAKE_ROOT value - C:/apps/sbs (It is already included by EMAKE_ROOT value - C:/apps) +ERROR EC1128: History file path references non-existent or read-only directory: V:\output\logs/ec_history +Making V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.resource +Executing 'emake HAVE_ORDERONLY= -r -f "V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.resource" -k -j 20 --emake-emulation=gmake --emake-class=s60 --emake-annodetail=basic,history,waiting --case-sensitive=0 '--emake-root=\;C:\apps;E:\hacs\helium_3\helium;C:\APPS\sbs' --emake-maxagents=1 '--emake-historyfile=V:\output\logs/ec_history/raptor_clean.emake.data' TALON_DESCRAMBLE=0 2>'V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.resource.stderr' ' +WARNING EC1003: Ignoring redundant EMAKE_ROOT value - C:/apps/sbs (It is already included by EMAKE_ROOT value - C:/apps) +ERROR EC1128: History file path references non-existent or read-only directory: V:\output\logs/ec_history +Making V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.default +Executing 'emake HAVE_ORDERONLY= -r -f "V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.default" -k -j 20 --emake-emulation=gmake --emake-class=s60 --emake-annodetail=basic,history,waiting --case-sensitive=0 '--emake-root=\;C:\apps;E:\hacs\helium_3\helium;C:\APPS\sbs' --emake-maxagents=1 '--emake-historyfile=V:\output\logs/ec_history/raptor_clean.emake.data' TALON_DESCRAMBLE=0 2>'V:/output/logs/compile/minibuild_ido_sbs_0.0.1_armv5_helium_minibuild_ido_all.default.stderr' ' +WARNING EC1003: Ignoring redundant EMAKE_ROOT value - C:/apps/sbs (It is already included by EMAKE_ROOT value - C:/apps) +ERROR EC1128: History file path references non-existent or read-only directory: V:\output\logs/ec_history +Running C:/APPS/sbs/win32/bin/talonctl.exe stop +The make-engine exited successfully. +Run time 3 seconds +Created/Updated toolcheck cache: V:/epoc32/build/toolcheck_cache_.tmp + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/sysdef3.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/sysdef3.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/sysdef_data.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/sysdef_data.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,30 @@ +<#-- +============================================================================ +Name : sysdef_data.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#setting number_format="0"> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +component.count=${table_info['jpasingle']['select count(c.id) from Component c'][0]} +<#assign counter=0> +<#list table_info['jpa']['select c from Component c'] as component> +component.${counter}.unit.id=${component.unitId} +component.${counter}.unit.location=<#if component.sysdefUnit??>${component.sysdefUnit.location} +<#assign counter=counter + 1> + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/unit_categorization_compile.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/unit_categorization_compile.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,16 @@ + + + + + + +Run time 226 seconds + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sbs/whatlog_result.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sbs/whatlog_result.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,26 @@ +<#-- +============================================================================ +Name : whatlog_result.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +number.of.logs=${table_info['jpasingle']['select count(l.path) path from LogFile l'][0]} +number.of.whatlog.entries=${table_info['jpasingle']['select count(e) from WhatLogEntry e'][0]} + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sysdef/invalid_sysdef3.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sysdef/invalid_sysdef3.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sysdef/sysdef3.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sysdef/sysdef3.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/sysdef/sysdef_data.ini.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/sysdef/sysdef_data.ini.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,27 @@ +<#-- +============================================================================ +Name : sysdef_data.ini.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#setting number_format="0"> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +package.count=${table_info['jpasingle']['select count(p.id) from SysdefPackage p'][0]} +collection.count=${table_info['jpasingle']['select count(p.id) from SysdefCollection p'][0]} +component.count=${table_info['jpasingle']['select count(p.id) from SysdefComponent p'][0]} +unit.count=${table_info['jpasingle']['select count(p.id) from SysdefUnit p'][0]} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/templates/component_categorization.txt.ftl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/data/templates/component_categorization.txt.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,27 @@ +<#-- +============================================================================ +Name : macro.ftl +Part of : Helium + +Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +All rights reserved. +This component and the accompanying materials are made available +under the terms of the License "Eclipse Public License v1.0" +which accompanies this distribution, and is available +at the URL "http://www.eclipse.org/legal/epl-v10.html". + +Initial Contributors: +Nokia Corporation - initial contribution. + +Contributors: + +Description: + +============================================================================ +--> +<#setting number_format="0"> +<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > +<#list table_info['native:java.lang.String']['select DISTINCT component.component from component INNER JOIN logfile ON logfile.logfile_id=component.logfile_id where logfile.path like \'%_compile%.log\' and logfile.path not like \'%_compile_clean%.log\''] as component> +${component}:error:${table_info['jpasingle']['select Count(m.id) from MetadataEntry m JOIN m.logFile as l JOIN m.severity as p JOIN m.component as c where UPPER(p.severity) like \'%ERROR%\' and c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]} +${component}:whatlog:${table_info['jpasingle']['select Count(w.id) from WhatLogEntry w JOIN w.component as c JOIN c.logFile as l where c.component=\'${component}\' and LOWER(l.path) like \'%\\_compile%.log\' ESCAPE \'\\\' and LOWER(l.path) not like \'%\\_compile\\_clean%.log\' ESCAPE \'\\\''][0]} + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/data/whatlog_result.ini.ftl --- a/buildframework/helium/sf/java/metadata/tests/data/whatlog_result.ini.ftl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -<#-- -============================================================================ -Name : whatlog_result.ini.ftl -Part of : Helium - -Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -All rights reserved. -This component and the accompanying materials are made available -under the terms of the License "Eclipse Public License v1.0" -which accompanies this distribution, and is available -at the URL "http://www.eclipse.org/legal/epl-v10.html". - -Initial Contributors: -Nokia Corporation - initial contribution. - -Contributors: - -Description: - -============================================================================ ---> -<#assign table_info = pp.loadData('com.nokia.helium.metadata.ORMFMPPLoader', "${dbPath}") > -number.of.logs=${table_info['jpasingle']['select count(l.path) path from LogFile l'][0]} -number.of.whatlog.entries=${table_info['jpasingle']['select count(e) from WhatLogEntry e'][0]} - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/functionality/func_add_test.ant.xml --- a/buildframework/helium/sf/java/metadata/tests/functionality/func_add_test.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ - - - - Helium Antlib metadata unittests. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - macro: ${project.dir}/../../src/templates - - - dbPath: ${project.dir}/../output/s60_parallel.sqlite - doc: xml(${project.dir}/../data/s60_info.xml) - ant: antProperties() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - macro: ${project.dir}/../../src/templates - - - dbPath: ${project.dir}/../output/log_text_metadata_input.sqlite - ant: antProperties() - - - - - - - - - macro: ${project.dir}/../../src/templates - - - dbPath: ${project.dir}/../output/log_text_metadata_input.sqlite - logFile: mcl_7952_201002_wk02_010_dfs_build_sf_tools.log - ant: antProperties() - - - - - - - - - macro: ${project.dir}/../../src/templates - - - dbPath: ${project.dir}/../output/ido_gsdo_tb92-release_9.0.2735_metadata.sqlite - doc: xml(${project.dir}/../output/ido_gsdo_tb92-release_9.0.2735_tools_dfs_build_clean.log.info.xml) - ant: antProperties() - - - - - - - - - macro: ${project.dir}/../../src/templates - - - dbPath: ${project.dir}/../output/all_s60_logs_db - doc: xml(${project.dir}/../output/log_text_metadata_input.xml) - ant: antProperties() - - - - - - - - - - macro: ${project.dir}/../../src/templates - - - dbPath: ${project.dir}/../output/all_s60_logs_db - doc: xml(${project.dir}/../output/log_text_metadata_input.xml) - ant: antProperties() - - - - - - - - - - macro: ${project.dir}/../../src/templates/macro - - - dbPath: ${project.dir}/../output/all_s60_logs_db - loginfo: xml(${project.dir}/../output/log_text_metadata_input.xml) - ant: antProperties() - - - - - - - - - - macro: ${project.dir}/../../src/templates/macro - - - dbPath: ${project.dir}/../output/all_ido_logs.sqlite - loginfo: xml(${project.dir}/../data/ido_logs/IDO_lcdo_tb92-ci_MCL.92.64_info.log.xml) - ant: antProperties() - - - - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/src/com/nokia/helium/metadata/tests/TestIMakerLogMetaDataInput.java --- a/buildframework/helium/sf/java/metadata/tests/src/com/nokia/helium/metadata/tests/TestIMakerLogMetaDataInput.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/metadata/tests/src/com/nokia/helium/metadata/tests/TestIMakerLogMetaDataInput.java Mon Sep 13 13:11:19 2010 +0800 @@ -18,13 +18,11 @@ package com.nokia.helium.metadata.tests; import java.io.File; -import java.util.Iterator; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.FileSet; import org.junit.Test; -import com.nokia.helium.jpa.entity.metadata.Metadata; import com.nokia.helium.metadata.ant.types.IMakerLogMetaDataInput; /** @@ -48,14 +46,14 @@ imakerInput.add(fileset); // Iterate through the entries - Iterator inputIterator = imakerInput.iterator(); + /**Iterator inputIterator = imakerInput.iterator(); int componentTotal = 0; while (inputIterator.hasNext()) { Metadata.LogEntry logEntry = inputIterator.next(); System.out.println("logentry: " + logEntry.toString()); componentTotal++; - } - assert (componentTotal == IMAGES_WITH_ERRORS_TOTAL); + }*/ + //assert (componentTotal == IMAGES_WITH_ERRORS_TOTAL); } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/metadata/tests/src/com/nokia/helium/metadata/tests/TestORMFMPPLoader.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/metadata/tests/src/com/nokia/helium/metadata/tests/TestORMFMPPLoader.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.metadata.tests; + + +import java.io.File; +import java.io.IOException; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; + +import org.apache.commons.io.FileUtils; +import org.apache.log4j.Logger; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import com.nokia.helium.metadata.FactoryManager; +import com.nokia.helium.metadata.MetadataException; +import com.nokia.helium.metadata.fmpp.ORMQueryModeModel; +import com.nokia.helium.metadata.model.metadata.LogFile; + +import fmpp.ProgressListener; +import freemarker.ext.beans.BeanModel; +import freemarker.template.SimpleScalar; +import freemarker.template.TemplateCollectionModel; +import freemarker.template.TemplateHashModel; +import freemarker.template.TemplateModel; +import freemarker.template.TemplateModelIterator; +import freemarker.template.TemplateSequenceModel; + +/** + * Testing the ORMFMPPLoader loader. + * + */ +public class TestORMFMPPLoader { + private File database; + private static Logger log = Logger.getLogger(TestORMFMPPLoader.class); + + /** + * Populates the LogFile table with basic data. + * @throws MetadataException + * @throws IOException + */ + @Before + public void populateDatabase() throws MetadataException, IOException { + File tempdir = new File(System.getProperty("test.temp.dir")); + tempdir.mkdirs(); + database = new File(tempdir, "test_db"); + if (database.exists()) { + FileUtils.forceDelete(database); + } + EntityManagerFactory factory = FactoryManager.getFactoryManager().getEntityManagerFactory(database); + EntityManager em = factory.createEntityManager(); + try { + em.getTransaction().begin(); + for (int i = 0 ; i < 2000 ; i++) { + LogFile lf = new LogFile(); + lf.setPath("log" + String.format("%04d", i)); + em.persist(lf); + } + } finally { + if (em.getTransaction().isActive()) { + em.getTransaction().commit(); + } + em.close(); + factory.close(); + } + } + + /** + * Delete the database after test completion. + * @throws IOException + */ + @After + public void cleanupDatabase() throws IOException { + FileUtils.forceDelete(database); + } + + /** + * Run a JPA query. + * @throws Exception + */ + @Test + public void testJpaSingleQuery() throws Exception { + ORMQueryModeModel modeModel = new ORMQueryModeModel(database); + try { + TemplateHashModel model = modeModel.get("jpasingle"); + TemplateModel data = model.get("select l from LogFile l order by l.path"); + Assert.assertTrue(data instanceof TemplateSequenceModel); + TemplateSequenceModel seq = (TemplateSequenceModel)data; + Assert.assertTrue(seq.size() == 2000); + + // Let's make sure we get null if out of bounds + Assert.assertNotNull(seq.get(0)); + Assert.assertNotNull(seq.get(750)); + Assert.assertNotNull(seq.get(749)); + Assert.assertNotNull(seq.get(1999)); + Assert.assertNotNull(seq.get(0)); + Assert.assertNull(seq.get(2000)); + Assert.assertNull(seq.get(2001)); + Assert.assertNull(seq.get(2000)); + + // Check index 0 + LogFile lf = (LogFile)((BeanModel)seq.get(0)).getWrappedObject(); + log.info("seq.get(0): " + lf.getPath()); + Assert.assertTrue("log0000".equals(lf.getPath())); + + // Check index 999 + lf = (LogFile)((BeanModel)seq.get(999)).getWrappedObject(); + log.info("seq.get(999): " + lf.getPath()); + Assert.assertTrue("log0999".equals(lf.getPath())); + + // Check index 1999 + lf = (LogFile)((BeanModel)seq.get(1999)).getWrappedObject(); + log.info("seq.get(1999): " + lf.getPath()); + Assert.assertTrue("log1999".equals(lf.getPath())); + } finally { + modeModel.notifyProgressEvent(null, ProgressListener.EVENT_END_PROCESSING_SESSION, null, 0, null, null); + } + } + + /** + * Run a native query. + * @throws Exception + */ + @Test + public void testNativeStringQuery() throws Exception { + ORMQueryModeModel modeModel = new ORMQueryModeModel(database); + try { + TemplateHashModel model = modeModel.get("native:java.lang.String"); + TemplateModel data = model.get("select l.path from LogFile l order by l.path"); + Assert.assertTrue(data instanceof TemplateCollectionModel); + TemplateCollectionModel collection = (TemplateCollectionModel)data; + TemplateModelIterator iterator = collection.iterator(); + + int i = 0; + while (iterator.hasNext()) { + TemplateModel next = iterator.next(); + SimpleScalar scalar = (SimpleScalar)next; + Assert.assertTrue(scalar.getAsString().equals("log" + String.format("%04d", i++))); + } + Assert.assertFalse(iterator.hasNext()); + Assert.assertNull(iterator.next()); + } finally { + modeModel.notifyProgressEvent(null, ProgressListener.EVENT_END_PROCESSING_SESSION, null, 0, null, null); + } + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/coverity.rst --- a/buildframework/helium/sf/java/quality/coverity.rst Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -.. index:: - module: Coverity Prevent Tool. - -======================== -Coverity Prevent Tool -======================== - -.. contents:: - -This document describes requirements and how to run coverity prevent tool with sbs builds using helium. - -Introduction ------------------ -- Coverity Prevent analyzes source code to find defects early in the development cycle, reducing the risks associated with coding. Included with Prevent are workflow tools that track and manage defects from initial discovery through final resolution. -- With high precision, Coverity Prevent analyzes source code and detects critical software defects in the following categories: - - * Quality - - Coverity Prevent detects bugs at compile-time that can cause run-time crashes. For example: memory leaks, use-after-free errors, and illegal pointer accesses. - - * Security - - Early during development, Coverity Prevent can detect the security vulnerabilities that hackers can exploit and help you eliminate serious problems, such as denial of service, data or memory corruption, and privilege escalation. Vulnerabilities detected can include buffer overruns, integer overflows, format string errors, and SQL injection attacks. - - * Concurrency - - Coverity Prevent can detect errors in multi-threaded programs that, given the complexity of concurrent programming, can be extremely difficult to track down or reproduce. Detected defects include potential deadlocks or misuse of locks. - -Implmentation ------------------ - -- Coverity command can be run using the task. -- Coverity task will validate is the command passed to task is starts with "cov-" and then it will run the command. -- Coverity command options can passed through the datatypes "" or "". -- Below example shows how parameters can be passed to coverity command. - - -.. code-block:: xml - - - - - - - -.. code-block:: xml - - - - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/antlib.xml --- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,6 +26,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CASummaryTask.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CASummaryTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +package com.nokia.helium.quality.ant.taskdefs; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.apache.tools.ant.Project; +import org.apache.tools.ant.Task; +import java.io.FileReader; +import javax.xml.xpath.XPath; +import org.w3c.dom.NodeList; +import org.w3c.dom.Document; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPathFactory; +import javax.xml.xpath.XPathExpression; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import org.xml.sax.SAXException; + + +/** + * This Task searches the bc_header.xml and bc_library.xml files created by Binary Comparison and + * looks for the typeIds and counts them up. It then prints them in order to write the number of each + * typeID that was found to the diamonds output file for display by diamonds. + * + *
    + * <hlm:casummarytask   
    + *             header="true"
    + *             diamondsHeaderFileName="C:\diamonds_header.xml" 
    + *             diamondsFooterFileName="C:\diamonds_footer.xml"
    + *             outptuFile="Z:\output\diamonds/ca_summary_header.xml" 
    + *             inputFile="Z:\output\logs/headers_report_minibuild_ido_0.0.03_.xml/>
    + * 
    + * + * @ant.task name="casummarytask" category="Quality" + */ + +public class CASummaryTask extends Task { + + /** String used to look for the tag values in the header xml file **/ + private static String headerExpression = "//issuelist/headerfile/issue/typeid/text()"; + + /** String used to look for the tag values in the library xml file **/ + private static String libraryExpression = "//issuelist/library/issue/typeid/text()"; + + /** The file containing the CA summary data */ + private String inputFile; + /** Name of file to write the output to */ + private String outputFile; + /** Whether we are dealng with a header or library */ + private boolean header; + + /** Each line of the input file is read into this */ + private String line; + + /** File descriptor for the input file */ + private BufferedReader inputFileReader; + + /** File handler used to write the summary numbers to the output file **/ + private BufferedWriter output; // default init = null + + /** + * File name of the default diamonds XML file header part (1st few lines) used so not writing + * the XML text here + */ + private String diamondsHeaderFileName; + /** + * File name of the default diamonds XML file footer part (last line) used so not writing the + * XML text here + */ + private String diamondsFooterFileName; + + /** + * @param outputFile set the output file name + * @ant.required + */ + public void setoutputFile(String outputFile) { + this.outputFile = outputFile; + } + + /** + * @return the outputFile the output file name + */ + public String getoutputFile() { + return outputFile; + } + + /** + * @return the inputFile + */ + public String getinputFile() { + return inputFile; + } + + /** + * @param inputFile the name of file to scan and extract data from + * @ant.required + */ + public void setinputFile(String inputFile) { + this.inputFile = inputFile; + } + + /** + * @param diamondsFooterFileName set the diamonds footer file name + * @ant.required + */ + public void setdiamondsFooterFileName(String diamondsFooterFileName) { + this.diamondsFooterFileName = diamondsFooterFileName; + } + + /** + * @return the diamondsFooterFileName the diamonds footer file name + */ + public String getdiamondsFooterFileName() { + return diamondsFooterFileName; + } + + /** + * @param diamondsHeaderFileName set the diamonds header file name + * @ant.required + */ + public void setdiamondsHeaderFileName(String diamondsHeaderFileName) { + this.diamondsHeaderFileName = diamondsHeaderFileName; + } + + /** + * @return the diamondsFooterFileName the diamonds footer file name + */ + public String getdiamondsHeaderFileName() { + return diamondsHeaderFileName; + } + + /** + * @param header set whether we are dealing with a headers or libraries + * @ant.required + */ + public void setheader(boolean header) { + this.header = header; + } + + /** + * @return the fileType whether we are dealing with headers or libraries + */ + public boolean getheader() { + return header; + } + + /** the main part of the code - the method that is called */ + public void execute() { + log("CASummaryTask execute method with input file : " + inputFile, Project.MSG_ERR); + boolean inputFileFound = true; + BufferedReader diamondsHeaderFile; + BufferedReader diamondsFooterFile; + + log("output File is " + getoutputFile(), Project.MSG_ERR); + + try { + // open the file with the CA results init + inputFileReader = new BufferedReader(new FileReader(inputFile)); + } + catch (FileNotFoundException exc) { + log("FileNotFoundException while getting the input file. : " + inputFile + " " + + exc.getMessage(), Project.MSG_ERR); + inputFileFound = false; // stops an empty output file being created. + } + if (inputFileFound) { + try { + // write the title stuff for the XML diamonds schema + output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(getoutputFile()), "UTF8")); + } + catch (FileNotFoundException exc) { + log("FileNotFoundException while getting the output file. : " + getoutputFile() + + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (UnsupportedEncodingException exc) { + // We are Ignoring the errors as no need to fail the build. + log("UnsupportedEncodingException while creating the output file : " + + getoutputFile() + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (SecurityException exc) { + // We are Ignoring the errors as no need to fail the build. + log("SecurityException while creating the output file : " + getoutputFile() + " " + + exc.getMessage(), Project.MSG_ERR); + } + + if (output != null) { + // managed to open the output file + try { + // write the initial XML text to the file + String tempLine; + diamondsHeaderFile = null; + diamondsHeaderFile = new BufferedReader(new FileReader(getdiamondsHeaderFileName())); + while ((tempLine = diamondsHeaderFile.readLine()) != null) { + output.write(tempLine); + output.newLine(); + } + diamondsHeaderFile.close(); + boolean tempheader = getheader(); + if (tempheader) { + output.write(" \r\n"); + // process each line + findTextAndOutput(headerExpression); // read input file and write the output + } else { + output.write(" \r\n"); + // process each line + findTextAndOutput(libraryExpression); // read input file and write the output + } + + // write the end of file text + output.write(" "); + output.newLine(); + + diamondsFooterFile = null; + diamondsFooterFile = new BufferedReader(new FileReader(getdiamondsFooterFileName())); + while ((tempLine = diamondsFooterFile.readLine()) != null) { + output.write(tempLine); + output.newLine(); + } + output.close(); // close the output file + diamondsFooterFile.close(); + } + catch (FileNotFoundException exc) { + log("FileNotFoundException while getting the diamonds header file : " + + getdiamondsHeaderFileName() + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (IOException exc) { + // We are Ignoring the errors as no need to fail the build. + log("IOException : " + getdiamondsHeaderFileName() + " output file = " + + getoutputFile() + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (IllegalArgumentException exc) { + // We are Ignoring the errors as no need to fail the build. + log("IllegalArgumentException : " + getdiamondsHeaderFileName() + + " output file = " + getoutputFile() + " " + exc.getMessage(), Project.MSG_ERR); + } + } + else { + log("Error: no output File available ", Project.MSG_ERR); + } + } + else { + log("Error: no input File available ", Project.MSG_ERR); + } + } + + /** + * This is the function that performs the actual file searches and writes the number of occurances + * of each typeID to the output xml file + */ + private void findTextAndOutput(String expression) { + String value; + Integer count; + /** place to store the number of typeids found */ + Hashtable typeIds = new Hashtable(); + int tempKey; + int tempVal; + + try { + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = docFactory.newDocumentBuilder(); + Document doc = builder.parse(getinputFile()); + + //creating an XPathFactory: + XPathFactory factory = XPathFactory.newInstance(); + //using this factory to create an XPath object: + XPath xpath = factory.newXPath(); + //XPath object created compiles the XPath expression: + XPathExpression expr = xpath.compile(expression); + + //expression is evaluated with respect to a certain context node which is doc. + Object result = expr.evaluate(doc, XPathConstants.NODESET); + NodeList nodeList = (NodeList) result; + for (int i = 0; i < nodeList.getLength(); i++) { + value = nodeList.item(i).getNodeValue(); //get the value as a string from the xml file + tempKey = Integer.parseInt(value); //convert it to an integer so they can be sorted + if (!typeIds.containsKey(tempKey)) { //see if the typeID is already present in the hashtable + typeIds.put(tempKey, 0); //it's not so create it (stops null pointer exceptions) + } + count = typeIds.get(tempKey); //get the current count of this typeID + count++; //inc the count + typeIds.put(tempKey, count); //write it back to the hashtable + } + + //now sort and write to xml file + SortedSet sortedset = new TreeSet(typeIds.keySet()); + Iterator sorted = sortedset.iterator(); + while (sorted.hasNext()) { //go through each one on the file and write to xml output file + tempVal = sorted.next(); + output.write(" \r\n"); + } + } catch (ParserConfigurationException err) { + log("Error: ParserConfigurationException: trying to parse xml file ", Project.MSG_ERR); + } catch (SAXException err) { + log("Error: SAXException: trying to parse xml file ", Project.MSG_ERR); + } catch (XPathExpressionException err) { + log("Error: XPathExpressionException: trying to parse xml file ", Project.MSG_ERR); + } catch (IOException err) { + log("Error: IOException: trying to parse xml file ", Project.MSG_ERR); + } + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTSummaryTask.java --- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTSummaryTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTSummaryTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,101 +17,97 @@ package com.nokia.helium.quality.ant.taskdefs; -import java.io.*; -import java.util.*; -import org.apache.log4j.Logger; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.UnsupportedEncodingException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import java.io.FileReader; -import java.util.regex.Pattern; -import java.util.regex.Matcher; - - /** - * This Task searches the index.html files created by CMT and looks for the summary - * values at the end of the file e.g. Files: 12 LOCphy: 137. - * and takes the info and places it in an XMl file ready to be sent to diamonds. The Xml - * file is placed in the diamonds folder in the output folder and these files are then - * sent to diamonds when the build is finished soall we have to do is create the file in the - * correct folder. - * + +/** + * This Task searches the index.html files created by CMT and looks for the summary values at the + * end of the file e.g. Files: 12 LOCphy: 137. and takes the info and places it in an XMl file ready + * to be sent to diamonds. The Xml file is placed in the diamonds folder in the output folder and + * these files are then sent to diamonds when the build is finished soall we have to do is create + * the file in the correct folder. + * *
      * <hlm:cmtmetadatainput   
    -            diamondsHeaderFileName="C:\brtaylor\1\diamonds_header.xml" 
    -            diamondsFooterFileName="C:\brtaylor\1\diamonds_footer.xml"
    -            outptuFile="Z:\output\diamonds/cmt_summary_componentName_1.xml/" 
    -            inputFile="Z:\output\logs/minibuild_ido_0.0.03_test_cmt_componentName1_cmt/CMTHTML/index.html/>
    + *             diamondsHeaderFileName="C:\brtaylor\1\diamonds_header.xml" 
    + *             diamondsFooterFileName="C:\brtaylor\1\diamonds_footer.xml"
    + *             outptuFile="Z:\output\diamonds/cmt_summary_componentName_1.xml/" 
    + *             inputFile="Z:\output\logs/minibuild_ido_0.0.03_test_cmt_componentName1_cmt/CMTHTML/index.html/>
      * 
    * * @ant.task name="cmtsummarytask" category="Quality" */ - + public class CMTSummaryTask extends Task { - /** the following 2 variables are indexes to the SEARCH_TERMS_ARRAY **/ - /**index to the searched for text**/ + // The following 2 variables are indexes to the SEARCH_TERMS_ARRAY + /** Index to the searched for text */ private static final int INPUT_TEXT_INDEX = 0; - /**index to the text to write to the xml file**/ + /** Index to the text to write to the xml file */ private static final int OUTPUT_ELEMENT_INDEX = 1; - /**get the system relevent line separator **/ - private static final String NEW_LINE = System.getProperty( "line.separator" ); - /** this array contains the text to be searched for in the inputFile (1st element) - and the text to be written to the .xml output file (2nd element)**/ + /** + * this array contains the text to be searched for in the inputFile (1st element) and the text + * to be written to the .xml output file (2nd element) + */ private static final String[][] SEARCH_TERMS_ARRAY = { - //1st elem 2nd elem - {"Files:", "files"}, - {"LOCphy:", "locphy"}, - {"LOCbl:", "locbl"}, - {"LOCpro:", "locpro"}, - {"LOCcom:", "loccom"}, - {"v(G) :", "vg"}, - {"MI without comments :", "mi_wo_comments"}, - {"MI comment weight :", "mi_comment_weight"}, - {"MI:", "mi"} - }; + // 1st elem 2nd elem + { "Files:", "files" }, { "LOCphy:", "locphy" }, { "LOCbl:", "locbl" }, + { "LOCpro:", "locpro" }, { "LOCcom:", "loccom" }, { "v(G) :", "vg" }, + { "MI without comments :", "mi_wo_comments" }, + { "MI comment weight :", "mi_comment_weight" }, { "MI:", "mi" } }; - /** always accesses the 1st group of the matcher**/ - private static int matcherGroupNum; //default init is 0 + /** always accesses the 1st group of the matcher */ + private static int matcherGroupNum; // default init is 0 - /**indexes to the SEARCH_TERMS_ARRAY**/ + /** indexes to the SEARCH_TERMS_ARRAY */ private int arrayIndex; - + private int sizeArray = SEARCH_TERMS_ARRAY.length; - private Logger log = Logger.getLogger(CMTSummaryTask.class); - /** the following variables are inputs to the class**/ - /** the file containing the CMT summary data**/ + /** the file containing the CMT summary data */ private String inputFile; - /**name of file to write the output to**/ + /** name of file to write the output to */ private String outputFile; - - /**the following variables are used internally by the class**/ - /** each line of the input file is read into this**/ - private String line; - /**the regex for a string of digits**/ + + /** each line of the input file is read into this */ + private String line; + /** the regex for a string of digits */ private Pattern digitPattern = Pattern.compile("\\d+"); - /** file descriptor for the input file**/ + /** file descriptor for the input file */ private BufferedReader inputFileReader; - /**file handler used to write the summary numbers to the output file***/ - private BufferedWriter output; //default init = null + /** file handler used to write the summary numbers to the output file **/ + private BufferedWriter output; // default init = null - /**tells the main method whether it should be looking for digist or text**/ - private boolean lineStartsWithDigits; //default init = false + /** tells the main method whether it should be looking for digist or text */ + private boolean lineStartsWithDigits; // default init = false - /**file name of the default diamonds XML file header part (1st few lines) - used so not writing the XML text here**/ + /** + * file name of the default diamonds XML file header part (1st few lines) used so not writing + * the XML text here + */ private String diamondsHeaderFileName; - /**file name of the default diamonds XML file footer part (last line) - used so not writing the XML text here**/ + /** + * file name of the default diamonds XML file footer part (last line) used so not writing the + * XML text here + */ private String diamondsFooterFileName; - - /** - * @param outputFile - * set the output file name + * @param outputFile set the output file name * @ant.required */ public void setOutputFile(String outputFile) { @@ -119,14 +115,12 @@ } /** - * @return the outputFile - * the output file name + * @return the outputFile the output file name */ public String getOutputFile() { return outputFile; } - /** * @return the inputFile */ @@ -135,8 +129,7 @@ } /** - * @param inputFile - * the name of file to scan and extract data from + * @param inputFile the name of file to scan and extract data from * @ant.required */ public void setinputFile(String inputFile) { @@ -144,8 +137,7 @@ } /** - * @param diamondsFooterFileName - * set the diamonds footer file name + * @param diamondsFooterFileName set the diamonds footer file name * @ant.required */ public void setdiamondsFooterFileName(String diamondsFooterFileName) { @@ -153,16 +145,14 @@ } /** - * @return the diamondsFooterFileName - * the diamonds footer file name + * @return the diamondsFooterFileName the diamonds footer file name */ public String getdiamondsFooterFileName() { return diamondsFooterFileName; } /** - * @param diamondsHeaderFileName - * set the diamonds header file name + * @param diamondsHeaderFileName set the diamonds header file name * @ant.required */ public void setdiamondsHeaderFileName(String diamondsHeaderFileName) { @@ -170,197 +160,216 @@ } /** - * @return the diamondsFooterFileName - * the diamonds footer file name + * @return the diamondsFooterFileName the diamonds footer file name */ public String getdiamondsHeaderFileName() { return diamondsHeaderFileName; } - - /**the main part of the code - the method that is called**/ + /** the main part of the code - the method that is called */ public void execute() { log("CMTSummaryTask execute method with input file : " + inputFile, Project.MSG_ERR); - boolean result; - String commandString; boolean inputFileFound = true; BufferedReader diamondsHeaderFile; BufferedReader diamondsFooterFile; - - Project prj = getProject(); + log("output File is " + getOutputFile(), Project.MSG_ERR); - + try { - //open the file with the CMT results init + // open the file with the CMT results init inputFileReader = new BufferedReader(new FileReader(inputFile)); - } catch (FileNotFoundException exc) { - log("FileNotFoundException while getting the input file. : " + inputFile + " " + exc.getMessage(), Project.MSG_ERR); - inputFileFound = false; //stops an empty output file being created. + } + catch (FileNotFoundException exc) { + log("FileNotFoundException while getting the input file. : " + inputFile + " " + + exc.getMessage(), Project.MSG_ERR); + inputFileFound = false; // stops an empty output file being created. } if (inputFileFound) { try { - //write the title stuff for the XML diamonds schema + // write the title stuff for the XML diamonds schema output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(getOutputFile()), "UTF8")); - } catch (FileNotFoundException exc) { - log("FileNotFoundException while getting the output file. : " + getOutputFile() + " " + exc.getMessage(), Project.MSG_ERR); - } catch (UnsupportedEncodingException exc) { + } + catch (FileNotFoundException exc) { + log("FileNotFoundException while getting the output file. : " + getOutputFile() + + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (UnsupportedEncodingException exc) { // We are Ignoring the errors as no need to fail the build. - log("UnsupportedEncodingException while creating the output file : " + getOutputFile() + " " + exc.getMessage(), Project.MSG_ERR); - } catch (SecurityException exc) { - // We are Ignoring the errors as no need to fail the build. - log("SecurityException while creating the output file : " + getOutputFile() + " " + exc.getMessage(), Project.MSG_ERR); + log("UnsupportedEncodingException while creating the output file : " + + getOutputFile() + " " + exc.getMessage(), Project.MSG_ERR); } - + catch (SecurityException exc) { + // We are Ignoring the errors as no need to fail the build. + log("SecurityException while creating the output file : " + getOutputFile() + " " + + exc.getMessage(), Project.MSG_ERR); + } + if (output != null) { - //managed to open the output file + // managed to open the output file try { - //write the initial XML text to the file + // write the initial XML text to the file String tempLine; diamondsHeaderFile = null; diamondsHeaderFile = new BufferedReader(new FileReader(getdiamondsHeaderFileName())); while ((tempLine = diamondsHeaderFile.readLine()) != null) { - output.write(tempLine); - output.newLine(); + output.write(tempLine); + output.newLine(); } diamondsHeaderFile.close(); output.write(" \r\n"); - + // CheckStyle:InnerAssignment OFF - //process each of the searchterms - while ((arrayIndex < sizeArray) && ((line = inputFileReader.readLine()) != null)) { - findTextAndOutput(); //read finput file and write the output + // process each of the searchterms + while ((arrayIndex < sizeArray) + && ((line = inputFileReader.readLine()) != null)) { + findTextAndOutput(); // read finput file and write the output } // CheckStyle:InnerAssignment ON - - //write the end of file text + + // write the end of file text output.write(" "); output.newLine(); - + diamondsFooterFile = null; diamondsFooterFile = new BufferedReader(new FileReader(getdiamondsFooterFileName())); while ((tempLine = diamondsFooterFile.readLine()) != null) { - output.write(tempLine); - output.newLine(); + output.write(tempLine); + output.newLine(); } - output.close(); //close the output file + output.close(); // close the output file diamondsFooterFile.close(); - } catch (FileNotFoundException exc) { - log("FileNotFoundException while getting the diamonds header file : " + getdiamondsHeaderFileName() + " " + exc.getMessage(), Project.MSG_ERR); - } catch (IOException exc) { + } + catch (FileNotFoundException exc) { + log("FileNotFoundException while getting the diamonds header file : " + + getdiamondsHeaderFileName() + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (IOException exc) { // We are Ignoring the errors as no need to fail the build. - log("IOException : " + getdiamondsHeaderFileName() + " output file = " + getOutputFile() + " " - + exc.getMessage(), Project.MSG_ERR); - } catch (IllegalArgumentException exc) { + log("IOException : " + getdiamondsHeaderFileName() + " output file = " + + getOutputFile() + " " + exc.getMessage(), Project.MSG_ERR); + } + catch (IllegalArgumentException exc) { // We are Ignoring the errors as no need to fail the build. - log("IllegalArgumentException : " + getdiamondsHeaderFileName() + " output file = " + getOutputFile() + " " - + exc.getMessage(), Project.MSG_ERR); + log("IllegalArgumentException : " + getdiamondsHeaderFileName() + + " output file = " + getOutputFile() + " " + exc.getMessage(), Project.MSG_ERR); } - } else { - log("Error: no output File available ", Project.MSG_ERR); + } + else { + log("Error: no output File available ", Project.MSG_ERR); } - } else { - log("Error: no input File available ", Project.MSG_ERR); - } + } + else { + log("Error: no input File available ", Project.MSG_ERR); + } } /** - This is the function that performs the actual file searches and writes the number - following the searched for text to the output XML file - **/ - private void findTextAndOutput() - { + * This is the function that performs the actual file searches and writes the number following + * the searched for text to the output XML file + */ + private void findTextAndOutput() { final int colonSkip = 2; byte[] lineBytes = null; - int len; int buffLen; int lineLen; int serchTermTextLen; int spacesLen; - + try { lineLen = line.length(); while ((lineLen > 0) && (arrayIndex < sizeArray)) { - //Process each of the groups of chars in a line + // Process each of the groups of chars in a line if (line.startsWith(SEARCH_TERMS_ARRAY[arrayIndex][INPUT_TEXT_INDEX])) { - //found the CMT data type we are looking for so look fo r the digits now + // Found the CMT data type we are looking for so look fo r the digits now serchTermTextLen = SEARCH_TERMS_ARRAY[arrayIndex][INPUT_TEXT_INDEX].length(); buffLen = writeToOutput(); if ((buffLen > 0) && (arrayIndex < sizeArray)) { - //skip over the digits so can get the next searchterm near the begining of line + // Skip over the digits so can get the next searchterm near start of line line = line.substring(line.indexOf(':') + colonSkip + buffLen); spacesLen = removeAnySpaces(); - lineLen = lineLen - (buffLen + serchTermTextLen + spacesLen); //decrease line length for the while loop - } else { - //didn't find the digits so probably at the end of the line and the digits - //are on the next line - len = line.length(); - //convert the line to bytes so we can check for a specific Character + // Decrease line length for the while loop + lineLen = lineLen - (buffLen + serchTermTextLen + spacesLen); + } + else { + // Didn't find the digits so probably at the end of the line and the digits + // are on the next line + // Convert the line to bytes so we can check for a specific Character lineBytes = line.getBytes("UTF-8"); int sbLen = lineBytes.length; - //the last real char (i.e. not the EOL) should be '=' if the digits are on the next line + // The last real char (i.e. not the EOL) should be '=' if the digits are on + // the next line if (lineBytes[sbLen - 1] == '=') { - //found the '=' so read the next line in + // found the '=' so read the next line in lineStartsWithDigits = true; lineLen = 0; - } else { + } + else { log("can't find the '=' at end of line ", Project.MSG_ERR); lineLen = 0; } } - } else if (lineStartsWithDigits) { //probably got a line with digits on - buffLen = writeToOutput(); //definitely got a line with digits on + } + else if (lineStartsWithDigits) { // probably got a line with digits on + buffLen = writeToOutput(); // definitely got a line with digits on lineStartsWithDigits = false; - if ((buffLen > 0) && (arrayIndex < sizeArray)) { //now need to get rid of the digits and get to the next none digits char + if ((buffLen > 0) && (arrayIndex < sizeArray)) { + // Now need to get rid of the digits and get to the next + // none digits char line = line.substring(buffLen); spacesLen = removeAnySpaces(); - lineLen = lineLen - (buffLen + spacesLen); //decrease line length for the while loop - } else { + // decrease line length for the while loop + lineLen = lineLen - (buffLen + spacesLen); + } + else { lineLen = 0; - log("can't find the digits at beg of line ", Project.MSG_ERR); + log("can't find the digits at beg of line ", Project.MSG_ERR); } - } else { + } + else { lineLen = 0; } } - } catch (IOException exc) { + } + catch (IOException exc) { log("IOException Error searching : " + exc.getMessage(), Project.MSG_ERR); } - return; } - private int writeToOutput() throws IOException - { + private int writeToOutput() throws IOException { String buffer; int buffLen; Matcher componentMatch = digitPattern.matcher(line); if (componentMatch.find()) { - //found the digits after the search term + // Found the digits after the search term buffer = componentMatch.group(matcherGroupNum); - //write the XML formated nn to the output file (plus the other) + // Write the XML formated nn to the output file (plus the other) output.write(" <" + SEARCH_TERMS_ARRAY[arrayIndex][OUTPUT_ELEMENT_INDEX] + ">"); output.write(buffer); output.write(""); output.newLine(); buffLen = buffer.length(); - } else { + } + else { buffLen = 0; - log("can't find digits may be '=' at end of line ", Project.MSG_ERR); + log("can't find digits may be '=' at end of line ", Project.MSG_ERR); } return buffLen; } - + private int removeAnySpaces() throws UnsupportedEncodingException { byte[] lineBytes; int num = 0; int len = line.length(); - //convert the line to bytes so we can check for a specific Character + // Convert the line to bytes so we can check for a specific Character lineBytes = line.getBytes("UTF-8"); - //while there are still spaces at the front of the line shuffle the line along to get rid of them + // While there are still spaces at the front of the line shuffle the line along to get rid + // of them while ((lineBytes[num++] == ' ') && (len > 0)) { - line = line.substring(1); //remove 1 space at front of line + // Remove 1 space at front of line + line = line.substring(1); len--; } return num; } -} \ No newline at end of file +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTToolTask.java --- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTToolTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CMTToolTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -183,8 +183,8 @@ */ private ExecTask getExecTask(String taskName, String cmd, File outDir) { ExecTask task = new ExecTask(); + task.bindToOwner(this); task.setDir(outDir); - task.setTaskName(this.getTaskName()); task.setExecutable(cmd); return task; } @@ -211,19 +211,22 @@ dirScanner.scan(); String[] filelist = dirScanner.getIncludedFiles(); String lineSeparator = System.getProperty("line.separator"); + String fileSeparator = System.getProperty("file.separator"); + BufferedWriter outputFile = null; try { outputFile = new BufferedWriter(new FileWriter(input)); for (String file : filelist) { - outputFile.write(dirScanner.getBasedir().toString() + file + outputFile.write(dirScanner.getBasedir().toString() + fileSeparator + file + lineSeparator); } } catch (IOException e) { throw new BuildException("Not able to generate file list for 'cmt'. ", e); } finally { try { - if (outputFile != null) + if (outputFile != null) { outputFile.close(); + } } catch (IOException ex) { // ignore exception ex = null; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CodeScannerTask.java --- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CodeScannerTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CodeScannerTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,30 +17,30 @@ package com.nokia.helium.quality.ant.taskdefs; -import java.io.*; +import java.io.File; import java.util.Vector; +import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; -import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.taskdefs.ExecTask; import org.apache.tools.ant.types.Path; -import org.apache.tools.ant.taskdefs.ExecTask; /** - * This task executes codescanner - and writes the results to the output directory. - * Codescanner parses C++ code and flags any inconsistencies or errors in output files. - * Configuration files are used to determine what passes and fails the checking e.g. maximum length of lines, - * whether 'C' type comments are allowed as well as C++ comments, does it adhere to the company coding - * guidelines and much more. Every person writing any C++ code - * should run codescanner on their code to ensure it follows the coding guidelines. The output logs - * should have no errors and preferably no warnings before the code should be checked into SCM, e.g. synergy or SVN. - * + * This task executes codescanner - and writes the results to the output directory. Codescanner + * parses C++ code and flags any inconsistencies or errors in output files. Configuration files are + * used to determine what passes and fails the checking e.g. maximum length of lines, whether 'C' + * type comments are allowed as well as C++ comments, does it adhere to the company coding + * guidelines and much more. Every person writing any C++ code should run codescanner on their code + * to ensure it follows the coding guidelines. The output logs should have no errors and preferably + * no warnings before the code should be checked into SCM, e.g. synergy or SVN. + * * Below is an example of how to use the target to run codescanner. - * + * *
      * <property name="codescanner.output.dir" location="./cs" />
      * <property name="codescanner.output.type" value="html" />
      * <property name="codescanner.config" location="./codescanner_config.xml" />
    - *
    + * 
      * <hlm:codescanner dest="${codescanner.output.dir}"
      *      format="${codescanner.output.type}"
      *      failonerror="true"
    @@ -64,8 +64,7 @@
         private boolean failonerror;
     
         /**
    -     * This defines if the task should fails in case of error while 
    -     * executing codescanner.
    +     * This defines if the task should fails in case of error while executing codescanner.
          * 
          * @param failonerror
          * @ant.not-required Default is false for backward compatibility.
    @@ -163,11 +162,6 @@
         @Override
         public void execute() {
             // creating the exec subtask
    -        String osType = System.getProperty("os.name");
    -        if (!osType.toLowerCase().startsWith("win")) {
    -            this.log("CODESCANNER: run in windows only");
    -            return;
    -        }
             ExecTask task = new ExecTask();
             task.setProject(getProject());
             task.setTaskName(this.getTaskName());
    @@ -179,18 +173,18 @@
             }
             if (configuration != null) {
                 if (!configuration.exists()) {
    -                throw new BuildException("Could not find the file "
    -                        + configuration);
    -            } else {
    +                throw new BuildException("Could not find the file " + configuration);
    +            }
    +            else {
                     task.createArg().setValue("-c");
                     task.createArg().setValue(configuration.getAbsolutePath());
                 }
    -        } else {
    -            throw new BuildException(
    -                    "'configuration' attribute must be defined");
    +        }
    +        else {
    +            throw new BuildException("'configuration' attribute must be defined");
             }
             if (!format.contains("xml")) {
    -           setFormat("xml," + format);
    +            setFormat("xml," + format);
             }
             this.log("Output format: " + format);
             // -t off
    @@ -224,7 +218,8 @@
                 if (i != srcs.size() - 1) {
                     task.createArg().setValue("-i");
                     task.createArg().setValue(srcs.elementAt(i));
    -            } else {
    +            }
    +            else {
                     task.createArg().setValue(srcs.elementAt(i));
                     task.createArg().setValue(dest.toString());
                 }
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CoverityTask.java
    --- a/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CoverityTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/quality/src/com/nokia/helium/quality/ant/taskdefs/CoverityTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -18,6 +18,7 @@
     
     import java.io.File;
     import java.util.Vector;
    +
     import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Task;
     import org.apache.tools.ant.taskdefs.ExecTask;
    @@ -48,6 +49,8 @@
         private String command;
         private boolean failOnError;
         private boolean execute = true;
    +    private boolean append;
    +    private File error;
         private String dir;
         private Vector coverityOptions = new Vector();
         private Vector coverityArgs = new Vector();
    @@ -77,6 +80,8 @@
             task.setProject(getProject());
             task.setTaskName(this.getTaskName());
             task.setFailonerror(failOnError);
    +        task.setError(this.error);
    +        task.setAppend(isAppend());
             task.setExecutable(command);
             task.setDir(new File(this.dir));
     
    @@ -164,6 +169,34 @@
         }
     
         /**
    +     * @return the errorFile
    +     */
    +    public File getError() {
    +        return error;
    +    }
    +
    +    /**
    +     * @param errorFile the errorFile to set
    +     */
    +    public void setError(File errorFile) {
    +        this.error = errorFile;
    +    }
    +
    +    /**
    +     * @param append the append to set
    +     */
    +    public void setAppend(boolean append) {
    +        this.append = append;
    +    }
    +
    +    /**
    +     * @return the append
    +     */
    +    public boolean isAppend() {
    +        return append;
    +    }
    +
    +    /**
          * To read the coverity arguments for coverity commands.
          * 
          * @param variableArg
    @@ -184,5 +217,6 @@
                 coverityArgs.add(coverityArg);
             }
         }
    +    
     
     }
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/antunit/test_ca.ant.xml
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/quality/tests/antunit/test_ca.ant.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,151 @@
    +
    +
    +
    +    Helium antlib Quality Compatibility Analyser related tests.
    +
    +    
    +
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +        
    +        
    +        
    +        
    +        
    +        
    +    
    +
    +    
    +    
    +        
    +        
    +        
    +    
    +
    +
    +    
    +
    +    
    +         output file is ${diamonds.build.output.dir} 
    +        
    +        
    +        
    +        
    +            
    +                
    +            
    +        
    +        ${header.ok}
    +        
    +            
    +        
    +    
    +
    +    
    +        
    +        
    +        
    +        
    +            
    +                
    +            
    +        
    +        ${header.notypeids}
    +        
    +            
    +                
    +            
    +        
    +    
    +
    +    
    +        
    +        
    +        
    +        
    +            
    +                
    +            
    +        
    +        ${libraries.ok}
    +        
    +            
    +        
    +    
    +    
    +    
    +            
    +        
    +        
    +    
    +
    +    
    +        
    +        
    +        
    +            
    +                
    +            
    +        
    +        ${libraries.one.id}
    +        
    +            
    +        
    +    
    +
    +
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/antunit/test_cmt.ant.xml
    --- a/buildframework/helium/sf/java/quality/tests/antunit/test_cmt.ant.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/quality/tests/antunit/test_cmt.ant.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -38,13 +38,12 @@
         
             
             
    -        
    -        
    -        
    -        
    +        
    +
    +    23
    +]]>
    +        
    +]]>
         
     
         
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/cmt_summary_1.xml
    --- a/buildframework/helium/sf/java/quality/tests/data/cmt_summary_1.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/quality/tests/data/cmt_summary_1.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,6 +1,6 @@
     
     
    -    21
    +    23
         
             2
             101
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/cmt_summary_2.xml
    --- a/buildframework/helium/sf/java/quality/tests/data/cmt_summary_2.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/quality/tests/data/cmt_summary_2.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,6 +1,6 @@
     
     
    -    21
    +    23
         
             3578
             1449873
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/cmt_summary_3.xml
    --- a/buildframework/helium/sf/java/quality/tests/data/cmt_summary_3.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/quality/tests/data/cmt_summary_3.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,6 +1,6 @@
     
     
    -    21
    +    23
         
         
     
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/cmt_summary_5.xml
    --- a/buildframework/helium/sf/java/quality/tests/data/cmt_summary_5.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/quality/tests/data/cmt_summary_5.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,6 +1,6 @@
     
     
    -    21
    +    23
         
             3578
             1449873
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/headers_report_notypeids.xml
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/quality/tests/data/headers_report_notypeids.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,51 @@
    +
    +
    +
    +
    +
    +  
    +    
    +      C:\Symbian\9.2\_sdpdefs.h
    +      
    +    
    +    
    +      C:\Symbian\9.2\_sipcodecdefs.h
    +      
    +    
    +    
    +      C:\Symbian\9.2\animationcmd.h
    +      
    +      
    +        5
    +        
    +          1
    +          BBC Break
    +        
    +        
    +          1
    +          SC Break
    +        
    +      
    +    
    +  
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/headers_report_ok.xml
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/quality/tests/data/headers_report_ok.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,80 @@
    +
    +
    +
    +
    +
    +  
    +    
    +      C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\include\_sdpdefs.h
    +      
    +      
    +        60
    +        13
    +        13
    +        
    +          1
    +          BBC Break
    +        
    +        
    +          1
    +          SC Break
    +        
    +      
    +    
    +    
    +      C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\include\_sipcodecdefs.h
    +      
    +      
    +        62
    +        13
    +        13
    +        File
    +        
    +          1
    +          BBC Break
    +        
    +        
    +          1
    +          SC Break
    +        
    +      
    +    
    +    
    +      C:\Symbian\9.2\S60_3rd_FP1_2\epoc32\include\animationcmd.h
    +      
    +      
    +        5
    +        0
    +        13
    +        
    +          1
    +          BBC Break
    +        
    +        
    +          1
    +          SC Break
    +        
    +      
    +    
    +  
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/libraries_report_ok.xml
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/quality/tests/data/libraries_report_ok.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,84 @@
    +
    +
    +
    +
    +    
    +        
    +            C:\Symbian\9.2\S60_3rd_FP1_2\aknicon.dso
    +            armv5
    +            
    +                7
    +                Informative
    +                None
    +            
    +            
    +                7
    +                Informative
    +                None
    +            
    +        
    +        
    +            C:\Symbian\9.2\S60_3rd_FP1_2\aknnotify.dso
    +            
    +                6
    +                Possible BBC Break
    +                SC Break
    +            
    +            
    +                7
    +                Informative
    +                None
    +            
    +        
    +        
    +            C:\Symbian\9.2\S60_3rd_FP1_2\animation.dso
    +            
    +                7
    +                Informative
    +                None
    +            
    +            
    +                14
    +                 Informative
    +                None
    +            
    +        
    +        
    +            C:\Symbian\9.2\S60_3rd_FP1_2\animationshared.dso
    +            
    +                14
    +                Informative
    +                None
    +            
    +        
    +        
    +            C:\Symbian\9.2\S60_3rd_FP1_2\apfile.dso
    +          
    +              4
    +              BBC Break
    +              SC Break
    +          
    +      
    +    
    +
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/quality/tests/data/libraries_report_one_id.xml
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/quality/tests/data/libraries_report_one_id.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,42 @@
    +
    +
    +
    +
    +    
    +        
    +            C:\Symbian\9.2\S60_3rd_FP1_2\aknicon.dso
    +            armv5
    +            
    +                7
    +                Informative
    +                None
    +            
    +            
    +                7
    +                Informative
    +                None
    +            
    +        
    +    
    +
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/doc/sbs.rst
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sbs/doc/sbs.rst	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,254 @@
    +.. index::
    +  module: Configuring Raptor (SBS)
    +
    +========================
    +Configuring Raptor (SBS)
    +========================
    +
    +.. contents::
    +
    +This document describes requirements and how to run sbs builds using helium. Now it is 
    +possible to pass directly pass all the raptor input directly and there are no mapping of
    +raptor parameter specific to helium.
    +
    +
    +SBS Requirements
    +-----------------
    +
    +Before starting the build, SBS needs to be updated for s60 related changes, please follow the instructions from the link below,
    +
    +`How to Build Raptor `_
    +
    +1. SBS_HOME environment variable needs to be set
    +2. PATH environment variable needs to be updated with SBS related exe::
    +
    +    path(SBS_HOME\\BIN;SBS_HOME\\win32\\mingw\\bin;SBS_HOME\\win32\\msys\\bin)
    +
    +3. RVCT requirement for raptor is 22_686 or higher, in IDO config / product config batch file the env variable needs to be set to `HLM_RVCT_VERSION=22_686`
    +
    +For Example: ::
    +
    + set HELIUM_HOME=E:\Build_E\ec_test\helium-trunk\helium
    + set PATH=e:\svn\bin;E:\sbs\bin;c:\apps\actpython;%PATH%
    + set SBS_HOME=E:\sbs
    + set MWSym2Libraries=%MWSym2Libraries%;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs
    + set TEAM=site_name
    +   
    +(Note: For IDOs, these environment variables are set automatically, for S60 option is proposed).
    +
    +Required SBS input for Helium
    +------------------------------
    +
    +SBS Input consists of SBSInput and SBSBuild types:
    +
    +1. SBSInput - SBS Input stores the list of raptor arguments both the sbs options and
    +sbs make options. Nested sbs input option is also possible, for details please see the 
    +antdoclet information for sbsInput.
    +
    +2. SBSBuild - SBS Build is the collection of SBSInput. Each SBSInput refering within
    +SBSBuild corresponds to a single invocation of raptor with the corresponding sbs arguments
    +refered within the sbsInput. Each sbsInput refered within SBSBuild roughly corresponds to
    +the abld commands associated with corresponding abld configurations.  
    +is corresponds ot SBSBuild. This is there only for backward compatibility and will be removed
    +once the mighration is completed for schema 3.0, in which case, abld mapping of configuration
    +is not required and sbsInput could be directly used. Example is as below,
    +
    +.. code-block:: xml
    +
    +    
    +        
    +     
    +
    +
    +1. To run using SBS mode (schema 1.4.0)
    +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +
    +List of SBSInput one to one mapping with corresponding abld commands mapped for a configuration.
    +    
    +example is below,
    +
    +.. code-block:: xml
    +
    +    
    +    
    +        
    +    
    +
    +    
    +        
    +        
    +    
    +
    +    
    +    
    +        
    +    
    +    
    +    
    +        
    +     
    +
    +Assuming there is a dfs_build_export schema configuration 1.4.0 system definition file.
    +Then there should be a corresponding  type defined prefixing with sbs
    +as sbs.dfs_build_export as above which contains a reference to sbsinput. The sbsInput
    +contains actual raptor commands equivalent to abld commands to be executed for that
    +configuration, in this case it is referring exportSBS, which in turn referring to commonsbs
    +so finally the command generated would be 
    +
    +.. code-block:: xml
    +
    +    sbs -k --export-only
    +
    +This command is executed for all the components specified in the dfs_build_export
    +configuration.
    +
    +No change from the configuration is required, except the new raptor input needs to be imported.
    +
    +2. To run using SBS mode (schema 3.0.0)
    +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +
    +For schema 3.0, required inputs are,
    + a. sbs arguments
    + b. package definition files
    + c. filters to filter the component (check sysdefFilterSet under Helium Antlib documentation)
    + d. patternset - specifying specific set of layers to be executed (deprecated, will be replaced by id filtering).
    + 
    +As Raptor does not support yet schema 3.0 parsing, the system definition file
    +should be downgraded before being passed to the tool. This feature is controlled by
    +the ***sbs.downgrade.sysdef.enabled*** boolean property.
    +
    +Filtering can be configured by defining a hlm:sysdefFilterSet type with a specific reference id based on the following 
    +naming convention: sbs.filters.
    +
    +This example shows how to configure a filterset for the build_export configuration:
    +
    +.. code-block:: xml
    +
    +    
    +    
    +        
    +     
    +
    +    
    +        
    +     
    +
    +With a similar configuration approach a set of layer can be selected or excluded, by defining a patternset following this naming convention:
    +sbs.layers.
    +
    +Example:
    +
    +.. code-block:: xml
    +
    +    
    +        
    +        
    +     
    +
    +
    +Customizing raptor input
    +------------------------
    +
    +Different scenario the user might need to provide the raptor inputs, (required to map raptor 
    +commands for abld configuration which is not there in the default raptor input xml file, 
    +want to override the default raptor input to pass additional parameters), below section covers
    +how these can be customized.
    +
    +Mapping raptor commands for new configuration from system definition file (1.4.0)
    +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +
    +First step is to identify the abld commands executed by the new configuration. Correspondingly the
    +raptor commands need to be identified for that. Then need to check from the common raptor input 
    +is there any input which can be reused. If any raptor input could be re-usable, the just refering
    +that input and adding additional arguments would provide the exact raptor command arguments to be
    +executed.
    +
    +
    +For example, if the new configuration for which the raptor command input is to be created is,
    +os, which is not there in the default raptor input, then abld commands executed are 
    +(to be simpoer - bldmake, export, tools_rel, winscw, armv5). The corresponding raptor input would
    +be
    +
    +
    +.. code-block:: xml
    +
    +    
    +        
    +        
    +            
    +            
    +        
    +    
    +
    +    
    +        
    +        
    +            
    +            
    +        
    +    
    +
    +    
    +        
    +        
    +            
    +            
    +        
    +    
    +
    +
    +    
    +        
    +        
    +            
    +            
    +        
    +    
    +
    +The default raptor input for each build target (tools, winscw, armv5) are reused here and just the
    +log file names are changed.
    +
    +Next the sequence of command execution needs to be defined for the corresponding os confoguration as below.
    +
    +.. code-block:: xml
    +
    +    
    +        
    +        
    +        
    +        
    +    
    +
    +For configuration name os in the system definition file, it will take the list of raptor input
    +as defined with sbs.os, then it will execute each sbsinput as separate sbs calls with the arguments
    +extracted from the corresponding reference id.
    +
    +Overriding default raptor arguments
    +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    +
    +In case the default argument is not enough for the user requirements, this could be overriden by
    +redefining the reference of a particular sbsoptions will provide the user to change the arguments.
    +
    +For example, if the user just wants to pass debug flag for armv5 raptor inputs, the raptor input 
    +
    +.. code-block:: xml
    +
    +    
    +    
    +        
    +        
    +    
    +
    +
    +could be redefined as below in the user configuration,
    +
    +.. code-block:: xml
    +
    +    
    +    
    +        
    +        
    +        
    +    
    +
    +This would add the debug flag in all the raptor configuration which is using armv5CommonSBS.
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/doc/sbscoverity.rst
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sbs/doc/sbscoverity.rst	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,70 @@
    +.. index::
    +  module: Configuring Coverity Prevent Tool with SBS
    +
    +==========================================
    +Configuring Coverity Prevent Tool with SBS
    +==========================================
    +
    +.. contents::
    +
    +This document describes requirements and how to run coverity prevent tool with sbs builds using helium. 
    +
    +Requirements
    +-----------------
    +
    +Please go through "Configuring Raptor (SBS)" before proceeding into this document.
    +
    +
    +Implementation
    +-----------------
    +- Coverity prevent tool commands are integrated with SBS task. 
    +- Before starting the build we need to setup the property coverity.enabled=true to enable the coverity prevent tool with build.
    +- Coverity task extends the "sbstask", so what ever the arguments we pass for sbstask will remain same for coverity tool also.
    +- For example 
    +
    +.. code-block:: xml
    +        
    +        
    +                
    +        
    +     
    +- In above example coverity prevent tool is integrated with sbs using task "coveritybuild".
    +- This task is slightly difference from sbstask as it accepts the coverity tool parameters required while running coverity tool.
    +- In the above example we have mentioned "coverity.build.options" which are required for cov-build command.
    +- coverityoptions datatype will follow below syntax.
    +
    +.. code-block:: xml
    +        
    +        
    +            
    +            
    +            
    +            
    +            
    +        
    +
    +- Internally "coveritybuild" task will run the "cov-build" with parameters passed with "" datatype and sbs commands.
    +- Above arguments are passed by default in helium. If it is required to remove/change the default parameters (by helium)into cov-build, we need to override the datatype "coverityoptions".
    +
    +- Command resulted for above example is shown below with "@{sbs.input} = dfs_build_input_armv5".
    +
    +    | cov-build.exe --auto-diff  --record-only  --config Y:/output/coverity/config/coverity_config.xml 
    +    | --preprocess-first  --dir Y:/output/coverity/intermidiate sbs -s Y:/output/build/canonical_system_definition_dfs_build.xml 
    +    | -c armv5 -k --logfile Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build.log 
    +    | --makefile=Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build
    +    
    +Note: 
    +--------------------
    +- Helium also supports other coverity tool commands. Please refer to section to "Coverity Prevent Tool" section.
    +- Coverity tool prevent tool can't run with emake. emake options are disabled with  task if "build.system=sbs-ec".
    +
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/doc/sbsctc.rst
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sbs/doc/sbsctc.rst	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,76 @@
    +.. index::
    +  module: Configuring CTC for SBS
    +
    +=======================
    +Configuring CTC for SBS
    +=======================
    +
    +The following commands will generate mon.sym files in the root of your build area which are sent to the ATS server to generate coverage information.
    +
    +Clean components:
    +
    +hlm compile-main -Dbuild.drive=z: -Dsysdef.configurations.list=build_ctc_clean -Dbuild.system=sbs
    +
    +Build for CTC:
    +
    +hlm compile-main -Dbuild.drive=z: -Dsysdef.configurations.list=build_ctc -Dctc.enabled=true -Dbuild.system=sbs
    +
    +Ant configuration:
    +
    +.. code-block:: xml
    +        
    +    
    +        
    +    
    +    
    +            
    +            
    +    
    +    
    +    
    +        
    +    
    +
    +    
    +        
    +        
    +            
    +        
    +    
    +
    +    
    +        
    +    
    +
    +    
    +            
    +            
    +    
    +
    +    
    +        
    +    
    +
    +    
    +        
    +    
    +    
    +    
    +        
    +        
    +            
    +            
    +        
    +    
    +
    +    
    +        
    +    
    +    
    +Optional extra arguments:
    +
    +.. code-block:: xml
    +    
    +    
    +        
    +    
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/sbs.rst
    --- a/buildframework/helium/sf/java/sbs/sbs.rst	Mon Sep 06 09:57:24 2010 +0100
    +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    @@ -1,249 +0,0 @@
    -.. index::
    -  module: Configuring Raptor (SBS)
    -
    -========================
    -Configuring Raptor (SBS)
    -========================
    -
    -.. contents::
    -
    -This document describes requirements and how to run sbs builds using helium. Now it is 
    -possible to pass directly pass all the raptor input directly and there are no mapping of
    -raptor parameter specific to helium.
    -
    -
    -SBS Requirements
    ------------------
    -
    -Before starting the build, SBS needs to be updated for s60 related changes, please follow the instructions from the link below,
    -
    -`How to Build Raptor `_
    -
    -1. SBS_HOME environment variable needs to be set
    -2. PATH environment variable needs to be updated with SBS related exe::
    -
    -    path(SBS_HOME\\BIN;SBS_HOME\\win32\\mingw\\bin;SBS_HOME\\win32\\msys\\bin)
    -
    -3. RVCT requirement for raptor is 22_686 or higher, in IDO config / product config batch file the env variable needs to be set to `HLM_RVCT_VERSION=22_686`
    -
    -For Example: ::
    -
    - set HELIUM_HOME=E:\Build_E\ec_test\helium-trunk\helium
    - set PATH=e:\svn\bin;E:\sbs\bin;c:\apps\actpython;%PATH%
    - set SBS_HOME=E:\sbs
    - set MWSym2Libraries=%MWSym2Libraries%;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs
    - set TEAM=site_name
    -   
    -(Note: For IDOs, these environment variables are set automatically, for S60 option is proposed).
    -
    -Required SBS input for Helium
    -------------------------------
    -
    -SBS Input consists of SBSInput and SBSBuild types:
    -
    -1. SBSInput - SBS Input stores the list of raptor arguments both the sbs options and
    -sbs make options. Nested sbs input option is also possible, for details please see the 
    -antdoclet information for sbsInput.
    -
    -2. SBSBuild - SBS Build is the collection of SBSInput. Each SBSInput refering within
    -SBSBuild corresponds to a single invocation of raptor with the corresponding sbs arguments
    -refered within the sbsInput. Each sbsInput refered within SBSBuild roughly corresponds to
    -the abld commands associated with corresponding abld configurations.  
    -is corresponds ot SBSBuild. This is there only for backward compatibility and will be removed
    -once the mighration is completed for schema 3.0, in which case, abld mapping of configuration
    -is not required and sbsInput could be directly used. Example is as below,
    -
    -.. code-block:: xml
    -
    -    
    -        
    -     
    -
    -
    -1. To run using SBS mode (schema 1.4.0)
    -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -
    -List of SBSInput one to one mapping with corresponding abld commands mapped for a configuration.
    -    
    -example is below,
    -
    -.. code-block:: xml
    -
    -    
    -    
    -        
    -        
    -    
    -
    -    
    -        
    -        
    -    
    -
    -    
    -    
    -        
    -    
    -    
    -    
    -        
    -     
    -
    -Assuming there is a dfs_build_export schema configuration 1.4.0 system definition file.
    -Then there should be a corresponding  type defined prefixing with sbs
    -as sbs.dfs_build_export as above which contains a reference to sbsinput. The sbsInput
    -contains actual raptor commands equivalent to abld commands to be executed for that
    -configuration, in this case it is referring exportSBS, which in turn referring to commonsbs
    -so finally the command generated would be 
    -
    -.. code-block:: xml
    -
    -    sbs -k --filters=FilterMetadataLog --export-only
    -
    -This command is executed for all the componentes specified in the dfs_build_export
    -configuration.
    -
    -No change from the configuration is required, except the new raptor input needs to be imported.
    -
    -2. To run using SBS mode (schema 3.0.0) - partial support
    -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -
    -For schema 3.0, required inputs are,
    - a. sbs arguments
    - b. package definition files
    - c. filters to filter the component
    - d. patternset - specifying specific set of layers to be executed.
    -
    -Note: Filters are not supported yet.
    - 
    -As raptor doesn't support schema 3.0 directly, the schema 3.0 is downgraded to
    -2.0 schema, then it is joined / merged with symbian / nokia system definition.
    -Finally calling raptor commands with the raptor input.
    -
    -The minimum required input for schema 3.0 is, sbsinput.
    -
    -.. code-block:: xml
    -
    -    
    -    
    -        
    -    
    -
    -When building for raptor just the export-sbs needs to be passed as the argument to 
    -compile-main target as below,
    -
    -.. code-block:: xml
    -
    -    
    -        
    -    
    -
    -Which will execute each sbs input from the list as a separate sbs call and execute it. Schema 3.0
    -is very basic and is only intended for internal testing / validation.
    -
    -Customizing raptor input
    -------------------------
    -
    -Different scenario the user might need to provide the raptor inputs, (required to map raptor 
    -commands for abld configuration which is not there in the default raptor input xml file, 
    -want to override the default raptor input to pass additional parameters), below section covers
    -how these can be customized.
    -
    -Mapping raptor commands for new configuration from system definition file (1.4.0)
    -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -
    -First step is to identify the abld commands executed by the new configuration. Correspondingly the
    -raptor commands need to be identified for that. Then need to check from the common raptor input 
    -is there any input which can be reused. If any raptor input could be re-usable, the just refering
    -that input and adding additional arguments would provide the exact raptor command arguments to be
    -executed.
    -
    -
    -For example, if the new configuration for which the raptor command input is to be created is,
    -os, which is not there in the default raptor input, then abld commands executed are 
    -(to be simpoer - bldmake, export, tools_rel, winscw, armv5). The corresponding raptor input would
    -be
    -
    -
    -.. code-block:: xml
    -
    -    
    -        
    -        
    -            
    -            
    -        
    -    
    -
    -    
    -        
    -        
    -            
    -            
    -        
    -    
    -
    -    
    -        
    -        
    -            
    -            
    -        
    -    
    -
    -
    -    
    -        
    -        
    -            
    -            
    -        
    -    
    -
    -The default raptor input for each build target (tools, winscw, armv5) are reused here and just the
    -log file names are changed.
    -
    -Next the sequence of command execution needs to be defined for the corresponding os confoguration as below.
    -
    -.. code-block:: xml
    -
    -    
    -        
    -        
    -        
    -        
    -    
    -
    -For configuration name os in the system definition file, it will take the list of raptor input
    -as defined with sbs.os, then it will execute each sbsinput as separate sbs calls with the arguments
    -extracted from the corresponding reference id.
    -
    -Overriding default raptor arguments
    -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    -
    -In case the default argument is not enough for the user requirements, this could be overriden by
    -redefining the reference of a particular sbsoptions will provide the user to change the arguments.
    -
    -For example, if the user just wants to pass debug flag for armv5 raptor inputs, the raptor input 
    -
    -.. code-block:: xml
    -
    -    
    -    
    -        
    -        
    -    
    -
    -
    -could be redefined as below in the user configuration,
    -
    -.. code-block:: xml
    -
    -    
    -    
    -        
    -        
    -        
    -    
    -
    -This would add the debug flag in all the raptor configuration which is using armv5CommonSBS.
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/sbscoverity.rst
    --- a/buildframework/helium/sf/java/sbs/sbscoverity.rst	Mon Sep 06 09:57:24 2010 +0100
    +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    @@ -1,70 +0,0 @@
    -.. index::
    -  module: Configuring Coverity Prevent Tool with SBS
    -
    -==========================================
    -Configuring Coverity Prevent Tool with SBS
    -==========================================
    -
    -.. contents::
    -
    -This document describes requirements and how to run coverity prevent tool with sbs builds using helium. 
    -
    -Requirements
    ------------------
    -
    -Please go through "Configuring Raptor (SBS)" before proceeding into this document.
    -
    -
    -Implementation
    ------------------
    -- Coverity prevent tool commands are integrated with SBS task. 
    -- Before starting the build we need to setup the property enabled.coverity=true to enable the coverity prevent tool with build.
    -- Coverity task extends the "sbstask", so what ever the arguments we pass for sbstask will remain same for coverity tool also.
    -- For example 
    -
    -.. code-block:: xml
    -        
    -        
    -                
    -        
    -     
    -- In above example coverity prevent tool is integrated with sbs using task "coveritybuild".
    -- This task is slightly difference from sbstask as it accepts the coverity tool parameters required while running coverity tool.
    -- In the above example we have mentioned "coverity.build.options" which are required for cov-build command.
    -- coverityoptions datatype will follow below syntax.
    -
    -.. code-block:: xml
    -        
    -        
    -            
    -            
    -            
    -            
    -            
    -        
    -
    -- Internally "coveritybuild" task will run the "cov-build" with parameters passed with "" datatype and sbs commands.
    -- Above arguments are passed by default in helium. If it is required to remove/change the default parameters (by helium)into cov-build, we need to override the datatype "coverityoptions".
    -
    -- Command resulted for above example is shown below with "@{sbs.input} = dfs_build_input_armv5".
    -
    -    | cov-build.exe --auto-diff  --record-only  --config Y:/output/coverity/config/coverity_config.xml 
    -    | --preprocess-first  --dir Y:/output/coverity/intermidiate sbs -s Y:/output/build/canonical_system_definition_dfs_build.xml 
    -    | -c armv5 --filters=FilterMetadataLog -k --logfile Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build.log 
    -    | --makefile=Y:/output/logs/compile/ido_helloworld_tb92_blr_ci_9.2.30_armv5_dfs_build
    -    
    -Note: 
    ---------------------
    -- Helium also supports other coverity tool commands. Please refer to section to "Coverity Prevent Tool" section.
    -- Coverity tool prevent tool can't run with emake. emake options are disabled with  task if "build.system=sbs-ec".
    -
    -
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/sbsctc.rst
    --- a/buildframework/helium/sf/java/sbs/sbsctc.rst	Mon Sep 06 09:57:24 2010 +0100
    +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    @@ -1,70 +0,0 @@
    -.. index::
    -  module: Configuring CTC for SBS
    -
    -=======================
    -Configuring CTC for SBS
    -=======================
    -
    -The following commands will generate mon.sym files in the root of your build area which are sent to the ATS server to generate coverage information.
    -
    -Clean components:
    -
    -hlm compile-main -Dbuild.drive=z: -Dsysdef.configurations.list=build_ctc_clean -Dbuild.system=sbs
    -
    -Build for CTC:
    -
    -hlm compile-main -Dbuild.drive=z: -Dsysdef.configurations.list=build_ctc -Dsbs.build.ctc=true -Dbuild.system=sbs
    -
    -Ant configuration:
    -
    -.. code-block:: xml
    -        
    -    
    -        
    -        
    -    
    -    
    -    
    -            
    -            
    -    
    -    
    -    
    -        
    -    
    -
    -    
    -        
    -        
    -            
    -        
    -    
    -
    -    
    -        
    -    
    -
    -    
    -            
    -            
    -    
    -
    -    
    -        
    -    
    -
    -    
    -        
    -    
    -    
    -    
    -        
    -        
    -            
    -            
    -        
    -    
    -
    -    
    -        
    -     
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/SAXSysdefParser.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/SAXSysdefParser.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/SAXSysdefParser.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,32 +1,34 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.helium.sbs;
     
    +import java.io.File;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +
     import org.apache.tools.ant.BuildException;
    +import org.dom4j.Attribute;
    +import org.dom4j.DocumentException;
     import org.dom4j.Element;
    -import org.dom4j.Attribute;
    -import org.dom4j.ElementPath;
     import org.dom4j.ElementHandler;
    +import org.dom4j.ElementPath;
     import org.dom4j.io.SAXReader;
    -import org.dom4j.DocumentException;
    -
    -import java.io.*;
    -import java.util.*;
     
     /**
      * Parses the sysdef config file and extracts the available configurations
    @@ -38,15 +40,16 @@
     
         /**
          * Constructor
    +     * 
          * @param fileName - name of the sysdef file to parse
          */
         public SAXSysdefParser(File fileName) {
    -        
    +
             sysdefFile = fileName;
         }
    -    
    +
         public List getLayers() {
    -        if (!initialized ) {
    +        if (!initialized) {
                 initialized = true;
                 parseConfig("layer");
                 if (layers == null) {
    @@ -58,33 +61,33 @@
     
         /**
          * Constructor
    +     * 
          * @return list of available configurations that can be built.
    -     */    
    -     public void parseConfig(String nodeToGet) {
    +     */
    +    public void parseConfig(String nodeToGet) {
             layers = new ArrayList();
             SAXReader reader = new SAXReader();
    -            reader.addHandler( "/SystemDefinition/systemModel/" + nodeToGet,
    -                new ElementHandler() {
    -                    public void onStart(ElementPath path) {
    -                    }
    -                    public void onEnd(ElementPath path) {
    -                        Element row = path.getCurrent();
    -                        Iterator itr = row.attributeIterator();
    -                        while (itr.hasNext())
    -                        {
    -                            Attribute child = (Attribute) itr.next();
    -                            String attrName = child.getQualifiedName();
    -                            if (attrName.equals("name")) {
    -                                layers.add(child.getValue());
    -                            }
    -                        }
    -                        row.detach();
    +        reader.addHandler("/SystemDefinition/systemModel/" + nodeToGet, new ElementHandler() {
    +            public void onStart(ElementPath path) {
    +            }
    +
    +            public void onEnd(ElementPath path) {
    +                Element row = path.getCurrent();
    +                Iterator itr = row.attributeIterator();
    +                while (itr.hasNext()) {
    +                    Attribute child = (Attribute) itr.next();
    +                    String attrName = child.getQualifiedName();
    +                    if (attrName.equals("name")) {
    +                        layers.add(child.getValue());
                         }
                     }
    -            );
    +                row.detach();
    +            }
    +        });
             try {
                 reader.read(sysdefFile);
    -        } catch (DocumentException e) {
    +        }
    +        catch (DocumentException e) {
                 e.printStackTrace();
             }
         }
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/SBSBuildList.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/SBSBuildList.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/SBSBuildList.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -17,14 +17,16 @@
     
     package com.nokia.helium.sbs.ant;
     
    -import org.apache.tools.ant.Project;
    -import org.apache.tools.ant.BuildException;
    +import java.util.HashMap;
     import java.util.Hashtable;
     import java.util.List;
    -import java.util.HashMap;
    -import com.nokia.helium.sbs.ant.types.*;
    -import com.nokia.helium.sbs.ant.taskdefs.*;
    +
     import org.apache.log4j.Logger;
    +import org.apache.tools.ant.BuildException;
    +import org.apache.tools.ant.Project;
    +
    +import com.nokia.helium.sbs.ant.types.SBSBuild;
    +import com.nokia.helium.sbs.ant.types.SBSInput;
     
     /**
      * This is the final class to store the sbs build list across the ant configurations.
    @@ -34,7 +36,7 @@
         private static HashMap sbsBuildMap;
     
         private static Logger log = Logger.getLogger(SBSBuildList.class);
    -
    +    
         private SBSBuildList() {
         }
         
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/GetSBSInputsTask.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/GetSBSInputsTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/GetSBSInputsTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -18,10 +18,12 @@
     package com.nokia.helium.sbs.ant.taskdefs;
     
     import java.util.List;
    +
     import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Task;
    -import com.nokia.helium.sbs.ant.types.*;
    -import com.nokia.helium.sbs.ant.*;
    +
    +import com.nokia.helium.sbs.ant.SBSBuildList;
    +import com.nokia.helium.sbs.ant.types.SBSInput;
     
     /**
      * This task provide a way to get the list of sbs command input for a particular
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/SBSTask.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/SBSTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/taskdefs/SBSTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -17,42 +17,32 @@
     
     package com.nokia.helium.sbs.ant.taskdefs;
     
    +import java.io.File;
    +import java.util.ArrayList;
    +import java.util.Collection;
    +import java.util.Hashtable;
     import java.util.List;
    -import org.w3c.dom.*;
    -import javax.xml.parsers.DocumentBuilder;
    -import javax.xml.parsers.DocumentBuilderFactory;
    -import javax.xml.transform.*;
    -import javax.xml.transform.dom.*;
    -import javax.xml.transform.stream.*;
    -import java.io.FileWriter;
    -import java.text.DecimalFormat;
    -import java.util.Date;
    -import com.nokia.helium.core.plexus.AntStreamConsumer;
    -import java.io.File;
    +
    +import org.apache.log4j.Logger;
     import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Project;
     import org.apache.tools.ant.Task;
    +import org.apache.tools.ant.types.PatternSet;
     
     import com.nokia.helium.core.ant.MappedVariable;
     import com.nokia.helium.core.ant.types.VariableSet;
    -import com.nokia.helium.sbs.ant.types.*;
    -import org.apache.log4j.Logger;
    -import org.apache.tools.ant.types.PatternSet;
    +import com.nokia.helium.core.plexus.AntStreamConsumer;
     import com.nokia.helium.sbs.SAXSysdefParser;
     import com.nokia.helium.sbs.SBSCommandBase;
     import com.nokia.helium.sbs.SBSException;
    -import java.util.ArrayList;
    -import java.util.Hashtable;
    +import com.nokia.helium.sbs.ant.types.SBSInput;
    +import com.nokia.helium.sbs.ant.types.SBSMakeOptions;
     import com.nokia.helium.sbs.plexus.SBSErrorStreamConsumer;
    -import java.util.Collection;
    -import javax.xml.parsers.ParserConfigurationException;
    -import java.io.IOException;
     
     /**
    - * This task is to execute the actual sbs commands with the list of sbs parameters
    - * using sbsinput type. Based on the raptor input list of additional log file path
    - * used needs to be set, so that the scanlog, additional log files are generated 
    - * properly.
    + * This task is to execute the actual sbs commands with the list of sbs parameters using sbsinput
    + * type. Based on the raptor input list of additional log file path used needs to be set, so that
    + * the scanlog, additional log files are generated properly.
      * 
      * 
      * Example 1:
    @@ -75,233 +65,237 @@
         private File errorFile;
         private String logSuffix;
         private File outputLogName;
    -    private File statsLog;
         private boolean executeCmd = true;
         private boolean failOnError = true;
         private boolean addMakeOptions = true;
    -    private Date startTime;
    -    private Date endTime;
         private SBSCommandBase sbsCmd = new SBSCommandBase();;
         private String errorPattern;
    -    
    -    
    -   
    -    public SBSCommandBase getSbsCmd() { return sbsCmd; }
    +
    +    public SBSCommandBase getSbsCmd() {
    +        return sbsCmd;
    +    }
     
         /**
    -     *  Helper function to set the clean log file. The cleanlog file captures the 
    -     *  clean output from raptor and stores into a separate log. This is being used
    -     *  to backtrace the error information to associate the components. The clean log 
    -     *  contains the list of files has to be cleaned by the raptor command for a
    -     *  specific components. An environment varialbe is set which is used by 
    -     *  filterMetadata plugin to store the clean log file in python. 
    +     * Helper function to set the clean log file. The cleanlog file captures the clean output from
    +     * raptor and stores into a separate log. This is being used to backtrace the error information
    +     * to associate the components. The clean log contains the list of files has to be cleaned by
    +     * the raptor command for a specific components. An environment varialbe is set which is used by
    +     * filterMetadata plugin to store the clean log file in python.
    +     * 
          * @param logPath, path of the clean log file.
          * @deprecated
          */
         @Deprecated
         public void setCleanLog(String logPath) {
    -        //cleanLog = logPath;
    +        // cleanLog = logPath;
             log("The usage of the cleanLog attribute is deprecated.");
         }
     
         /**
    -     *  Helper function to set the what log file. The what log file captures the 
    -     *  what output from raptor and stores into a separate log. This is being used
    -     *  to backtrace the error information to associate the components. The clean log 
    -     *  contains the list of files has to be cleaned by the raptor command for a
    -     *  specific components. An environment varialbe is set which is used by 
    -     *  filterMetadata plugin to store the clean log file in python. 
    +     * Helper function to set the what log file. The what log file captures the what output from
    +     * raptor and stores into a separate log. This is being used to backtrace the error information
    +     * to associate the components. The clean log contains the list of files has to be cleaned by
    +     * the raptor command for a specific components. An environment varialbe is set which is used by
    +     * filterMetadata plugin to store the clean log file in python.
    +     * 
          * @param logPath, path of the clean log file.
          * @deprecated
          */
         @Deprecated
         public void setWhatLog(String logPath) {
    -        //whatLog = logPath;
    +        // whatLog = logPath;
             log("The usage of the whatLog attribute is deprecated.");
         }
     
         /**
    -     *  Helper function to set the output log file name. Path of the output log
    -     *  where the raptor command output to be stored. This would be obtained from
    -     *  sbsinput, if the raptor argument --logfile set.
    +     * Helper function to set the output log file name. Path of the output log where the raptor
    +     * command output to be stored. This would be obtained from sbsinput, if the raptor argument
    +     * --logfile set.
    +     * 
          * @param logName, name of the logfile to store the raptor output.
          */
         public void setOutputLog(File logName) {
             outputLogName = logName;
         }
    -    
    +
         /**
          * To get the output log.
    +     * 
          * @return
          */
         public File getOutputLog() {
    -        return outputLogName ;
    +        return outputLogName;
         }
    -    
    -    
     
         /**
    -     *  Helper function to set the statistics info of the raptor command. The
    -     *  stats file contains how long the build being executed, the log file for
    -     *  which the stats is obtained. Used during scanlog generation from template file.
    -     *  Once ORM is working an additional table could be created which stores the 
    -     *  statistics information, in which case, there won't be the need for the
    -     *  statistics file.
    +     * Helper function to set the statistics info of the raptor command. The stats file contains how
    +     * long the build being executed, the log file for which the stats is obtained. Used during
    +     * scanlog generation from template file. Once ORM is working an additional table could be
    +     * created which stores the statistics information, in which case, there won't be the need for
    +     * the statistics file.
    +     * 
          * @param log name of the logfile to store the raptor command statistics information.
          * @deprecated
          */
         @Deprecated
         public void setStatsLog(File log) {
    -        statsLog = log;
    +//        statsLog = log;
         }
    -    
     
         /**
    -     *  Helper function to set the sbsinput name for which the sbs to be executed.
    -     *  The sbsinput contains the raptor parameter both the sbs options and sbs make options.
    +     * Helper function to set the sbsinput name for which the sbs to be executed. The sbsinput
    +     * contains the raptor parameter both the sbs options and sbs make options.
    +     * 
          * @param inputName name of the sbs input which contains the list of sbs parameters.
          */
         public void setSBSInput(String inputName) {
             sbsInputName = inputName;
         }
    -    
    +
         /**
          * To get the sbs name.
    +     * 
          * @return
          */
         public String getSBSInput() {
    -        return sbsInputName ;
    +        return sbsInputName;
         }
    -    
    -    
     
         /**
    -     *  Helper function to set the sbs error log file path. The error log file contains
    -     *  the errors captured from the raptor error stream and processed separately.
    +     * Helper function to set the sbs error log file path. The error log file contains the errors
    +     * captured from the raptor error stream and processed separately.
    +     * 
          * @param file path of the error output to be stored for the raptor command execution.
          */
         public void setErrorOutput(File file) {
             errorFile = file;
         }
    -    
    +
         /**
          * To get the error output file.
    +     * 
          * @return
          */
         public File getErrorOutput() {
    -        return errorFile ;
    +        return errorFile;
         }
     
         /**
    -     *  Helper function to set the sysdef file path. System definition file contains
    -     *  the full list of components to be build with the sbs input. For 1.4.0 schema
    -     *  the sysdef file should be already filtered for the corresponding abld configuration
    -     *  and the sysdef file associated here contains only layers for which the sbs command
    -     *  needs to be executed with sbsinput arguments. 
    +     * Helper function to set the sysdef file path. System definition file contains the full list of
    +     * components to be build with the sbs input. For 1.4.0 schema the sysdef file should be already
    +     * filtered for the corresponding abld configuration and the sysdef file associated here
    +     * contains only layers for which the sbs command needs to be executed with sbsinput arguments.
    +     * 
          * @param file sysdef file path.
          */
         public void setSysDefFile(File file) {
             sysDefFile = file;
         }
    -    
    +
         /**
          * To get the sysdef file.
    +     * 
          * @return
          */
         public File getSysDefFile() {
    -        return sysDefFile ;
    +        return sysDefFile;
         }
    -    
     
         /**
    -     *  Helper function to set the log suffix.
    -     *  @param suffix logfile suffix.
    +     * Helper function to set the log suffix.
    +     * 
    +     * @param suffix logfile suffix.
          */
         public void setLogSuffix(String suffix) {
             logSuffix = suffix;
         }
    -    
    +
         /**
          * To get the logsuffix.
    +     * 
          * @return
          */
         public String getLogSuffix() {
    -        return logSuffix ;
    +        return logSuffix;
         }
     
         /**
    -     *  Patternset is used to filter the layers from the sysdef file for which the sbs
    -     *  commands need to be executed instead of all the layers in the system definition files.
    -     *  This is useful for example in order to execute only the test layer, a patter set could
    -     *  contain test*, then all the layers begining with test are matched and passed as 
    -     *  raptor input.
    -     *  @param id patternset id, for which the patterns to be filtered.
    +     * Patternset is used to filter the layers from the sysdef file for which the sbs commands need
    +     * to be executed instead of all the layers in the system definition files. This is useful for
    +     * example in order to execute only the test layer, a patter set could contain test*, then all
    +     * the layers begining with test are matched and passed as raptor input.
    +     * 
    +     * @param id patternset id, for which the patterns to be filtered.
          */
         public void setLayerPatternSetRef(String id) {
             layerPatternSetRef = id;
         }
    -    
    +
         /**
          * 
    -     * To get the layer pattern set. 
    +     * To get the layer pattern set.
    +     * 
          * @return
          */
         public String getLayerPatternSetRef() {
    -        return layerPatternSetRef ;
    +        return layerPatternSetRef;
         }
     
         /**
    -     * Helper function to set the current working directory. This would be mostly the
    -     * root of the build area.
    -     *  @param dir root of the build area location from which to execute the raptor commands.
    +     * Helper function to set the current working directory. This would be mostly the root of the
    +     * build area.
    +     * 
    +     * @param dir root of the build area location from which to execute the raptor commands.
          */
         public void setWorkingDir(File dir) {
             workingDir = dir;
         }
    -    
    +
         /**
          * To get the working dir.
    +     * 
          * @return
          */
         public File getWorkingDir() {
    -        return workingDir ;
    +        return workingDir;
         }
    -    
    -
     
         /**
    -     * Helper function to execute the actual commands or just print the commands and 
    -     * not execute the actual commands.
    -     *  @param execute true / false if true print and execute the commands, otherwise just
    -     *  print the commands.
    +     * Helper function to execute the actual commands or just print the commands and not execute the
    +     * actual commands.
    +     * 
    +     * @param execute true / false if true print and execute the commands, otherwise just print the
    +     *        commands.
          */
         public void setExecute(boolean execute) {
             executeCmd = execute;
         }
    -    
    +
         /**
          * To get execute value.
    +     * 
          * @return
          */
         public boolean getExecute() {
    -        return executeCmd ;
    +        return executeCmd;
         }
     
         /**
    -     * Helper function to set whether to fail the build or not. 
    -     *
    +     * Helper function to set whether to fail the build or not.
    +     * 
          * @param failBuild true / false - true to fail the build otherwise false.
          */
         public void setFailOnError(boolean failBuild) {
             failOnError = failBuild;
         }
    -    
    +
         /**
          * To get the failonError value.
    +     * 
          * @return
          */
         public boolean getFailOnError() {
    -        return failOnError ;
    +        return failOnError;
         }
     
         /**
    @@ -310,10 +304,10 @@
         protected void setAddMakeOptions(boolean addMakeOptions) {
             this.addMakeOptions = addMakeOptions;
         }
    -    
    -    
    +
         /**
          * To get the error Pattern.
    +     * 
          * @return
          */
         protected String getErrorStreamPattern() {
    @@ -321,7 +315,8 @@
         }
     
         /**
    -     *  Execute the sbs commands from sbsinput.  
    +     * Execute the sbs commands from sbsinput.
    +     * 
          * @throws BuildException
          */
         public void execute() {
    @@ -334,20 +329,21 @@
                 if (errorFile == null) {
                     log.debug("redirecting error to Antstream");
                     sbsCmd.addErrorLineHandler(new AntStreamConsumer(this));
    -            } else {
    +            }
    +            else {
                     sbsErrorConsumer = new SBSErrorStreamConsumer(errorFile, getErrorStreamPattern());
                     log.debug("redirecting error to file stream");
                     sbsCmd.addErrorLineHandler(sbsErrorConsumer);
                 }
    -        } catch (java.io.FileNotFoundException ex) {
    -            log("file path: " + errorFile + "Not valid" );
             }
    -        
    -        startTime = new Date();
    +        catch (java.io.FileNotFoundException ex) {
    +            log("file path: " + errorFile + "Not valid");
    +        }
    +
             try {
                 String cmdLine = getSBSCmdLine();
                 if (cmdLine == null) {
    -                // this happens in case there is nothing to be done, let's just run
    +                // this happens in case there is nothing to be built, let's just run
                     // sbs anyway so the output log is generated
                     cmdLine = " --logfile " + getOutputLog().getAbsolutePath();
                 }
    @@ -355,43 +351,41 @@
                 if (executeCmd) {
                     sbsCmd.execute(cmdLine);
                 }
    -        } catch (SBSException sex) {
    +        }
    +        catch (SBSException sex) {
                 log.debug("SBS exception occured during sbs execution", sex);
                 if (failOnError) {
                     throw new BuildException("exception during SBS execution", sex);
                 }
    -        } finally {
    -            //Called to update the error stream, better would be the commandbase
    -            //handling the closing of streams in case of exceptions.
    +        }
    +        finally {
    +            // Called to update the error stream, better would be the commandbase
    +            // handling the closing of streams in case of exceptions.
                 if (sbsErrorConsumer != null) {
                     sbsErrorConsumer.close();
                 }
             }
    -        endTime = new Date();
    -        /*if (statsLog != null) {
    -            updateSBSLogStatistics(statsLog, outputLogName, startTime, endTime);
    -        }*/
         }
     
         /**
    -     * Internal function to get the filtered layers by
    -     * processing the system definition file with list of matched layers. 
    +     * Internal function to get the filtered layers by processing the system definition file with
    +     * list of matched layers.
          * 
    -     * @return list of filtered layers from the sysdef file for which
    -     * the raptor commands to be executed.
    +     * @return list of filtered layers from the sysdef file for which the raptor commands to be
    +     *         executed.
          */
         private List getFilteredLayers() {
             List filteredLayers = null;
             if (layerPatternSetRef != null) {
                 Hashtable references = getProject().getReferences();
    -            Object layerPatternSetObject = references.get(layerPatternSetRef); 
    -            if ( layerPatternSetObject != null && ! (layerPatternSetObject instanceof PatternSet)) {
    +            Object layerPatternSetObject = references.get(layerPatternSetRef);
    +            if (layerPatternSetObject != null && !(layerPatternSetObject instanceof PatternSet)) {
                     throw new BuildException("Layer Pattern set is not of type PatternSet");
                 }
                 if (layerPatternSetObject != null) {
                     PatternSet layerPatternSet = (PatternSet) layerPatternSetObject;
                     SAXSysdefParser sysDefParser = new SAXSysdefParser(sysDefFile);
    -                List fullLayerList = sysDefParser.getLayers(); 
    +                List fullLayerList = sysDefParser.getLayers();
                     filteredLayers = new ArrayList();
                     String[] includes = layerPatternSet.getIncludePatterns(getProject());
                     String[] excludes = layerPatternSet.getExcludePatterns(getProject());
    @@ -412,62 +406,8 @@
         }
     
         /**
    -     * Update the raptor build statistics by generating an xml file containing
    -     * the build time and the log file name, used to generate the scanlog. 
    -     * @param infoFileName
    -     * @param logFileName
    -     * @param startTime
    -     * @param endTime
    -     */
    -    protected void updateSBSLogStatistics(File infoFileName, String logFileName, Date startTime, Date endTime) {
    -
    -        try {
    -            DocumentBuilderFactory sbsInfo = DocumentBuilderFactory.newInstance();
    -            DocumentBuilder docBuilder = sbsInfo.newDocumentBuilder();
    -            Document doc = docBuilder.newDocument();
    -            Element root = doc.createElement("sbsinfo");
    -            doc.appendChild(root);
    -            Element child = doc.createElement("logfile");
    -            child.setAttribute("name", logFileName);
    -            root.appendChild(child);
    -
    -            long timeDiff = (endTime.getTime() - startTime.getTime()) / 1000;
    -            child = doc.createElement("durationlong");
    -            child.setAttribute("time", "" + timeDiff);
    -            root.appendChild(child);
    -            child = doc.createElement("duration");
    -            int hours = (int) (timeDiff / 3600);
    -            int minutesSeconds = (int)(timeDiff % 3600);
    -            int minutes = minutesSeconds / 60;
    -            int seconds = minutesSeconds % 60;
    -            DecimalFormat decimalFormat =  new DecimalFormat();
    -            decimalFormat.setMinimumIntegerDigits(2);
    -            String duration = decimalFormat.format(hours) + "H:" +  
    -                    decimalFormat.format(minutes) +  "M:"  + decimalFormat.format(seconds) + "S";
    -            //Todo: handle if the time difference is greater than 24 hours
    -            child.setAttribute("time", duration);
    -            root.appendChild(child);
    -            Transformer transformer = TransformerFactory.newInstance().newTransformer();
    -            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    -            FileWriter sbsWriter = new FileWriter(infoFileName);
    -            StreamResult result = new StreamResult(sbsWriter);
    -            DOMSource sbsSource = new DOMSource(doc);
    -            transformer.transform(sbsSource, result);
    -        } catch (ParserConfigurationException ex) {
    -            log.debug("ParserConfigurationException while xml writing sbs log info", ex);
    -        } catch (TransformerConfigurationException ex) {
    -            log.debug("TransformerConfigurationException while xml writing sbs log info", ex);
    -        } catch (IOException ex) {
    -            log.debug("IOException while xml writing sbs log info", ex);
    -        } catch (TransformerException ex) {
    -            log.debug("TransformerException while xml writing sbs log info", ex);
    -        }
    -    }
    -
    -
    -    /**
    -     * Internal function to find the included layer patterns. 
    -     *
    +     * Internal function to find the included layer patterns.
    +     * 
          * @param text - layer name to be compared with
          * @param includes - compare the layer name with the includes list.
          * @return true if the text containing layer name to be included.
    @@ -475,7 +415,8 @@
         private boolean isIncluded(String text, String[] includes) {
             if (includes == null) {
                 return true;
    -        } else {
    +        }
    +        else {
                 for (String pattern : includes) {
                     if (text.matches(pattern)) {
                         return true;
    @@ -486,8 +427,8 @@
         }
     
         /**
    -     * Internal function to find the excluded layer patterns. 
    -     *
    +     * Internal function to find the excluded layer patterns.
    +     * 
          * @param text - layer name to be compared with
          * @param excludes - compare the layer name with the excludes list.
          * @return true if the text containing layer name to be excluded.
    @@ -502,13 +443,12 @@
             }
             return false;
         }
    -    
    -    
    +
         /**
          * To Validate the parameters passed.
          */
         protected void validateParameter() {
    -        
    +
             if (getSBSInput() == null) {
                 throw new BuildException("'sbsInputName' is not defined");
             }
    @@ -521,39 +461,42 @@
             if (getOutputLog() == null) {
                 throw new BuildException("'OutputLog' must be set");
             }
    -        
    +
         }
    -    
    +
         /**
          * To get the SBS command line parameters.
    +     * 
          * @return
          */
         protected String getSBSCmdLine() {
    -        
    -        List  filteredLayers = getFilteredLayers();
    -        
    +
    +        List filteredLayers = getFilteredLayers();
    +
             Object refObject = getProject().getReferences().get(sbsInputName);
             if (refObject == null) {
                 throw new BuildException("invalid sbs input reference: " + sbsInputName);
             }
    -        if ( refObject != null && ! (refObject instanceof SBSInput)) {
    +        if (refObject != null && !(refObject instanceof SBSInput)) {
                 throw new BuildException("sbs input name " + sbsInputName + "is not valid");
             }
    -        SBSInput sbsInput = (SBSInput)refObject;
    +        SBSInput sbsInput = (SBSInput) refObject;
             StringBuffer cmdOptions = new StringBuffer();
             VariableSet sbsOptions = sbsInput.getFullSBSOptions();
             cmdOptions.append(" -s " + sysDefFile);
    -        Collection variableList = sbsOptions.getVariables(); 
    -        if (sbsOptions != null ) {
    -           if (variableList.isEmpty()) {
    -               throw new BuildException("sbsoptions cannot be empty for input: " + sbsInputName);
    -           }
    +        Collection variableList = sbsOptions.getVariables();
    +        if (sbsOptions != null) {
    +            if (variableList.isEmpty()) {
    +                throw new BuildException("sbsoptions cannot be empty for input: " + sbsInputName);
    +            }
             }
             cmdOptions.append(" --logfile " + getOutputLog().getAbsolutePath());
             for (MappedVariable variable : variableList) {
                 if (variable.getParameter().startsWith("--logfile")) {
    -                this.log("The following command line argument will be ignored: " + variable.getParameter(), Project.MSG_WARN);
    -            } else {
    +                this.log("The following command line argument will be ignored: "
    +                    + variable.getParameter(), Project.MSG_WARN);
    +            }
    +            else {
                     cmdOptions.append(" " + variable.getParameter());
                 }
             }
    @@ -565,7 +508,7 @@
                 if (ppThreads != null) {
                     cmdOptions.append(" -j " + ppThreads);
                 }
    -            variableList = sbsMakeOptions.getVariables(); 
    +            variableList = sbsMakeOptions.getVariables();
                 for (MappedVariable variable : variableList) {
                     cmdOptions.append(" --mo=");
                     cmdOptions.append(variable.getParameter());
    @@ -575,14 +518,15 @@
                 if (filteredLayers.isEmpty()) {
                     log("Warning: No matching layers to build from system definition file, skipped");
                     return null;
    -            } else {
    +            }
    +            else {
                     for (String layer : filteredLayers) {
                         cmdOptions.append(" -l " + layer);
                     }
                 }
             }
             return cmdOptions.toString();
    -        
    +
         }
    -    
    +
     }
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSBuild.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSBuild.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSBuild.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -17,13 +17,13 @@
      
     package com.nokia.helium.sbs.ant.types;
     
    -import org.apache.tools.ant.types.DataType;
    -import org.apache.tools.ant.BuildException;
    -import java.util.Vector;
    +import java.util.ArrayList;
     import java.util.List;
    -import java.util.ArrayList;
    +import java.util.Vector;
    +
    +import org.apache.tools.ant.BuildException;
    +import org.apache.tools.ant.types.DataType;
     import org.apache.tools.ant.types.Reference;
    -import org.apache.log4j.Logger;
     
     
     /**
    @@ -49,15 +49,9 @@
      */
     public class SBSBuild extends DataType
     {
    -    private static Logger log = Logger.getLogger(SBSBuild.class);
    -
         private String name;
     
         private Vector sbsInputList = new Vector();
    -
    -
    -    public SBSBuild() {
    -    }
         
         /**
          * Set the name of the variable.
    @@ -99,7 +93,6 @@
                 try {
                     sbsInputObject = refId.getReferencedObject();
                 } catch ( BuildException ex) {
    -                //log.info("Reference id of sbsinput list is not valid");
                     throw new BuildException("Reference id (" + refId.getRefId() + ") of sbsinput list is not valid");
                 }
                 if (sbsInputObject != null && sbsInputObject instanceof SBSInput) {
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSInput.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSInput.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSInput.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,87 +1,87 @@
     /*
    -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    -* All rights reserved.
    -* This component and the accompanying materials are made available
    -* under the terms of the License "Eclipse Public License v1.0"
    -* which accompanies this distribution, and is available
    -* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    -*
    -* Initial Contributors:
    -* Nokia Corporation - initial contribution.
    -*
    -* Contributors:
    -*
    -* Description: 
    -*
    -*/
    - 
    + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
    + * All rights reserved.
    + * This component and the accompanying materials are made available
    + * under the terms of the License "Eclipse Public License v1.0"
    + * which accompanies this distribution, and is available
    + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    + *
    + * Initial Contributors:
    + * Nokia Corporation - initial contribution.
    + *
    + * Contributors:
    + *
    + * Description: 
    + *
    + */
    +
     package com.nokia.helium.sbs.ant.types;
     
    -import com.nokia.helium.core.ant.types.VariableSet;
    -import com.nokia.helium.core.ant.MappedVariable;
    -import com.nokia.helium.core.ant.VariableMap;
     import java.util.Collection;
    -import org.apache.tools.ant.BuildException;
     import java.util.Vector;
     
    +import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.types.DataType;
     import org.apache.tools.ant.types.Reference;
     
    +import com.nokia.helium.core.ant.MappedVariable;
    +import com.nokia.helium.core.ant.VariableMap;
    +import com.nokia.helium.core.ant.types.VariableSet;
    +
     /**
    - * Helper class to store the variable set (list of variables
    - * with name / value pair)
    - *
    - *   <hlm:sbsinput id="export-sbs-ec">
    - *       <sbsoptions refid="exportSBS" />
    - *       <sbsmakeoptions refid="exportSBSEC" />
    - *   </hlm:sbsinput>
    + * Helper class to store the variable set (list of variables with name / value pair)
    + * 
    + * <hlm:sbsinput id="export-sbs-ec"> <sbsoptions refid="exportSBS"
    + * /> <sbsmakeoptions refid="exportSBSEC" /> </hlm:sbsinput>
      * 
      * @ant.type name="sbsinput" category="SBS"
      */
     public class SBSInput extends DataType implements VariableMap {
    -    
    +
         private Vector sbsOptions = new Vector();
         private Vector sbsMakeOptions = new Vector();
         private Vector sbsInputList = new Vector();
     
         /**
    -     * Creates an empty variable element and adds 
    -     * it to the variables list
    +     * Creates an empty variable element and adds it to the variables list
    +     * 
          * @return empty Variable pair
          */
         public VariableSet createSBSOptions() {
             SBSInput sbsInput = new SBSInput();
    -        VariableSet varSet =  new VariableSet();
    +        VariableSet varSet = new VariableSet();
             sbsInput.addSBSOptions(varSet);
             sbsInputList.add(sbsInput);
             return varSet;
         }
     
         /**
    -     * Adds sbs options to variableset. Called by ant
    -     * whenever the varSet is added to current sbs options. 
    +     * Adds sbs options to variableset. Called by ant whenever the varSet is added to current sbs
    +     * options.
    +     * 
          * @param varSet, variable set to be added to current sbs options.
          */
         public void addSBSOptions(VariableSet varSet) {
             sbsOptions.add(varSet);
         }
    -    
    +
         /**
    -     * Creates an empty sbs make options and add it
    -     * sbs make options list
    +     * Creates an empty sbs make options and add it sbs make options list
    +     * 
          * @return empty Variable pair
          */
         public VariableSet createSBSMakeOptions() {
             SBSInput sbsInput = new SBSInput();
    -        SBSMakeOptions varSet =  new SBSMakeOptions();
    +        SBSMakeOptions varSet = new SBSMakeOptions();
             sbsInput.addSBSMakeOptions(varSet);
             sbsInputList.add(sbsInput);
             return varSet;
         }
     
         /**
    -     * Adds sbs make options to variableset. Called by ant
    -     * whenever the make option is added to current sbs options. 
    +     * Adds sbs make options to variableset. Called by ant whenever the make option is added to
    +     * current sbs options.
    +     * 
          * @param varSet, variable set to be added to current sbs options.
          */
         public void addSBSMakeOptions(SBSMakeOptions varSet) {
    @@ -89,8 +89,9 @@
         }
     
         /**
    -     * Creates a new sbsinput type for the current, and the created
    -     * sbs input is only containing refid of sbs options / sbs makeoptions.
    +     * Creates a new sbsinput type for the current, and the created sbs input is only containing
    +     * refid of sbs options / sbs makeoptions.
    +     * 
          * @return empty sbsinput type.
          */
         public SBSInput createSBSInput() {
    @@ -100,8 +101,8 @@
         }
     
         /**
    -     * Helper function to provide the sbs options associated with this
    -     * sbsinput.
    +     * Helper function to provide the sbs options associated with this sbsinput.
    +     * 
          * @return sbs options associated with this sbs input.
          */
         public Vector getSBSOptions() {
    @@ -109,8 +110,8 @@
         }
     
         /**
    -     * Helper function to provide the sbs make options associated with this
    -     * sbsinput.
    +     * Helper function to provide the sbs make options associated with this sbsinput.
    +     * 
          * @return sbs make options associated with this sbs input.
          */
         public Vector getSBSMakeOptions() {
    @@ -118,8 +119,7 @@
         }
     
         /**
    -     * Internal function to validate the sbsinput and throw exception
    -     * if the input is not valid.
    +     * Internal function to validate the sbsinput and throw exception if the input is not valid.
          */
         private void validateInput() {
             if (getRefid() != null && (!sbsMakeOptions.isEmpty() || !sbsOptions.isEmpty())) {
    @@ -128,9 +128,9 @@
         }
     
         /**
    -     * Internal function to recursively gothrough the sbs options refered by
    -     * this sbsinput and provides the complete list of variables associated with
    -     * this input.
    +     * Internal function to recursively gothrough the sbs options refered by this sbsinput and
    +     * provides the complete list of variables associated with this input.
    +     * 
          * @return collection of variableset associatied with this sbsinput.
          */
         private Vector getSBSOptions(SBSInput sbsInput) {
    @@ -141,13 +141,15 @@
             if (refId != null) {
                 try {
                     sbsInputObject = refId.getReferencedObject();
    -            } catch ( BuildException ex) {
    -                //log.info("Reference id of sbsinput list is not valid");
    -                throw new BuildException("Reference id (" + refId.getRefId() + ") of sbsinput list is not valid");
    +            }
    +            catch (BuildException ex) {
    +                // log.info("Reference id of sbsinput list is not valid");
    +                throw new BuildException("Reference id (" + refId.getRefId()
    +                    + ") of sbsinput list is not valid");
                 }
                 if (sbsInputObject != null && sbsInputObject instanceof SBSInput) {
    -                VariableSet options = ((SBSInput)sbsInputObject).getFullSBSOptions();
    -                if (options != null ) {
    +                VariableSet options = ((SBSInput) sbsInputObject).getFullSBSOptions();
    +                if (options != null) {
                         if (fullList == null) {
                             fullList = new Vector();
                         }
    @@ -156,7 +158,7 @@
                 }
             }
             Vector optionsList = sbsInput.getSBSOptions();
    -        if (optionsList != null ) {
    +        if (optionsList != null) {
                 if (fullList == null) {
                     fullList = new Vector();
                 }
    @@ -166,9 +168,9 @@
         }
     
         /**
    -     * Internal function to recursively gothrough the sbs make options refered by
    -     * this sbsinput and provides the complete list of sbs make options associated 
    -     * with this input.
    +     * Internal function to recursively gothrough the sbs make options refered by this sbsinput and
    +     * provides the complete list of sbs make options associated with this input.
    +     * 
          * @return collection of sbs make options associatied with this sbsinput.
          */
         private Vector getSBSMakeOptions(SBSInput sbsInput) {
    @@ -178,12 +180,14 @@
             if (refId != null) {
                 try {
                     sbsInputObject = refId.getReferencedObject();
    -            } catch ( BuildException ex) {
    -               throw new BuildException("Reference id (" + refId.getRefId() + ") of sbsinput list is not valid");
    +            }
    +            catch (BuildException ex) {
    +                throw new BuildException("Reference id (" + refId.getRefId()
    +                    + ") of sbsinput list is not valid");
                 }
                 if (sbsInputObject != null && sbsInputObject instanceof SBSInput) {
    -                SBSMakeOptions options = ((SBSInput)sbsInputObject).getFullSBSMakeOptions(); 
    -                if (options != null ) {
    +                SBSMakeOptions options = ((SBSInput) sbsInputObject).getFullSBSMakeOptions();
    +                if (options != null) {
                         if (sbsMakeOptionsList == null) {
                             sbsMakeOptionsList = new Vector();
                         }
    @@ -202,9 +206,9 @@
         }
     
         /**
    -     * Internal function to recursively gothrough the sbs make options refered by
    -     * this sbsinput and provides the complete list of sbs make options associated 
    -     * with this input.
    +     * Internal function to recursively gothrough the sbs make options refered by this sbsinput and
    +     * provides the complete list of sbs make options associated with this input.
    +     * 
          * @return collection of sbs make options associatied with this sbsinput.
          */
         public VariableSet getFullSBSOptions() {
    @@ -212,7 +216,7 @@
             VariableSet resultSet = null;
             Vector currentOptions = getSBSOptions(this);
             if (currentOptions != null && !currentOptions.isEmpty()) {
    -            if (fullList == null ) {
    +            if (fullList == null) {
                     fullList = new Vector();
                 }
                 fullList.addAll(currentOptions);
    @@ -220,7 +224,7 @@
             for (SBSInput sbsInput : sbsInputList) {
                 Vector options = getSBSOptions(sbsInput);
                 if (options != null && !options.isEmpty()) {
    -                if (fullList == null ) {
    +                if (fullList == null) {
                         fullList = new Vector();
                     }
                     fullList.addAll(options);
    @@ -240,9 +244,9 @@
         }
     
         /**
    -     * Internal function to recursively gothrough the sbs make options refered by
    -     * this sbsinput and provides the complete list of sbs make options associated 
    -     * with this input.
    +     * Internal function to recursively gothrough the sbs make options refered by this sbsinput and
    +     * provides the complete list of sbs make options associated with this input.
    +     * 
          * @return collection of sbs make options associatied with this sbsinput.
          */
         public SBSMakeOptions getFullSBSMakeOptions() {
    @@ -250,7 +254,7 @@
             SBSMakeOptions resultSet = null;
             Vector currentOptions = getSBSMakeOptions(this);
             if (currentOptions != null && !currentOptions.isEmpty()) {
    -            if (sbsMakeOptionsList == null ) {
    +            if (sbsMakeOptionsList == null) {
                     sbsMakeOptionsList = new Vector();
                 }
                 sbsMakeOptionsList.addAll(currentOptions);
    @@ -258,13 +262,13 @@
             for (SBSInput sbsInput : sbsInputList) {
                 Vector options = getSBSMakeOptions(sbsInput);
                 if (options != null && !options.isEmpty()) {
    -                if (sbsMakeOptionsList == null ) {
    +                if (sbsMakeOptionsList == null) {
                         sbsMakeOptionsList = new Vector();
                     }
                     sbsMakeOptionsList.addAll(options);
                 }
             }
    -        if (sbsMakeOptionsList != null ) {
    +        if (sbsMakeOptionsList != null) {
                 String engine = null;
                 String ppThreads = null;
                 for (SBSMakeOptions varSet : sbsMakeOptionsList) {
    @@ -273,17 +277,19 @@
                     if (currentEngine != null) {
                         if (engine == null) {
                             engine = currentEngine;
    -                        if (resultSet == null ) {
    +                        if (resultSet == null) {
                                 resultSet = new SBSMakeOptions();
                             }
                             resultSet.setEngine(currentEngine);
    -                    } else {
    -                        if (!engine.equals(currentEngine) ) {
    -                            throw new BuildException("inheriting engine types mismatch: " + engine + " != " + currentEngine);
    +                    }
    +                    else {
    +                        if (!engine.equals(currentEngine)) {
    +                            throw new BuildException("inheriting engine types mismatch: " + engine
    +                                + " != " + currentEngine);
                             }
                         }
                     }
    -                if (resultSet == null ) {
    +                if (resultSet == null) {
                         resultSet = new SBSMakeOptions();
                     }
                     if (ppThreads == null && currentThread != null) {
    @@ -297,14 +303,15 @@
             }
             return resultSet;
         }
    -    
    +
         /**
          * Helper function to return the collection of variabes associated with this
    +     * 
          * @return collection of sbs options associatied with this sbsinput.
          */
         public Collection getVariables() {
             Collection varList = null;
    -        VariableSet  options = getFullSBSOptions();
    +        VariableSet options = getFullSBSOptions();
             if (options != null) {
                 varList = options.getVariables();
             }
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSMakeOptions.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSMakeOptions.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/ant/types/SBSMakeOptions.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -17,10 +17,12 @@
      
     package com.nokia.helium.sbs.ant.types;
     
    -import com.nokia.helium.core.ant.types.VariableSet;
    +import java.util.List;
    +
    +import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.types.Reference;
    -import org.apache.tools.ant.BuildException;
    -import java.util.List;
    +
    +import com.nokia.helium.core.ant.types.VariableSet;
     
     /**
      * Helper class to store the variable set (list of variables
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/plexus/SBSErrorStreamConsumer.java
    --- a/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/plexus/SBSErrorStreamConsumer.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/src/com/nokia/helium/sbs/plexus/SBSErrorStreamConsumer.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -16,14 +16,15 @@
     */
     package com.nokia.helium.sbs.plexus;
     
    +import java.io.BufferedWriter;
     import java.io.File;
     import java.io.FileNotFoundException;
     import java.io.IOException;
    -import java.io.BufferedWriter;
     import java.util.regex.Matcher;
     import java.util.regex.Pattern;
     
     import org.apache.log4j.Logger;
    +
     import com.nokia.helium.core.plexus.FileStreamConsumer;
     
     /**
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sbs/tests/antunit/sbs_default_config.ant.xml
    --- a/buildframework/helium/sf/java/sbs/tests/antunit/sbs_default_config.ant.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sbs/tests/antunit/sbs_default_config.ant.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -37,8 +37,11 @@
         
         
         
    +        
    +    
    +    
    +    
             
    -        
         
         
         
             
                 
    -                
    +                
                 
             
    +         
    +        
             
    +
    +    	
    +        
    +            
    +                
    +            
    +        
    +         
    +        
    +        
         
     
         
    @@ -354,6 +385,8 @@
             
         
     
    +	
    +	
         
    +
    +    Helium Antlib Signal unittests.
    +    
    +    
    +    
    +    
    +
    +    
    +    
    +        
    +            Signal: ${signal.name}
    +        
    +    
    +
    +    
    +        
    +                
    +        
    +    
    +
    +    
    +        
    +    
    +    
    +    
    +        
    +    
    +
    +    
    +    
    +        
    +        
    +    
    +
    +    
    +    
    +        
    +        
    +    
    +
    +    
    +        Signal: ${signal.name}
    +    
    +
    +    
    +        
    +            
    +                
    +            
    +        
    +        
    +    
    +
    +    
    +        
    +            
    +                
    +            
    +        
    +        
    +    
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/signaling/tests/antunit/test_signalexception_config.ant.xml
    --- a/buildframework/helium/sf/java/signaling/tests/antunit/test_signalexception_config.ant.xml	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/signaling/tests/antunit/test_signalexception_config.ant.xml	Mon Sep 13 13:11:19 2010 +0800
    @@ -29,7 +29,7 @@
                 
             
             
    -        
    +        
         
        
         
    @@ -37,7 +37,7 @@
                 
             
             
    -        
    +        
         
        
     
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/signaling/tests/build.bat
    --- a/buildframework/helium/sf/java/signaling/tests/build.bat	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/signaling/tests/build.bat	Mon Sep 13 13:11:19 2010 +0800
    @@ -21,7 +21,7 @@
     set TESTED_JAVA=C:\Apps\j2sdk_1.6.0_02
     ) ELSE  set TESTED_JAVA=%JAVA_6_HOME%
     if exist %TESTED_JAVA% (set JAVA_HOME=%TESTED_JAVA%)
    -call ant -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -Dskip.diamonds=true %*
    +call ant -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -Ddiamonds.enabled=false %*
     if "%ERRORLEVEL%" neq "0" (goto error)
     endlocal
     goto :eof
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/signaling/tests/src/com/nokia/helium/signaling/tests/TestEmailSender.java
    --- a/buildframework/helium/sf/java/signaling/tests/src/com/nokia/helium/signaling/tests/TestEmailSender.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/signaling/tests/src/com/nokia/helium/signaling/tests/TestEmailSender.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -17,12 +17,16 @@
     
     package com.nokia.helium.signaling.tests;
     
    -import org.junit.*;
    -import static org.junit.Assert.*;
    -import java.io.*;
    -import java.util.*;
    -import com.nokia.helium.signal.ant.types.*;
    +import java.io.File;
    +
     import org.apache.tools.ant.Project;
    +import org.junit.After;
    +import org.junit.Before;
    +import org.junit.Test;
    +
    +import com.nokia.helium.signal.ant.types.EMAILNotifier;
    +import com.nokia.helium.signal.ant.types.NotifierInput;
    +import com.nokia.helium.signal.ant.types.NotifyWhenEnum;
     
     public class TestEmailSender {
         
    @@ -38,12 +42,12 @@
          * @throws Exception
          */
         @Test
    -    public void test_simpleMergeNode() throws Exception {
    +    public void test_simpleEmailNotification() throws Exception {
             EMAILNotifier en = new EMAILNotifier();
             Project p = new Project();
             p.setNewProperty("user.name", "test");
             en.setProject(p);
    -        en.setNotifyWhen("always");
    +        en.setNotifyWhen((NotifyWhenEnum)NotifyWhenEnum.getInstance(NotifyWhenEnum.class, "always"));
             en.setTitle("test");
             en.setSmtp("test");
             en.setLdap("test");
    @@ -52,6 +56,22 @@
             en.sendData("test", true, input, "Test Message");
         }
     
    -   
    +    /**
    +     * This test should not fail the build, when no log are found, or default template 
    +     * is missing just skip the notification and log an error.
    +     * @throws Exception
    +     */
    +    public void test_emailNotificationWithoutNotifyFileAndTemplate() throws Exception {
    +        EMAILNotifier en = new EMAILNotifier();
    +        Project p = new Project();
    +        p.setNewProperty("user.name", "test");
    +        en.setProject(p);
    +        en.setNotifyWhen((NotifyWhenEnum)NotifyWhenEnum.getInstance(NotifyWhenEnum.class, "always"));
    +        en.setTitle("test");
    +        en.setSmtp("test");
    +        en.setLdap("test");
    +        NotifierInput input = new NotifierInput();
    +        en.sendData("test", true, input, "Test Message");
    +    }   
     
     }
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/synergy/src/com/nokia/helium/synergy/ant/taskdefs/AbstractScmBaseTask.java
    --- a/buildframework/helium/sf/java/synergy/src/com/nokia/helium/synergy/ant/taskdefs/AbstractScmBaseTask.java	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/synergy/src/com/nokia/helium/synergy/ant/taskdefs/AbstractScmBaseTask.java	Mon Sep 13 13:11:19 2010 +0800
    @@ -16,11 +16,11 @@
      */
     package com.nokia.helium.synergy.ant.taskdefs;
     
    +import java.io.File;
    +import java.io.IOException;
     import java.lang.reflect.Field;
     import java.util.ArrayList;
     import java.util.List;
    -import java.io.File;
    -import java.io.IOException;
     
     import org.apache.tools.ant.BuildException;
     import org.apache.tools.ant.Project;
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filter-module.xsl
    --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filter-module.xsl	Mon Sep 06 09:57:24 2010 +0100
    +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    @@ -1,123 +0,0 @@
    -
    -
    -
    -	
    -
    -
    -
    -
    -
    -
    -	
    -		
    -		
    -			
    -				
    -			
    -			
    -				
    -			
    -		
    -		
    -			
    -				x
    -			
    -		
    -		hide
    -	
    -
    -
    -
    -
    -
    -
    -	
    -		
    -			
    -				
    -			
    -			
    -				
    -			
    -		
    -		
    -			
    -				
    -				
    -					 
    -					x 
    -					x 
    -				
    -			
    -		
    -		hide
    -	
    -
    -
    -
    -	
    -		
    -			
    -				
    -			
    -			
    -				
    -			
    -		
    -		
    -			
    -				x 
    -			
    -		
    -		hide
    -	
    -
    -
    -
    -
    - 
    -	
    -	
    -		
    -		
    -				
    -		
    -		
    -				
    -		
    -	
    -
    -
    -
    -	
    -	
    -		
    -			
    -			
    -				
    -			
    -		
    -		
    -			
    -		
    -	
    -
    -
    - 
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filtering.bat
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filtering.bat	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,21 @@
    +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
    +@rem All rights reserved.
    +@rem This component and the accompanying materials are made available
    +@rem under the terms of the License "Eclipse Public License v1.0"
    +@rem which accompanies this distribution, and is available
    +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
    +@rem
    +@rem Initial Contributors:
    +@rem Nokia Corporation - initial contribution.
    +@rem
    +@rem Contributors:
    +@rem
    +@rem Description: 
    +@rem
    +@setlocal
    +@if .%1==. goto use
    +@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %* 
    +@goto end
    +:use
    +@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0"
    +:end
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filtering.xsl
    --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filtering.xsl	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/filtering.xsl	Mon Sep 13 13:11:19 2010 +0800
    @@ -3,7 +3,7 @@
     
    +
    +
    +
    +
    +
     
     
    -only 
    +only
    +
    +		"with" =  components/units that have the opposite filter are
    +			removed. This covers the old symbian.com case of
    +			java, !java and "don't care" components. In other words
    +			we have a global feature that every item can be built
    +			only when the feature is set, only when the feature is
    +			not set, or it does not care and will always be built.
    +			So for a !java build only items containing filter="java"
    +			are stripped out. For a java build, only items with
    +			filter="!java" are stripped out. Anything which does not
    +			explicitly mention java are always unaffected. Opposite
    +			filters will generate sets which overlap.
    +-->
    +
     
    - 
    + 
    +
    + 
     
    + 
    +
    + 
     
     
     
    @@ -38,8 +92,8 @@
     			
     		
     	 
    -	 
    -	  
    +	  
    +		
     		
     			
     			
    @@ -95,7 +149,7 @@
     
     
     
    -
    +
     
     
     
    + 
    +
    + 	
    +
    +
    +		
    +	
    +
    +package
    +	
    +
    + 
    +
    +  
    +
    +
    +	
    +		
    +		 
    +	
    +
    +
    + 
    +	
    +	hide
    +
    +
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,19 @@
    +#!/bin/bash
    +# Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
    +# All rights reserved.
    +# This component and the accompanying materials are made available
    +# under the terms of "Eclipse Public License v1.0"
    +# which accompanies this distribution, and is available
    +# at the URL "http://www.eclipse.org/legal/epl-v10.html".
    +#
    +# Initial Contributors:
    +# Nokia Corporation - initial contribution.
    +#
    +# Contributors:
    +#
    +# Description:
    +#
    +# find out the directory of the script file
    +SCRIPT=$(readlink -f $0)
    +SCRIPT_DIR=$(dirname $SCRIPT)
    +python $SCRIPT_DIR/joinsysdef_mock.py $*
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef-module.xsl
    --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef-module.xsl	Mon Sep 06 09:57:24 2010 +0100
    +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    @@ -1,511 +0,0 @@
    -
    - 
    -
    -	
    - http://www.symbian.org/system-definition
    - 
    -
    -
    -
    -	ERROR: Cannot process this document
    -
    -
    -
    -
    -	
    -	
    -	
    -	
    -	
    -	
    -			
    -			 
    -						
    -										
    -					
    -					
    -				
    -					ERROR: Linked ID "" () must match linking document "" ()
    -				
    -				
    -				
    -					
    -					
    -						 
    -						 
    -							Cannot set "", already set
    -						
    -						
    -							
    -							
    -								
    -							
    -						 
    -						 
    -					
    -				
    -				 
    -			 	
    -					
    -				
    -													
    -					
    -						
    -						
    -						
    -						
    -					
    -				
    -				 
    -					
    -				
    -			 	
    -					
    -				
    -				
    -			
    -		
    -		 
    -			
    -			
    -				
    -				
    -					
    -						
    -					
    -				
    -			
    -			
    -			
    -				
    -				 
    -					
    -						
    -					
    -				
    -				 
    -				
    -					
    -					
    -					
    -					
    -				
    -			
    -		
    -		 
    -			
    -			
    -				
    -				
    -					
    -					
    -					
    -					
    -				
    -			
    -		
    -	
    -
    -
    - 
    -
    -	
    -	
    -		
    -		
    -			
    -		
    -				
    -
    -
    -
    -	
    -	
    -	
    -	
    -		 
    -		 
    -		
    -		
    -			
    -						
    -							
    -							
    -							
    -						
    -			
    -		
    -		
    -			
    -			
    -				
    -			
    -		
    -		
    -			
    -				
    -				
    -			
    -		
    -	
    -
    -
    -
    -	
    -	
    -	
    -	
    -	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
    -	
    -	
    -		
    -			
    -		
    -		
    -			ERROR: Cannot create namespace prefix for downstream default namespace in 
    -		
    -		
    -		
    -			
    -				
    -			
    -		
    -		
    -			
    -		
    -	
    -
    -
    -
    -	
    -	 
    -	 	
    -			
    -		
    -	 
    -	 
    -	  	 
    -		
    -			
    -				
    -				
    -			
    -		
    -	
    -
    -
    -
    -
    -	 
    -	 	
    -			
    -		
    -	 
    -	 
    -	 	
    -		 
    -			
    -			
    -		
    -	
    -
    -
    -
    -
    -	
    -	
    -	
    -	
    -	 
    -	 
    -	 	
    -			
    -		
    -	 
    -	 
    -	  
    -	 
    -		 
    -		 	
    -				
    -			
    -		 
    -		 	 
    -		 
    -		 
    -			
    -				
    -			
    -			
    -				 
    -				
    -			
    -		 	
    -				
    -						
    -			
    -				
    -					
    -					
    -						
    -						
    -						
    -						
    -							
    -								
    -								
    -												
    -						
    -						
    -								/
    -								
    -							
    -						
    -					 
    -				
    -				
    -					
    -						
    -							
    -							
    -							
    -							
    -						
    -					
    -					 
    -						
    -					
    -				 	
    -						
    -					
    -					
    -				
    -			
    -		
    -	
    -
    -
    -
    -
    -
    -
    -
    -	
    -
    -
    -	
    -	
    -		
    -			
    -			
    -			
    -		
    -
    -
    -
    - 
    -
    - 
    -	
    -		
    -			
    -		
    -		
    -			
    -		
    -		
    -			
    -		
    -	
    -
    -
    -
    - 
    -	
    -		
    -			
    -		
    -		
    -			
    -		
    -	
    -
    -
    -
    -
    -	/
    -
    -
    -
    -
    -
    -	
    -	
    -	
    -		
    -	
    -	
    -		ERROR: Could not find namespace for  "" in 
    -		
    
    -		
    -	
    -	
    -	
    -	
    -		 
    -		
    -			
    -			
    -		
    -		  
    -					
    -			
    -		
    -		
    -		ERROR: Joining error in resolving namespace for  "" in 
    -		
    
    -		
    -	
    -		
    -	
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - 
    -        
    -                
    -                
    -	                
    -	              
    -        
    -                
    -                
    -        
    -        
    -
    -
    - 
    -        
    -        
    -	        
    -	                
    -	        
    -	        /
    -	        
    -	       
    -	      
    - 
    -
    -
    -	
    -    	
    -			
    -		    	
    -		    
    -		
    -	
    -
    -
    -
    -	
    -		
    -			../
    -			
    -        		
    -			
    -		
    -									
    -			
    -        		
    -			        
    -			                
    -			        
    -			        /
    -					
    -				
    -			
    -		
    -		
    -	
    - 
    -
    -
    -		
    -		
    -			
    -        		
    -			
    -		
    -		
    -			
    -        		
    -	                
    -			        /
    -					
    -				
    -			
    -		
    -		
    -	
    - 
    -
    -
    -
    -
    -  
    -  
    -  
    - 
    -
    -  
    -
    -
    -
    -
    -
    -	
    -		 
    -		
    -			
    -				
    -				 
    -			
    -			
    -				 
    -			
    -			
    -				
    -			
    -		
    -	
    -
    -
    -
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.bat
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.bat	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,16 @@
    +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
    +@rem All rights reserved.
    +@rem This component and the accompanying materials are made available
    +@rem under the terms of the License "Eclipse Public License v1.0"
    +@rem which accompanies this distribution, and is available
    +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
    +@rem
    +@rem Initial Contributors:
    +@rem Nokia Corporation - initial contribution.
    +@rem
    +@rem Contributors:
    +@rem
    +@rem Description: 
    +@rem
    +@setlocal
    +@python %~dp0joinsysdef_mock.py %*
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.xsl
    --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.xsl	Mon Sep 06 09:57:24 2010 +0100
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.xsl	Mon Sep 13 13:11:19 2010 +0800
    @@ -1,9 +1,9 @@
     
    -
    + 
     
      	
    +
    +
     
     /os/deviceplatformrelease/foundation_system/system_model/system_definition.xml
    +
     
     
     	
    @@ -29,8 +38,9 @@
     
     
     
    + 
     
     
    -
    +
     
     
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef_mock.py
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef_mock.py	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,34 @@
    +#============================================================================ 
    +#Name        : joinsysdef_mock.py 
    +#Part of     : Helium 
    +
    +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
    +#All rights reserved.
    +#This component and the accompanying materials are made available
    +#under the terms of the License "Eclipse Public License v1.0"
    +#which accompanies this distribution, and is available
    +#at the URL "http://www.eclipse.org/legal/epl-v10.html".
    +#
    +#Initial Contributors:
    +#Nokia Corporation - initial contribution.
    +#
    +#Contributors:
    +#
    +#Description:
    +#===============================================================================
    +
    +import sys
    +import shutil
    +
    +print "Command run:"
    +print " ".join(sys.argv)
    +
    +includes = []
    +if '-config' in sys.argv:
    +    config = sys.argv[sys.argv.index('-config') + 1]
    +    src = sys.argv[-1]
    +    
    +    if '-output' in sys.argv:
    +        dst = sys.argv[sys.argv.index('-output') + 1]
    +        shutil.copyfile(src, dst)
    +    
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/filter-module.xsl
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/filter-module.xsl	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,123 @@
    +
    +
    +
    +	
    +
    +
    +
    +
    +
    +
    +	
    +		
    +		
    +			
    +				
    +			
    +			
    +				
    +			
    +		
    +		
    +			
    +				x
    +			
    +		
    +		hide
    +	
    +
    +
    +
    +
    +
    +
    +	
    +		
    +			
    +				
    +			
    +			
    +				
    +			
    +		
    +		
    +			
    +				
    +				
    +					 
    +					x 
    +					x 
    +				
    +			
    +		
    +		hide
    +	
    +
    +
    +
    +	
    +		
    +			
    +				
    +			
    +			
    +				
    +			
    +		
    +		
    +			
    +				x 
    +			
    +		
    +		hide
    +	
    +
    +
    +
    +
    + 
    +	
    +	
    +		
    +		
    +				
    +		
    +		
    +				
    +		
    +	
    +
    +
    +
    +	
    +	
    +		
    +			
    +			
    +				
    +			
    +		
    +		
    +			
    +		
    +	
    +
    +
    + 
    \ No newline at end of file
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/joinsysdef-module.xsl
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/joinsysdef-module.xsl	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,525 @@
    +
    + 
    +
    +	
    + http://www.symbian.org/system-definition
    + 
    +
    +
    +
    +	
    +	ERROR: Cannot process this document ()
    +		
    +			. Unrecognised syntax schema=""
    +			. Missing schema
    +			. Invalid file type: 
    +		
    +	
    +
    +
    +
    +
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +			
    +			 
    +						
    +										
    +					
    +					
    +				
    +					ERROR: Linked ID "" () must match linking document "" ()
    +				
    +				
    +				
    +					
    +					
    +						 
    +						 
    +							Note: Cannot set "", already set on . Ignoring linked value
    +						
    +						
    +							
    +							
    +								
    +							
    +						 
    +						 
    +					
    +				
    +				 
    +			 	
    +					
    +				
    +													
    +					
    +						
    +						
    +						
    +						
    +					
    +				
    +				 
    +					
    +				
    +			 	
    +					
    +				
    +				
    +			
    +		
    +		 
    +			
    +			
    +				
    +				
    +					
    +						
    +					
    +				
    +			
    +			
    +			
    +				
    +				 
    +					
    +						
    +					
    +				
    +				 
    +				
    +					
    +					
    +					
    +					
    +				
    +			
    +		
    +		 
    +			
    +			
    +				
    +				
    +					
    +					
    +					
    +					
    +				
    +			
    +		
    +	
    +
    +
    + 
    +
    +	
    +	
    +	
    +		
    +		
    +			
    +		
    +	
    +	
    +	Note: The link to  from  could not be resolved. Perhaps there's an error in the XML?
    +	
    +
    +
    +
    +	
    +	
    +
    +	
    +		 
    +		 
    +		
    +		
    +			
    +						
    +							
    +							
    +							
    +						
    +			
    +		
    +		
    +			
    +			
    +				
    +			
    +		
    +		
    +			
    +				
    +				
    +			
    +		
    +	
    +
    +
    +
    +	
    +	
    +	
    +	
    +	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
    +	
    +	
    +		
    +			
    +		
    +		
    +			ERROR: Cannot create namespace prefix for downstream default namespace in 
    +		
    +		
    +		
    +			
    +				
    +			
    +		
    +		
    +			
    +		
    +	
    +
    +
    +
    +
    +
    +
    +
    +	
    +
    +
    +
    +
    +			
    +				
    +				
    +				
    +				
    +				
    +				
    +				
    +				
    +			
    +
    +
    +
    +	
    +	
    +	
    +		
    +		
    +			
    +				
    +					
    +				
    +			
    +			
    +				
    +				
    +			
    +		
    +	
    +
    +
    +
    +	
    +	
    +		 
    +			
    +				
    +				
    +			
    +		
    +		
    +				
    +					
    +						
    +						
    +							
    +								
    +							
    +							
    +						
    +						 
    +					
    +				
    +				
    +		
    +	
    +
    +
    +
    +	
    +	 
    +	 	
    +			
    +		
    +	 
    +	 
    +	  	 
    +		
    +			
    +				
    +				
    +			
    +		
    +	
    +
    +
    +
    +
    +	 
    +	 	
    +			
    +		
    +	 
    +	 
    +	 	
    +		 
    +			
    +			
    +		
    +	
    +
    +
    + 
    +
    +
    +
    +	
    +	
    +	
    +	
    +	 
    +	 	
    +			
    +		
    +	 
    +	 
    +	  
    +		 
    +		 	
    +				
    +			
    +		 
    +	 		 
    +		 
    +			
    +				
    +			
    +			
    +				 
    +				
    +			
    +		 	
    +				
    +						
    +			
    +				
    +					
    +					
    +					
    +						
    +						
    +						
    +						
    +							
    +								
    +								
    +									
    +										
    +											
    +											
    +										
    +										
    +											
    +										
    +																	
    +								 
    +												
    +						
    +						
    +							/
    +								
    +							
    +						
    +					 
    +				
    +				
    +					
    +						
    +							
    +							
    +							
    +							
    +						
    +					
    +					 
    +						
    +					
    +				 	
    +						
    +					
    +					
    +				
    +			
    +		
    +	
    +
    +
    +
    +
    +
    +
    +
    +	
    +
    +
    +
    +	
    +	
    +		
    +			
    +			
    +			
    +		
    +
    +
    +
    + 
    +
    + 
    +	
    +		
    +			
    +		
    +		
    +			
    +		
    +		
    +			
    +		
    +	
    +
    +
    +
    + 
    +	
    +		
    +			
    +		
    +		
    +			
    +		
    +	
    +
    +
    +
    +
    +	/
    +
    +
    +
    +
    +
    +	
    +	
    +	
    +		
    +	
    +	
    +		ERROR: Could not find namespace for  "" in 
    +		
    
    +		
    +	
    +	
    +	
    +	
    +		 
    +		
    +			
    +			
    +		
    +		  
    +					
    +			
    +		
    +		
    +		ERROR: Joining error in resolving namespace for  "" in 
    +		
    
    +		
    +	
    +		
    +	
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +  
    +  
    +  
    + 
    +
    +  
    +
    +
    +
    +
    +
    +	
    +		 
    +		
    +			
    +				
    +				 
    +			
    +			
    +				 
    +			
    +			
    +				
    +			
    +		
    +	
    +
    +
    +
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/mergesysdef-module.xsl
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/mergesysdef-module.xsl	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,653 @@
    +
    +
    +	
    +http://www.symbian.org/system-definition
    +
    +
    +	ERROR: Syntax  not supported
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +	
    +
    +
    +
    +
    +
    +
    +	
    +		
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +		
    +		
    +			
    +				
    +					
    +				
    +				
    +					
    +				
    +				
    +					
    +				
    +			
    +		
    +		
    +			
    +				
    +			
    +			
    +				
    +			
    +			
    +				
    +			
    +			
    +				
    +					
    +						
    +					
    +							
    +				
    +			
    +			  
    +			Warning: need definition for namespace "" for 
    +									
    +			
    +				
    +	
    +
    +
    +
    +	 
    +	 
    +	 
    +	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 
    +	
    +	
    +		
    +			
    +		
    +		
    +			ERROR: Cannot create namespace prefix for downstream default namespace in 
    +		
    +		
    +		
    +			
    +				
    +			
    +		
    +		
    +			
    +		
    +	
    +
    +
    +
    +
    +
    +
    +		
    +		
    +	 
    +	
    +	
    + 	
    +		ERROR: Syntax  not supported
    +	
    +	
    +		ERROR: Can only merge system models of the same rank
    +	
    +	 
    +	
    +		
    +			
    +				
    +				
    +			
    +		
    +		 
    +		
    +			 
    +				
    +				
    +				 
    +
    +				
    +				 
    +					
    +							
    +							
    +								 
    +								
    +									
    +									
    +								
    +							
    +							
    +					   
    +				
    +				
    +					  
    +						
    +						
    +						
    +							
    +						
    +				
    +			
    +		
    +
    +		
    +		
    +		
    +		
    +		
    +	
    +	
    +		
    +			
    +		
    +	
    +		
    +			
    +			
    +			
    +			
    +		
    +	
    +	
    +
    +
    +
    +		
    +	
    +	
    +	
    +	
    +		
    +				
    +		
    +			
    +			
    +			
    +			
    +		
    +	
    +
    +
    +
    +
    +
    +
    +	
    +
    +
    +
    +
    +
    +	
    +	
    +		
    +		
    +		
    +			 
    +			
    +		
    +		
    +			
    +			
    +		
    +		
    +			
    +			
    +				
    +				
    +				
    +			
    +			
    +		
    +		 
    +			Note: levels differ "" vs "" on 
    +			
    +		
    +	
    +
    +
    +
    +	
    +	
    +	
    +	
    +	
    +	
    +
    +	
    +		  
    +		  
    +		 
    +		  
    +			 
    +				
    +					
    +					
    +					
    +					
    +					
    +					
    +						
    +			
    +			
    +		 
    +			
    +				
    +				
    +				
    +				
    +				
    +				
    +					
    +		
    +		 		
    +			
    +			 	
    +				
    +					
    +					
    +				
    +						
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +				
    +			
    +		 		
    +		
    +			
    +			
    +			
    +			
    +			
    +			
    +				
    +			
    +		 
    +			
    +				
    +				
    +				
    +				
    +				
    +				
    +			
    +			
    +	
    +
    +
    +
    +	
    +
    +
    +
    +	
    +	
    +	
    +	
    +		
    +			
    +			*
    +		
    +	
    +	
    +		
    +	
    +
    +
    +
    +
    +<---->
    +
    +	=""
    +
    +	
    +	
    +	 rel="Generic"
    +	 type="auto"
    +	>
    +	
    +	
    +
    +
    +
    +
    +		
    +	
    +	
    +	
    +		
    +		
    +	
    +
    +	
    +		  
    +			Note:  "" in "" 
    +				overridden in downstream sysdef
    +				replaced by  "" in ""
    +			
    +			
    +			
    +			
    +				
    +							
    +				
    +					
    +		
    +		
    +			
    +
    +	
    +	 
    +
    +		 		
    +
    +	
    +		
    +			
    +				
    +				
    +				
    +				
    +				
    +			
    +		
    +	
    +		
    +		
    +			
    +				
    +			
    +		
    +	
    +	
    +
    + 	
    +	
    +		
    +		
    +			
    +		
    +	
    +
    +	
    +	
    +		 
    +			
    +		
    +		
    +		
    +			
    +			
    +				
    +			
    +			
    +				
    +			
    +		
    +		
    +		  
    +			
    +		
    +
    +		 
    +			
    +				
    +				
    +			
    +		
    +		
    +		
    +			
    +				
    +								
    +			
    +			
    +
    +				
    +				
    +					
    +				
    +				
    +				
    +				
    +					
    +					
    +					
    +					
    +				
    +				
    +				
    +					
    +						
    +							
    +										
    +							
    +						
    +					
    +				
    +			
    +		
    +	
    +
    +		
    +	
    +	
    +		
    +		
    +		
    +			
    +						
    +			
    +				
    +	
    +
    +
    +
    +
    +
    +	 
    +		
    +	 	
    +	 
    +	
    +	
    +		
    +		
    +			Warning:  "" moved in downstream model. Ignoring moved 
    +				
    
    +			
    +		
    +		
    +			
    +			
    +				
    +					
    +					
    +					
    +				
    +			
    +			
    +				
    +				
    +					Warning: All content in downstream  "" is invalid. Ignoring 
    +						
    
    +					
    +				
    +				
    +					
    +						
    +							
    +							
    +						
    +						
    +					
    +				
    +								
    +		
    +	
    +
    +
    +	
    +
    +
    +
    +
    +	 
    +	 	
    +	
    +	
    +		
    +			
    +		
    +		
    +	
    +	
    +		
    +		
    +	
    +
    +
    +
    +	 
    +		
    +	 	
    +	
    +		
    +		
    +			Warning:  "" moved in downstream model. Ignoring moved 
    +				
    
    +			
    +		
    +		
    +			
    +				
    +					
    +					
    +				
    +				
    +					
    +						
    +					
    +					
    +						
    +					
    +				
    +				
    +					
    +					
    +				
    +			
    +		
    +	
    +
    +
    +
    +
    +		
    +	 	
    +	
    +				
    +					
    +					
    +				
    +	
    +
    +
    +
    +
    +
    +
    +		
    +	 	
    +	
    +		
    +			
    +			
    +		
    +		
    +	
    +
    +
    +
    +
    +		
    +
    +	
    +		
    +			
    +			 
    +				
    +			
    +			 
    +				ERROR: Could not resolve relative path in downstream file:  relative to absolute URI 
    +				
    +			
    +		 
    +			
    +				
    +				
    +			
    +		
    +		
    +	
    +
    +
    diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/modelcheck.xsl
    --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/modelcheck.xsl	Mon Sep 13 13:11:19 2010 +0800
    @@ -0,0 +1,74 @@
    +
    +
    +	
    +	
    +	
    +	 
    +
    +
    +	
    +		Cross-Checking System Model
    +		
    +	
    +	
    +	
    +
    +
    +
    +
    +

    + ()

    +
    + + +

    + Note: + + + ()

    +
    + + +

    + Warning: + + + ()

    +
    + + +

    + Error: + + + ()

    +
    + +
    \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/path-module.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/path-module.xsl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + + + + + + + + + + + + + + ../ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/test-model.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/test-model.xsl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,578 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System Definition: + items + + + + + + + + + + + + Definition: + units + + + + systemModel element should have a name + + + + + + + + + Attribute ="" is not valid for + + + + + + + + + + + + Attribute is deprecated + + + + + Extension attribute ="" in namespace + + + + + + + Should avoid using extension attribute ="" in namespace + + + + + + Attribute ="" not valid in schema . Must use schema 3.0.1 or higher + + + + + + + plugin + doc + tool + config + api + test + + + + mandatory + optional + development + + + other + desktop + device + + + + + lo + hb + mm + ma + pr + vc + se + ui + dc + de + dm + rt + to + ocp + + + + + + + + + + + + + + + + + + + + + Illegal value ="" + + + + value in ="" + + + + + + + + + + + + + + + + + Illegal value ="" + + + + value in ="" + + + + + + + + + + Element "" is not valid in the context of "" + + + + "" has invalid parent "" + + + + + + + + + + + + S60 Component "" has units. + + + Component "" has units. + + + + + + + Component "" is empty. + + + Component "" is empty and has no comment + + + + + + + "" must match ID in linked file "" + + + linked "" cannot be a link + + + + linked "" has duplicate attribute to linking document. Duplicate ignored. + + + + "" cannot have both link and content. Content ignored. + + + + "" must match item in linked file "" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Duplicate ID: "" + + + + Undefined namespace for ID "" + + + + + + + + / + + + + + + path "" should not end in / + + + path "" must use only forward slashes + + + + + + + + + + + + + + + + + // + / + + + + + + / + + + + + + // + + + Unexpected path for -> : "" + + + + + + + + path "" should not end in / + + + path "" must use only forward slashes + + + + + + + + + + + + + + + // + / + + + + + + + + + + + + + + + + + + + + + + + Unexpected path for -> : "" + + + + + + + + Unexpected path for -> : "" + + + Unexpected path for -> : "" + + + Unexpected path for -> : "" + + + + + + + + + + + + + has no match in . + + + + + + + : + + + + + + + + + + + not identical. [|] + + + + + + + + + + + + not identical. [|] + + + + () + + +vp cross-check + + + + + + + + + VP component "" v not in SysDef + + + + + + + Found + Found + + + + + + + + + + + + + +System Build cross-check + + + + + + + + Build item "" not in SysDef + + + + + + Build list "" not defined + + + + + + + + + + + () + () + (? - ) + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/usage.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/lib/usage.xsl Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + usage: + + [>] [params ...] > + + +The input file must be last. Other arguments can be in any order. +Parameters are case-sensitive. Text parameter values must be in single quotes. + + +Arguments can be in any order. +Parameters are case-sensitive. + + +The input file must be last. Other arguments can be in any order. +Parameters are case-sensitive. + + + + + + + + + + + + + + + + + + + + + + -p + + + -param + + + --string-param + + + + + + + + + + Defaults to + '' + "" + "" + + + + + + +Description + + + + + + + + + + + + + + + + + + + + + + + + + + -in + + + <xml> - (required) The input XML file + + + + + + + + + + + + + -o + + + -out + + + -o + + + <file> - (optional) The file to save the output as. If not present it will write to stdout. + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef-module.xsl --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef-module.xsl Mon Sep 06 09:57:24 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,504 +0,0 @@ - - - -http://www.symbian.org/system-definition - - - ERROR: Syntax not supported - - - ERROR: Can only merge stand-alone system models - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning: need definition for namespace "" for - - - - - - - - - - - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - - - - - - - ERROR: Cannot create namespace prefix for downstream default namespace in - - - - - - - - - - - - - - - - - - - - - - - - ERROR: Syntax not supported - - - ERROR: Can only merge stand-alone system models - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Note: levels differ "" vs "" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning: "" moved in downstream model. Ignoring moved - - - - - - - - - - - - - - - Warning: All content in downstream "" is invalid. Ignoring - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning: "" moved in downstream model. Ignoring moved - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef.bat Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,21 @@ +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +@rem All rights reserved. +@rem This component and the accompanying materials are made available +@rem under the terms of the License "Eclipse Public License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@setlocal +@if .%1==. goto use +@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %* -XSLTC +@goto end +:use +@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0" +:end diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef.xsl --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef.xsl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef.xsl Mon Sep 13 13:11:19 2010 +0800 @@ -1,8 +1,8 @@ - + + + + + - mcl/System_Definition_Template.xml + mcl/System_Definition_Template.xml - - - + Syntax not supported - + + Can only merge fragments of the same rank + + + Upstream @@ -33,17 +47,22 @@ + - + Downstream + + Can only merge fragments of the same rank + + @@ -68,7 +87,21 @@ - + + + + + + + + + + + + + + + @@ -77,7 +110,7 @@ - + @@ -96,5 +129,14 @@
    - + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/sysdefdowngrade.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/sysdefdowngrade.bat Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,21 @@ +@rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +@rem All rights reserved. +@rem This component and the accompanying materials are made available +@rem under the terms of the License "Eclipse Public License v1.0" +@rem which accompanies this distribution, and is available +@rem at the URL "http://www.eclipse.org/legal/epl-v10.html". +@rem +@rem Initial Contributors: +@rem Nokia Corporation - initial contribution. +@rem +@rem Contributors: +@rem +@rem Description: +@rem +@setlocal +@if .%1==. goto use +@ java -jar %~dp0xalanj\xalan.jar -xsl %~dpn0.xsl %* -XSLTC +@goto end +:use +@ java -jar %~dp0xalanj\xalan.jar -in %~dpn0.xsl -xsl %~dp0lib\usage.xsl -param usage "%~n0" +:end diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/sysdefdowngrade.xsl --- a/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/sysdefdowngrade.xsl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/demo/data/sf/os/buildtools/bldsystemtools/sysdeftools/sysdefdowngrade.xsl Mon Sep 13 13:11:19 2010 +0800 @@ -3,7 +3,7 @@ - + + + + + + + os/deviceplatformrelease/foundation_system/system_model - - + + + @@ -26,10 +34,10 @@ ERROR: Cannot process this document - - + @@ -37,7 +45,7 @@ - + @@ -106,6 +114,7 @@ + @@ -124,9 +133,31 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -194,6 +225,11 @@ + + + + + @@ -211,7 +247,11 @@ - + + / + + + @@ -241,6 +281,15 @@ + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/ivy.xml --- a/buildframework/helium/sf/java/sysdef/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -29,7 +29,7 @@ - - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageDefinition.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageDefinition.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.helium.sysdef; + +import java.io.File; +import java.io.IOException; +import java.util.Hashtable; +import java.util.Map; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +/** + * Basic package_definition file parser. It is meant to extract needed data for the root system + * definition file creation. + * + */ +public class PackageDefinition { + public static final String DEFAULT_ID_NAMESPACE = "http://www.symbian.org/system-definition"; + + private String idNamespace; + private String id; + private Map namespaces = new Hashtable(); + + /** + * Construct a PackageDefinition object extracting data from the + * file file. + * + * @param file + * @throws PackageDefinitionParsingException + */ + public PackageDefinition(File file) throws PackageDefinitionParsingException { + try { + DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + Document doc = builder.parse(file); + if (!doc.getDocumentElement().getNodeName().equals("SystemDefinition")) { + throw new PackageDefinitionParsingException("Invalid XML format for " + + file.getAbsolutePath() + " root element must be SystemDefinition"); + } + // Getting information from the SystemDefinition element + if (doc.getDocumentElement().hasAttribute("id-namespace")) { + idNamespace = doc.getDocumentElement().getAttribute("id-namespace"); + } else { + idNamespace = DEFAULT_ID_NAMESPACE; + } + NamedNodeMap attrs = doc.getDocumentElement().getAttributes(); + for (int i = 0; i < attrs.getLength(); i++) { + if (attrs.item(i).getNodeName().startsWith("xmlns:")) { + namespaces.put(attrs.item(i).getNodeName(), attrs.item(i).getNodeValue()); + } + } + + // Getting information from the package element + NodeList nodes = doc.getDocumentElement().getChildNodes(); + for (int i = 0; i < nodes.getLength(); i++) { + if (nodes.item(i).getNodeName().equals("package")) { + if (nodes.item(i).getAttributes().getNamedItem("id") == null) { + throw new PackageDefinitionParsingException("Invalid XML format for " + + file.getAbsolutePath() + + " the package element must have an id attribute."); + } + id = nodes.item(i).getAttributes().getNamedItem("id").getNodeValue(); + } + } + if (id == null) { + throw new PackageDefinitionParsingException("Invalid XML format for " + + file.getAbsolutePath() + " could not find any package definition."); + } + } + catch (ParserConfigurationException e) { + throw new PackageDefinitionParsingException("Error from the XML parser configuration: " + + e.getMessage(), e); + } + catch (SAXException e) { + throw new PackageDefinitionParsingException("Error parsing the file: " + file + ": " + + e.getMessage(), e); + } + catch (IOException e) { + throw new PackageDefinitionParsingException(e.getMessage(), e); + } + } + + /** + * id-namespace of current package. + * @return always returns a string + */ + public String getIdNamespace() { + return idNamespace; + } + + /** + * Id of the package. + * @return + */ + public String getId() { + return id; + } + + /** + * List of global namespaces. + * @return a map of namespaces + */ + public Map getNamespaces() { + return namespaces; + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageDefinitionParsingException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageDefinitionParsingException.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,44 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.sysdef; + +/** + * Exception thown by the PackageMap class while + * parsing a file. + * + */ +public class PackageDefinitionParsingException extends Exception { + + private static final long serialVersionUID = 6940770114328037199L; + + /** + * Exception with error message. + * @param message the error message + */ + public PackageDefinitionParsingException(String message) { + super(message); + } + + /** + * Exception with an error message and a root cause. + * @param message the error message + * @param cause the root cause + */ + public PackageDefinitionParsingException(String message, Throwable cause) { + super(message, cause); + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageMap.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageMap.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/PackageMap.java Mon Sep 13 13:11:19 2010 +0800 @@ -51,13 +51,13 @@ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(file); if (!doc.getDocumentElement().getNodeName().equals("PackageMap")) { - throw new PackageMapParsingException("Invalid XML format for " + file.getAbsolutePath() + " root element must be PackageMap"); + throw new PackageMapParsingException("Invalid XML format for " + file.getAbsolutePath() + " root element must be PackageMap"); } if (!doc.getDocumentElement().hasAttribute("root")) { - throw new PackageMapParsingException("root attribute under element " + doc.getDocumentElement().getTagName() + " is missing in file: " + file); + throw new PackageMapParsingException("root attribute under element " + doc.getDocumentElement().getTagName() + " is missing in file: " + file); } if (!doc.getDocumentElement().hasAttribute("layer")) { - throw new PackageMapParsingException("layer attribute under element " + doc.getDocumentElement().getTagName() + " is missing in file: " + file); + throw new PackageMapParsingException("layer attribute under element " + doc.getDocumentElement().getTagName() + " is missing in file: " + file); } setRoot(doc.getDocumentElement().getAttribute("root")); setLayer(doc.getDocumentElement().getAttribute("layer")); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/antlib.xml --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,13 +22,14 @@ --> - - - - - - + + + + + + - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/conditions/IsVendorPackage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/conditions/IsVendorPackage.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.sysdef.ant.conditions; + +import java.io.File; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.taskdefs.condition.Condition; +import org.apache.tools.ant.types.Resource; +import org.apache.tools.ant.types.resources.selectors.ResourceSelector; +import org.apache.tools.ant.types.selectors.BaseExtendSelector; + +import com.nokia.helium.sysdef.PackageDefinition; +import com.nokia.helium.sysdef.PackageDefinitionParsingException; + +/** + * Ant condition to test if a package_definition.xml is + * defining a vendor package. A package is considered as a vendor package + * when its id-namespace attribute has a different from the default one (please check the + * system definition documentation on the Symbian Foundation website for further detail). + * + *
    + *     <condition property="name" value="true">
    + *         <hlm:isVendorPackage file="${epocroot}/sf/app/package/package_definition.xml" />
    + *     </condition>
    + * 
    + * + * This condition is also usable as a resource selector: + * + *
    + *     <restrict>
    + *         <fileset dir="..." includes="package_definition.xml" />
    + *         <hlm:isVendorPackage />
    + *     </restrict>
    + * 
    + * + */ +public class IsVendorPackage extends BaseExtendSelector + implements Condition, ResourceSelector { + + private File file; + + /** + * Detect is the package_definition.xml is from a vendor package. + * Vendor package have different id-namespace than the default + * one (PackageDefinition.DEFAULT_ID_NAMESPACE). + * + * @param file + * @return true if it denotes a vendor package. + */ + protected boolean isVendorPackage(File file) { + if ("package_definition.xml".equals(file.getName())) { + try { + PackageDefinition pkgDef = new PackageDefinition(file); + return !PackageDefinition.DEFAULT_ID_NAMESPACE.equals(pkgDef.getIdNamespace()); + } catch (PackageDefinitionParsingException e) { + throw new BuildException("Error parsing " + file + + ": " + e.getMessage(), e); + } + } + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean eval() { + if (file == null) { + throw new BuildException("'file' attribute is not defined."); + } + return isVendorPackage(file); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isSelected(File basedir, String filename, File file) { + return isVendorPackage(file); + } + + /** + * The file to test when used as a condition. + * @param file + * @ant.required + */ + public void setFile(File file) { + this.file = file; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isSelected(Resource resource) { + if (!resource.isFilesystemOnly()) { + throw new BuildException(this.getDataTypeName() + " only supports filesystem resources."); + } + return isVendorPackage(new File(resource.toString())); + } +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/AbstractSydefTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/AbstractSydefTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/AbstractSydefTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -17,18 +17,18 @@ package com.nokia.helium.sysdef.ant.taskdefs; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.io.FileNotFoundException; import java.util.Map; import javax.xml.transform.ErrorListener; import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.TransformerConfigurationException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; @@ -45,7 +45,8 @@ private File srcFile; private File destFile; private File epocroot; - private boolean failOnError = true; + private boolean failOnError = true; // Error should not fail by default. + private boolean failOnWarning; // Warning should not fail by default. /** * Get the source file. @@ -117,7 +118,15 @@ } /** - * Defines if the file should fail on error. + * Shall we fail the build on warning. + * @return is the task should fail on warning. + */ + public boolean isFailOnWarning() { + return failOnWarning; + } + + /** + * Defines if the task should fail on error. * @param failonerror * @ant.not-required Default is true. */ @@ -126,11 +135,20 @@ } /** + * Defines if the task should fail on warning. + * @param failonerror + * @ant.not-required Default is true. + */ + public void setFailOnWarning(boolean failOnWarning) { + this.failOnWarning = failOnWarning; + } + + /** * This method should be defined by the implementing class * to define the location of the XSLT file. * @return the XSLT file location. */ - abstract File getXsl(); + protected abstract File getXsl(); /** * Check if required attribute have been configured correctly. @@ -267,7 +285,7 @@ */ @Override public void warning(TransformerException message) throws TransformerException { - if (this.isFailOnError()) { + if (this.isFailOnWarning()) { throw message; } else { log("WARNING: " + message.getMessageAndLocation(), Project.MSG_WARN); diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/CreatePackageMappingTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/CreatePackageMappingTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/CreatePackageMappingTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -22,18 +22,20 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; +import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; -import org.apache.tools.ant.types.DirSet; + import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; +import org.apache.tools.ant.types.DirSet; import org.apache.tools.ant.types.Resource; import org.apache.tools.ant.types.ResourceCollection; -import java.util.Hashtable; -import org.apache.tools.ant.DirectoryScanner; + import com.nokia.helium.sysdef.PackageMap; import com.nokia.helium.sysdef.PackageMapParsingException; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/CreateRootSysdefTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/CreateRootSysdefTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/CreateRootSysdefTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -34,6 +34,8 @@ import org.apache.tools.ant.types.Resource; import org.apache.tools.ant.types.ResourceCollection; +import com.nokia.helium.sysdef.PackageDefinition; +import com.nokia.helium.sysdef.PackageDefinitionParsingException; import com.nokia.helium.sysdef.PackageMap; import com.nokia.helium.sysdef.PackageMapParsingException; @@ -50,9 +52,9 @@ * * Example: *
    - * <hlm:createPackageMapping epocroot="E:\sdk" destFile="E:\sdk\sysdef_root.xml" >
    + * <hlm:createRootSysdef epocroot="E:\sdk" destFile="E:\sdk\sysdef_root.xml" >
      *     <fileset dir="E:\sdk" includes="root/**/package_definition.xml">
    - * </hlm:createPackageMapping>
    + * </hlm:createRootSysdef>
      * 
    * * @ant.task name="createRootSysdef" category="Sysdef" @@ -61,12 +63,13 @@ private File destFile; private List resourceCollections = new ArrayList(); - private Map>> roots = new HashMap>>(); + private Map>>> roots = new HashMap>>>(); private Map> layers = new HashMap>(); private File epocroot; private boolean failOnError = true; private boolean checkPackageExists; private File template; + private String idNamespace; /** * {@inheritDoc} @@ -101,14 +104,14 @@ if (pkgMapFile.exists()) { log("Package map file: " + pkgMapFile); if (!checkPackageExists) { - addPackage(pkgMapFile, pkgDir.getName()); + addPackage(pkgDefFile, pkgMapFile, pkgDir.getName()); } else { PackageMap pkgMap = new PackageMap(pkgMapFile); File destPkg = new File(epocroot, pkgMap.getRoot() + File.separator + pkgMap.getLayer() + File.separator + pkgDir.getName() + File.separator + CreatePackageMappingTask.PACKAGE_DEFINITION_FILENAME); if (destPkg.exists()) { - addPackage(pkgMapFile, pkgDir.getName()); + addPackage(pkgDefFile, pkgMapFile, pkgDir.getName()); } else { log("Could not find " + destPkg.getAbsolutePath() + " so entry is not added to the root system definition.", Project.MSG_ERR); @@ -119,7 +122,9 @@ log("Package map file: " + pkgMapFile); if (pkgMapFile.exists()) { if (!checkPackageExists) { - addPackage(pkgMapFile, pkgDir.getName()); + // slash must be use to generate correct path. + addPackage(pkgDefFile, pkgMapFile, pkgMapFile.getParentFile().getName() + "/" + + pkgDir.getParentFile().getName() + "/" + pkgDir.getName()); } else { PackageMap pkgMap = new PackageMap(pkgMapFile); File destPkg = new File(epocroot, pkgMap.getRoot() + File.separator + @@ -129,17 +134,17 @@ File.separator + CreatePackageMappingTask.PACKAGE_DEFINITION_FILENAME); if (destPkg.exists()) { - addPackage(pkgMapFile, pkgDir.getParentFile().getName() + - File.separator + pkgDir.getName()); + addPackage(destPkg, pkgMapFile, pkgMapFile.getParentFile().getName() + "/" + + pkgDir.getParentFile().getName() + "/" + pkgDir.getName()); } else { log("Could not find " + destPkg.getAbsolutePath() + " so entry is not added to the root system definition.", Project.MSG_ERR); } } } else { - log("Could not find: " + pkgMapFile.toString(), Project.MSG_ERR); + log("Could not find package_map.xml file for " + pkgDefFile.toString(), Project.MSG_ERR); if (shouldFailOnError()) { - throw new BuildException("Could not find:" + pkgMapFile.toString()); + throw new BuildException("Could not find package_map.xml file for " + pkgDefFile.toString()); } } } @@ -150,6 +155,12 @@ if (shouldFailOnError()) { throw new BuildException(e.getMessage(), e); } + } catch (PackageDefinitionParsingException e) { + log("Invalid " + CreatePackageMappingTask.PACKAGE_DEFINITION_FILENAME + + "(" + e.getMessage() + ")", Project.MSG_ERR); + if (shouldFailOnError()) { + throw new BuildException(e.getMessage(), e); + } } } @@ -157,19 +168,33 @@ generateRootSysdef(); } - private void addPackage(File pkgMapFile, String pkgPath) throws - PackageMapParsingException { + private void addPackage(File pkgDefinition, File pkgMapFile, String pkgPath) throws + PackageMapParsingException, PackageDefinitionParsingException { + // Some quick validity checking. + PackageDefinition pkg = new PackageDefinition(pkgDefinition); + if (idNamespace == null && (pkg.getIdNamespace() != null && pkg.getIdNamespace().length() > 0)) { + idNamespace = pkg.getIdNamespace(); + } else if (idNamespace != null && !idNamespace.equals(pkg.getIdNamespace())) { + log("Warning: " + pkgDefinition.toString() + + " namespace doesn't match the default one. (" + + idNamespace + " != " + pkg.getIdNamespace(), Project.MSG_WARN); + } + + // Adding the package in the structure. log("Adding: " + pkgMapFile, Project.MSG_DEBUG); - // Adding the package in the structure. PackageMap pkgMap = new PackageMap(pkgMapFile); if (!roots.containsKey(pkgMap.getRoot())) { - roots.put(pkgMap.getRoot(), new HashMap>()); + roots.put(pkgMap.getRoot(), new HashMap>>()); } if (!roots.get(pkgMap.getRoot()).containsKey(pkgMap.getLayer())) { - roots.get(pkgMap.getRoot()).put(pkgMap.getLayer(), new ArrayList()); + roots.get(pkgMap.getRoot()).put(pkgMap.getLayer(), new ArrayList>()); layers.put(pkgMap.getLayer(), new ArrayList()); } - roots.get(pkgMap.getRoot()).get(pkgMap.getLayer()).add(pkgPath); + Map data = new HashMap(); + data.put("path", pkgPath); + data.put("id", pkg.getId()); + data.put("namespaces", pkg.getNamespaces()); + roots.get(pkgMap.getRoot()).get(pkgMap.getLayer()).add(data); layers.get(pkgMap.getLayer()).add(pkgPath); } @@ -282,6 +307,10 @@ data.put("roots", roots); // Content by layer data.put("layers", layers); + // id-namespace + if (idNamespace != null) { + data.put("idnamespace", idNamespace); + } // Environment location data.put("epocroot", getEpocroot().getAbsolutePath()); // Relative path from destFile to epocroot. @@ -313,10 +342,14 @@ */ protected String getRelativeDiff() { String rel = getEpocroot().toURI().relativize(getDestFile().getParentFile().toURI()).getPath(); - String[] relArray = rel.split("/"); // This is an URI not a File. - rel = ""; - for (String string : relArray) { - rel += ".." + File.separatorChar; + if (rel.length() > 0) { + String[] relArray = rel.split("/"); // This is an URI not a File. + rel = ""; //"." + File.separatorChar; + for (@SuppressWarnings("unused") String string : relArray) { + rel += ".." + File.separatorChar; + } + } else { + rel = "." + File.separatorChar; } return rel; } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/DowngradeTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/DowngradeTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/DowngradeTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -34,10 +34,16 @@ * For more information about system definition file v3.0 please check * http://developer.symbian.org/wiki/index.php/System_Definition. * + *
    + * This task relies on externals tools. Their location can be configured the following ways: + *
  • by configuring the sysdef.tools.home property, fails if the location is incorrect. + *
  • The parent folder of the joinsysdef tool from the PATH, fallback on SDK location. + *
  • Default SDK location. + * * @ant.task name="downgradeSysdef" category="Sysdef" */ public class DowngradeTask extends AbstractSydefTask { - private static final String XSLT = "sf/os/buildtools/bldsystemtools/sysdeftools/sysdefdowngrade.xsl"; + private static final String XSLT = "sysdefdowngrade.xsl"; /** * {@inheritDoc} @@ -54,6 +60,6 @@ */ @Override protected File getXsl() { - return new File(this.getEpocroot(), XSLT); + return new File(SysdefUtils.getSysdefHome(getProject(), this.getEpocroot()), XSLT); } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/FilterTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/FilterTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/FilterTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -19,9 +19,7 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; -import java.util.Hashtable; import java.util.List; -import java.util.Map; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.util.FileUtils; @@ -48,27 +46,19 @@ * For more information about system definition file v3.0 please check * http://developer.symbian.org/wiki/index.php/System_Definition. * + *
    + * This task relies on externals tools. Their location can be configured the following ways: + *
  • by configuring the sysdef.tools.home property, fails if the location is incorrect. + *
  • The parent folder of the joinsysdef tool from the PATH, fallback on SDK location. + *
  • Default SDK location. + * * @ant.task name="filterSysdef" category="Sysdef" */ public class FilterTask extends AbstractSydefTask { - private static final String XSLT = "sf/os/buildtools/bldsystemtools/sysdeftools/filtering.xsl"; + private static final String XSLT = "filtering.xsl"; private List filterSets = new ArrayList(); /** - * Running the filtering operation on src file and put the result in dest file. - * @param src the source file - * @param dest the destination file - * @param filter the filter to use - * @param filterType the filter type to use (e.g has, only, with) - */ - protected void filter(File src, File dest, String filter, String filterType) { - Map params = new Hashtable(); - params.put("filter-type", filterType); - params.put("filter", filter); - transform(params); - } - - /** * Create a FilterSet object to store filters. * @return a new FilterSet object */ @@ -96,19 +86,26 @@ log("Filtering " + this.getSrcFile()); for (FilterSet filterSet : filterSets) { if (filterSet.isReference()) { - filterSet = (FilterSet)filterSet.getRefid().getReferencedObject(); + try { + filterSet = (FilterSet)filterSet.getRefid().getReferencedObject(); + } catch (ClassCastException ex) { + throw new BuildException("Object referenced by '" + filterSet.getRefid().getRefId() + "' is not a sysdefFilterSet.", ex); + } } List toDelete = new ArrayList(); try { File src = this.getSrcFile(); File dst = null; for (Filter filter : filterSet.getFilters()) { - if (filter.getFilter() == null) { - throw new BuildException("'filter' attribute is not defined."); - } + + // validating parameter first. + filter.validate(); + + // Then filter the file dst = File.createTempFile("sysdef", ".xml", this.getEpocroot()); toDelete.add(dst); - filter(src, dst, filter.getFilter(), filter.getType()); + filter.filter(this, src, dst); + // Dest is the input for next loop. src = dst; } @@ -135,7 +132,7 @@ * {@inheritDoc} */ @Override - File getXsl() { - return new File(this.getEpocroot(), XSLT); + protected File getXsl() { + return new File(SysdefUtils.getSysdefHome(getProject(), this.getEpocroot()), XSLT); } } \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/JoinTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/JoinTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/JoinTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -36,16 +36,25 @@ * For more information about system definition file v3.0 please check * http://developer.symbian.org/wiki/index.php/System_Definition. * + *
    + * This task relies on externals tools. Their location can be configured the following ways: + *
  • by configuring the sysdef.tools.home property, fails if the location is incorrect. + *
  • The parent folder of the joinsysdef tool from the PATH, fallback on SDK location. + *
  • Default SDK location. + * * @ant.task name="joinSysdef" category="Sysdef" */ public class JoinTask extends AbstractSydefTask { - private static final String XSLT = "sf/os/buildtools/bldsystemtools/sysdeftools/joinsysdef.xsl"; + private static final String XSLT = "joinsysdef.xsl"; /** * {@inheritDoc} */ public void execute() { + // This task is configure to always fail on warnings, + // because it doesn't fails in case of missing link. + this.setFailOnWarning(true); check(); log("Joining " + this.getSrcFile()); log("Creating " + this.getDestFile()); @@ -57,6 +66,6 @@ */ @Override protected File getXsl() { - return new File(this.getEpocroot(), XSLT); + return new File(SysdefUtils.getSysdefHome(getProject(), this.getEpocroot()), XSLT); } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/MergeTask.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/MergeTask.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/MergeTask.java Mon Sep 13 13:11:19 2010 +0800 @@ -50,11 +50,17 @@ * For more information about system definition file v3.0 please check * http://developer.symbian.org/wiki/index.php/System_Definition. * + *
    + * This task relies on externals tools. Their location can be configured the following ways: + *
  • by configuring the sysdef.tools.home property, fails if the location is incorrect. + *
  • The parent folder of the joinsysdef tool from the PATH, fallback on SDK location. + *
  • Default SDK location. + * @ant.task name="mergeSysdef" category="Sysdef" */ public class MergeTask extends AbstractSydefTask { - private static final String XSLT = "sf/os/buildtools/bldsystemtools/sysdeftools/mergesysdef.xsl"; + private static final String XSLT = "mergesysdef.xsl"; private File downstreamFile; private List resourceCollections = new ArrayList(); @@ -156,6 +162,6 @@ */ @Override protected File getXsl() { - return new File(this.getEpocroot(), XSLT); + return new File(SysdefUtils.getSysdefHome(getProject(), this.getEpocroot()), XSLT); } } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/SysdefUtils.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/taskdefs/SysdefUtils.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,69 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.sysdef.ant.taskdefs; + +import java.io.File; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; + +import com.nokia.helium.core.FileUtils; + +/** + * Utility class to access the system definition tools. + * + */ +public final class SysdefUtils { + public static final String SYSDEF_HOME_PROPERTY_NAME = "sysdef.tools.home"; + private static final String ASSET_PATH = "sf/os/buildtools/bldsystemtools/sysdeftools"; + + private SysdefUtils() { + } + + /** + * Get the location of the the system definitions tools. + * Use the SYSDEF_HOME_PROPERTY_NAME if it is defined. + * Else it tries to search the joinsysdef script on the path, + * and finally falls back on the ASSET_PATH location. + * @param project the current Ant project. + * @param epocroot the epocroot location. + * @return a directory represented by a File object. + */ + public static File getSysdefHome(Project project, File epocroot) { + if (project.getProperty(SYSDEF_HOME_PROPERTY_NAME) != null) { + File dir = new File(project.getProperty(SYSDEF_HOME_PROPERTY_NAME)).getAbsoluteFile(); + if (dir.exists() && dir.isDirectory()) { + return dir; + } else { + throw new BuildException("The " + SYSDEF_HOME_PROPERTY_NAME + + " property refers to an invalid directory: " + dir); + } + } else { + File dir = FileUtils.findExecutableOnPath("joinsysdef"); + if (dir != null) { + return dir.getParentFile(); + } + // last resorts the asset location... + dir = new File(epocroot, ASSET_PATH); + if (!dir.exists() || !dir.isDirectory()) { + throw new BuildException("Could not find system definition tools home."); + } + return dir; + } + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/Filter.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/Filter.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/Filter.java Mon Sep 13 13:11:19 2010 +0800 @@ -16,44 +16,29 @@ */ package com.nokia.helium.sysdef.ant.types; +import java.io.File; + +import com.nokia.helium.sysdef.ant.taskdefs.FilterTask; + /** - * This type defines a system definition filter. + * This interface defines filter applied by the sysdefFilter task. * */ -public class Filter { - private String filter; - private String type = "has"; +public interface Filter { /** - * Define the filter - * @param filter the filter string. + * Validate the object parameters. + * This method will be called before the filter method. */ - public void setFilter(String filter) { - this.filter = filter; - } + void validate(); /** - * Get the filter. - */ - public String getFilter() { - return filter; - } - - /** - * Define the filter type - * @param type - * @ant.not-required Default has. + * Apply filtering on the src file and save the outcome into + * the dest file. + * @param task the calling task. + * @param src the source file + * @param dest the dest file. */ - public void setType(SydefFilterTypeEnum type) { - this.type = type.getValue(); - } - - /** - * Get the filter type. - * @return - */ - public String getType() { - return type; - } - -} \ No newline at end of file + void filter(FilterTask task, File src, File dest); + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/FilterSet.java --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/FilterSet.java Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/FilterSet.java Mon Sep 13 13:11:19 2010 +0800 @@ -24,7 +24,7 @@ /** * This Ant type defines a set of system definition * filters. - * + * @ant.type name="sysdefFilterSet" category="Sysdef" */ public class FilterSet extends DataType { private List filters = new ArrayList(); @@ -32,8 +32,8 @@ /** * Create a new nested filter. */ - public Filter createFilter() { - Filter filter = new Filter(); + public SysdefFilter createFilter() { + SysdefFilter filter = new SysdefFilter(); filters.add(filter); return filter; } @@ -45,6 +45,15 @@ public List getFilters() { return filters; } + + /** + * Create a config filter. + * @return a config filter. + */ + public SysdefConfig createConfig() { + SysdefConfig filter = new SysdefConfig(); + filters.add(filter); + return filter; + } - } diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/SysdefConfig.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/SysdefConfig.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,112 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.sysdef.ant.types; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.ProjectComponent; +import org.apache.tools.ant.taskdefs.ExecTask; + +import com.nokia.helium.core.FileUtils; +import com.nokia.helium.sysdef.ant.taskdefs.FilterTask; +import com.nokia.helium.sysdef.ant.taskdefs.SysdefUtils; + +/** + * This type configure the Feature based filtering, by accepting + * a HRH file parameter and a set of include path as input. + * + */ +public class SysdefConfig extends ProjectComponent implements Filter { + private File file; + private String includes; + + /** + * The configuration file. (e.g bldvariant.hrh) + * @param file + * @ant.required + */ + public void setFile(File file) { + this.file = file; + } + + /** + * Set a list of include path separated by current os separator character (; or :) + * @param includes + * @ant.not-required + */ + public void setIncludes(String includes) { + this.includes = includes; + } + + /** + * Get the list of include path as a list of File objet. + * Include will be considered as relative to basedir if they + * are not absolute. + * @return a list of directories. + */ + protected List getIncludes() { + List includeFiles = new ArrayList(); + if (includes != null) { + for (String include : includes.split(File.pathSeparator)) { + includeFiles.add(getProject().resolveFile(include)); + } + } + return includeFiles; + } + + /** + * {@inheritDoc} + */ + @Override + public void filter(FilterTask task, File src, File dest) { + String[] pathDirs = {SysdefUtils.getSysdefHome(task.getProject(), task.getEpocroot()).toString()}; + File script = FileUtils.findExecutableOnPath("joinsysdef", pathDirs); + if (script == null) { + throw new BuildException("Could not find the joinsysdef tool."); + } + ExecTask exec = new ExecTask(); + exec.bindToOwner(task); + exec.setDir(task.getEpocroot()); + exec.setExecutable(script.toString()); + exec.createArg().setValue("-config"); + exec.createArg().setFile(file); + exec.createArg().setValue("-output"); + exec.createArg().setFile(dest); + for (File include : getIncludes()) { + exec.createArg().setValue("-I" + include.toString()); + } + exec.createArg().setFile(src); + exec.execute(); + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() { + if (file == null) { + throw new BuildException("'file' attribute is not defined."); + } + if (!file.exists()) { + throw new BuildException("Could not find file: " + file.getAbsolutePath()); + } + } + +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/SysdefFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/ant/types/SysdefFilter.java Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,126 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.helium.sysdef.ant.types; + +import java.io.File; +import java.util.Hashtable; +import java.util.Map; + +import org.apache.tools.ant.BuildException; + +import com.nokia.helium.sysdef.ant.taskdefs.AbstractSydefTask; +import com.nokia.helium.sysdef.ant.taskdefs.FilterTask; +import com.nokia.helium.sysdef.ant.taskdefs.SysdefUtils; + +/** + * This type defines a system definition filter. + * + */ +public class SysdefFilter implements Filter { + private static final String INVALID_FILTER = "nothing"; + private static final String XSLT = "filtering.xsl"; + private String filter; + private String type = "has"; + private String verbatim; + + /** + * Define the verbatim to filter in, can be used in conjunction with filter. + * @param verbatim a string representing a comma separated list of id to + * filter in. + * @ant.required + */ + public void setVerbatim(String verbatim) { + this.verbatim = verbatim; + } + + /** + * Define the filter, can be used in conjunction with verbatim attribute. + * @param filter the filter string. + * @ant.required + */ + public void setFilter(String filter) { + this.filter = filter; + } + + /** + * Define the filter type + * @param type + * @ant.not-required Default has. + */ + public void setType(SydefFilterTypeEnum type) { + this.type = type.getValue(); + } + + + + /** + * {@inheritDoc} + */ + @Override + public void filter(FilterTask task, File src, File dest) { + FilterImpl impl = new FilterImpl(); + impl.bindToOwner(task); + impl.setEpocroot(task.getEpocroot()); + impl.setSrcFile(src); + impl.setDestFile(dest); + impl.filter(filter, type); + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() { + if (filter == null && verbatim == null) { + throw new BuildException("'filter' or/and 'idlist' attribute is not defined."); + } + } + + private class FilterImpl extends AbstractSydefTask { + + /** + * Running the filtering operation on src file and put the result in dest file. + * @param src the source file + * @param dest the destination file + * @param filter the filter to use + * @param filterType the filter type to use (e.g has, only, with) + */ + protected void filter(String filter, String filterType) { + Map params = new Hashtable(); + params.put("filter-type", filterType); + if (filter == null && verbatim != null) { + params.put("filter", INVALID_FILTER); + } else if (filter != null) { + params.put("filter", filter); + } + if (verbatim != null) { + params.put("verbatim", verbatim); + } + transform(params); + } + + + /** + * {@inheritDoc} + */ + @Override + protected File getXsl() { + return new File(SysdefUtils.getSysdefHome(getProject(), this.getEpocroot()), XSLT); + } + } + +} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl --- a/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/src/com/nokia/helium/sysdef/templates/root_sysdef_model.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -140,16 +140,30 @@ ]> - -<#assign name=""> -<#list roots?keys as root><#assign name=name + root + "_"> - +xmlns:vendor="${idnamespace}"> + <#list layers?keys as layer> <#list roots?keys as root> <#if roots[root]?keys?seq_contains(layer)> <#list roots[root][layer] as pkg> - + <#assign namespaces="" /> + <#if (idnamespace?? && idnamespace!="http://www.symbian.org/system-definition")> + <#assign pkgid="vendor:${pkg['id']}" /> + <#else> + <#assign pkgid="${pkg['id']}" /> + + <#list pkg['namespaces']?keys as ns> + <#if pkg['namespaces'][ns] != "http://www.symbian.org/system-definition"> + <#assign namespaces="${namespaces} ${ns}=\"${pkg['namespaces'][ns]}\"" /> + <#else> + <#assign nsname=ns?replace("xmlns:", '')> + <#if pkg['id']?starts_with("${nsname}:")> + <#assign pkgid=pkg['id']?replace("${nsname}:", '') /> + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/antunit/test_create_root_sysdef.ant.xml --- a/buildframework/helium/sf/java/sysdef/tests/antunit/test_create_root_sysdef.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/antunit/test_create_root_sysdef.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -92,6 +92,15 @@ + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/antunit/test_filter_sysdef.ant.xml --- a/buildframework/helium/sf/java/sysdef/tests/antunit/test_filter_sysdef.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/antunit/test_filter_sysdef.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -80,7 +80,7 @@ - + @@ -106,4 +106,100 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/antunit/test_is_vendor_package.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/antunit/test_is_vendor_package.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,111 @@ + + + + Helium antlib merge sysdef tests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/bld.sh --- a/buildframework/helium/sf/java/sysdef/tests/bld.sh Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/bld.sh Mon Sep 13 13:11:19 2010 +0800 @@ -16,9 +16,4 @@ # Description: # - - -module load java/1.6.0 -module load mercurial -export OLDANT_ARGS="-lib ../lib -lib ../../lib -lib ../../bin/helium-core.jar -lib ../../bin/helium-sysdef.jar -lib ../../antlibs" -ant -Dant.executor.class="com.nokia.helium.core.ant.HeliumExecutor" $* +ant $* diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/filter/config/config.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/data/filter/config/config.hrh Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,18 @@ +/* +* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +// Some dummy configuration file. diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/isvendor/package/package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/data/isvendor/package/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/isvendor/package/package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/data/isvendor/package/package_map.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,23 @@ + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/isvendor/package/vendor_package_info/vendor_package_metadata/package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/data/isvendor/package/vendor_package_info/vendor_package_metadata/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/epocroot_valid/root/layer/vendor_package/package_definition.xml --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/epocroot_valid/root/layer/vendor_package/package_definition.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/epocroot_valid/root/layer/vendor_package/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,8 +22,7 @@ --> - - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/epocroot_valid/root/layer/vendor_package/vendor_package_info/nokia_vendor_package_metadata/package_definition.xml --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/epocroot_valid/root/layer/vendor_package/vendor_package_info/nokia_vendor_package_metadata/package_definition.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/epocroot_valid/root/layer/vendor_package/vendor_package_info/nokia_vendor_package_metadata/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,8 +22,7 @@ --> - - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/template.txt.ftl --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/template.txt.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/template.txt.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -23,7 +23,7 @@ <#list roots?keys as root> <#list roots[root]?keys as layer> <#list roots[root][layer] as pkg> -${root}/${layer}/${pkg} +${root}/${layer}/${pkg['path']} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/valid_package/package_definition.xml --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/valid_package/package_definition.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/valid_package/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,8 +22,7 @@ --> - - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/valid_package_root2/package_definition.xml --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/valid_package_root2/package_definition.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/valid_package_root2/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,8 +22,7 @@ --> - - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package/package_definition.xml --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package/package_definition.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,10 +20,9 @@ ============================================================================ --> - - - - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package/vendor_package_info/nokia_vendor_package_metadata/package_definition.xml --- a/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package/vendor_package_info/nokia_vendor_package_metadata/package_definition.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package/vendor_package_info/nokia_vendor_package_metadata/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,10 +20,10 @@ ============================================================================ --> - - - - + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package2/package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package2/package_definition.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,31 @@ + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package2/package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/java/sysdef/tests/data/rootsysdef/vendor_package2/package_map.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,23 @@ + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/ivy.xml --- a/buildframework/helium/sf/python/pythoncore/ivy.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/ivy.xml Mon Sep 13 13:11:19 2010 +0800 @@ -30,9 +30,8 @@ - - - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/amara.py --- a/buildframework/helium/sf/python/pythoncore/lib/amara.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/amara.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,11 +18,50 @@ #=============================================================================== """amara""" -# pylint: disable-msg=E1103 -import sys -if 'java' in sys.platform: +# pylint: disable=E1103 +#import sys +#if 'java' in sys.platform: +# pass +if True: + import os import xml.dom.minidom import urllib + import xpath + import xml.etree.ElementTree + import xml.etree.ElementInclude + + # pylint: disable=W0212 + def fixed_writexml(self, writer, indent="", addindent="", newl=""): + # indent = current indentation + # addindent = indentation to add to higher levels + # newl = newline string + writer.write(indent + "<" + self.tagName) + + attrs = self._get_attributes() + a_names = attrs.keys() + a_names.sort() + + for a_name in a_names: + writer.write(" %s=\"" % a_name) + xml.dom.minidom._write_data(writer, attrs[a_name].value) + writer.write("\"") + if self.childNodes: + if len(self.childNodes) == 1 \ + and self.childNodes[0].nodeType == xml.dom.minidom.Node.TEXT_NODE: + writer.write(">") + self.childNodes[0].writexml(writer, "", "", "") + writer.write("%s" % (self.tagName, newl)) + return + writer.write(">%s" % (newl)) + for node in self.childNodes: + if node.__class__ == xml.dom.minidom.Text and node.data.strip() == '': + continue + node.writexml(writer, indent + addindent, addindent, newl) + writer.write("%s%s" % (indent, self.tagName, newl)) + else: + writer.write("/>%s" % (newl)) + # replace minidom's function with ours + xml.dom.minidom.Element.writexml = fixed_writexml def parse(param): """parse""" @@ -42,29 +81,55 @@ if isinstance(dom, file): self.dom = xml.dom.minidom.parse(dom) elif isinstance(dom, basestring): - if dom.startswith('file:///'): + cwd_backup = os.getcwd() + if dom.startswith('file:///') or dom.startswith('///') or os.path.exists(dom): + try: + path = urllib.url2pathname(dom) + path = path.replace('file:///', '') + os.chdir(os.path.dirname(path)) + except IOError: + pass dom = urllib.urlopen(dom).read() + + ettree = xml.etree.ElementTree.fromstring(dom) + xml.etree.ElementInclude.include(ettree) + dom = xml.etree.ElementTree.tostring(ettree) + os.chdir(cwd_backup) self.dom = xml.dom.minidom.parseString(dom) else: self.dom = dom def __getitem__(self, name): return self.__getattr__(name) - + + def __setitem__(self, key, value): + self.xml_set_attribute(key, value) + def __getattr__(self, attr): if isinstance(attr, basestring): res = self.dom.getElementsByTagName(attr) if len(res) == 0: if hasattr(self.dom, 'documentElement'): val = self.dom.documentElement.getAttribute(attr) + if not self.dom.documentElement.hasAttribute(attr): + raise Exception(attr + ' not found') else: val = self.dom.getAttribute(attr) - if val == '': - raise Exception(attr + ' not found') + if not self.dom.hasAttribute(attr): + raise Exception(attr + ' not found') return val return MinidomAmara(res[0], self.dom) - return MinidomAmara(self.parent.getElementsByTagName(self.dom.tagName)[attr]) + if self.parent: + return MinidomAmara(self.parent.getElementsByTagName(self.dom.tagName)[attr]) + else: + raise Exception(str(attr) + ' not found') + def __setattr__(self, name, value): + if isinstance(value, basestring): + self.xml_set_attribute(name, value) + else: + object.__setattr__(self, name, value) + def __iter__(self): for entry in self.parent.getElementsByTagName(self.dom.tagName): yield MinidomAmara(entry) @@ -76,13 +141,15 @@ text = text + t_text.data return text - def xml(self, out=None, indent=True, omitXmlDeclaration=False, encoding=''): + def xml(self, out=None, indent=False, omitXmlDeclaration=False, encoding='utf-8'): """xml""" + if omitXmlDeclaration: + pass if out: - out.write(self.dom.toprettyxml()) + out.write(self.dom.toprettyxml(encoding=encoding)) if indent: - return self.dom.toprettyxml() - return self.dom.toxml() + return self.dom.toprettyxml(encoding=encoding) + return self.dom.toxml(encoding=encoding) def xml_append_fragment(self, text): """xml append fragment""" @@ -92,6 +159,9 @@ """set XML attribute""" self.dom.setAttribute(name, value) + def xml_remove_child(self, value): + self.dom.removeChild(value.dom) + def _getxml_children(self): """get xml children""" l_attrib = [] @@ -142,24 +212,32 @@ def __eq__(self, obj): return str(self) == obj + def __ne__(self, obj): + return str(self) != obj def __len__(self): - return len(self.parent.getElementsByTagName(self.dom.tagName)) + if self.parent: + return len(self.parent.getElementsByTagName(self.dom.tagName)) + return 1 - def xml_xpath(self, xpath): + def xml_xpath(self, axpath): """append to the XML path""" - import java.io.ByteArrayInputStream - import org.dom4j.io.SAXReader - import org.dom4j.DocumentHelper - - stream = java.io.ByteArrayInputStream(java.lang.String(self.dom.toxml()).getBytes("UTF-8")) - xmlReader = org.dom4j.io.SAXReader() - doc = xmlReader.read(stream) - xpath = org.dom4j.DocumentHelper.createXPath(xpath) - signalNodes = xpath.selectNodes(doc) - iterator = signalNodes.iterator() - out = [] - while iterator.hasNext(): - p_iterator = iterator.next() - out.append(MinidomAmara(p_iterator.asXML())) - return out + results = [] + for result in xpath.find(axpath, self.dom): + results.append(MinidomAmara(result)) + return results +# import java.io.ByteArrayInputStream +# import org.dom4j.io.SAXReader +# import org.dom4j.DocumentHelper +# +# stream = java.io.ByteArrayInputStream(java.lang.String(self.dom.toxml()).getBytes("UTF-8")) +# xmlReader = org.dom4j.io.SAXReader() +# doc = xmlReader.read(stream) +# xpath = org.dom4j.DocumentHelper.createXPath(xpath) +# signalNodes = xpath.selectNodes(doc) +# iterator = signalNodes.iterator() +# out = [] +# while iterator.hasNext(): +# p_iterator = iterator.next() +# out.append(MinidomAmara(p_iterator.asXML())) +# return out diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/archive/builders.py --- a/buildframework/helium/sf/python/pythoncore/lib/archive/builders.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/archive/builders.py Mon Sep 13 13:11:19 2010 +0800 @@ -134,12 +134,12 @@ commonRoots[common_path] = 1 return commonRoots.keys() - def getPrefix(self, dir, commonUncRoots): + def getPrefix(self, dir_, commonUncRoots): """get prefix""" for root in commonUncRoots: - if dir.startswith(root): + if dir_.startswith(root): return root - raise Exception("Could not find root for %s." % dir) + raise Exception("Could not find root for %s." % dir_) def checkRootDirValue(self, builder, parse_xml_file, build_drive, config_type): """Checks UNC path in root.dir and adds the substituted drive into EMAKEROOT.""" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/archive/mappers.py --- a/buildframework/helium/sf/python/pythoncore/lib/archive/mappers.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/archive/mappers.py Mon Sep 13 13:11:19 2010 +0800 @@ -292,7 +292,7 @@ value = fileutils.read_policy_content(policyfile) if value not in self._binary.keys(): #check policy file is valid _logger.error("POLICY_ERROR: policy file found %s but policy %s value not exists in csv" % (policyfile, value)) - except Exception, exc: + except IOError, exc: _logger.error("POLICY_ERROR: %s" % exc) value = self._config.get('policy.default.value', MISSING_POLICY) else: #no policy file present @@ -408,7 +408,7 @@ """ Initialization. """ PolicyRemoverMapper.__init__(self, config, archiver) - def load_policy_binary(self, csvfile): + def load_policy_binary(self, csvfile, column=1): """ Loading the policy using the 3rd column. """ _logger.info("POLICY_INFO: Loading actions from the 3rd column") PolicyRemoverMapper.load_policy_binary(self, csvfile, column=3) @@ -419,7 +419,7 @@ """ Initialization. """ PolicyRemoverMapper.__init__(self, config, archiver) - def load_policy_binary(self, csvfile): + def load_policy_binary(self, csvfile, column=1): """ Loading the policy using the 4th column. """ _logger.info("POLICY_INFO: Loading actions from the 4th column") PolicyRemoverMapper.load_policy_binary(self, csvfile, column=4) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/archive/scanners.py --- a/buildframework/helium/sf/python/pythoncore/lib/archive/scanners.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/archive/scanners.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,11 +21,12 @@ import os import fileutils -import selectors import logging import codecs import pathaddition +import archive.selectors + _logger = logging.getLogger('archive.scanners') _logger_abld = logging.getLogger('archive.scanners.abld') logging.basicConfig() @@ -46,11 +47,11 @@ [self.add_exclude_file(ex) for ex in self._config.get_list('exclude_file', [])] [self.add_exclude_lst(filename) for filename in self._config.get_list('exclude.lst', [])] [self.add_filetype(filetype) for filetype in self._config.get_list('filetype', [])] - [self.add_selector(selectors.get_selector(selector, self._config)) for selector in self._config.get_list('selector', [])] + [self.add_selector(archive.selectors.get_selector(selector, self._config)) for selector in self._config.get_list('selector', [])] # To support old features. # TODO: inform customers and remove. if 'distribution.policy.s60' in self._config: - self.add_selector(selectors.get_selector('distribution.policy.s60', self._config)) + self.add_selector(archive.selectors.get_selector('distribution.policy.s60', self._config)) def add_exclude_lst(self, filename): """ Adding excludes from exclude list. """ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/archive/selectors.py --- a/buildframework/helium/sf/python/pythoncore/lib/archive/selectors.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/archive/selectors.py Mon Sep 13 13:11:19 2010 +0800 @@ -73,7 +73,7 @@ else: try: policy_value = fileutils.read_policy_content(policy_file) - except Exception: + except IOError: _logger.warning('POLICY_ERROR: Exception thrown parsing policy file: ' + policy_file) policy_value = archive.mappers.MISSING_POLICY # loop through the possible values @@ -130,7 +130,7 @@ else: try: policy_value = fileutils.read_symbian_policy_content(policy_file) - except Exception: + except IOError: _logger.warning('POLICY_ERROR: Exception thrown parsing policy file: ' + policy_file) policy_value = archive.mappers.MISSING_POLICY # loop through the possible values diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/__init__.py Mon Sep 13 13:11:19 2010 +0800 @@ -35,7 +35,7 @@ import ats3.parsers as parser -from path import path # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 _logger = logging.getLogger('ats') @@ -85,7 +85,7 @@ hrh = os.path.join(self.build_drive + os.sep, 'epoc32', 'include', 'feature_settings.hrh') if os.path.exists(tsrc): if os.path.exists(hrh): - temp_dict = c_parser.get_cpp_output(path(tsrc), "d", hrh) + temp_dict = c_parser.get_cpp_output(path(tsrc), "d", hrh, self.build_drive) else: temp_dict = c_parser.get_cpp_output(path(tsrc), "d") for t_key, t_value in temp_dict.items(): @@ -157,6 +157,7 @@ self.eunitexerunner_flags = config.eunitexerunner_flags self.sets = [] self.src_dst = [] + self.dll_files = {} self.pmd_files = [] self.trace_activation_files = [] self.trace_enabled = 'False' @@ -183,7 +184,8 @@ def insert_set(self, data_files=None, config_files=None, engine_ini_file=None, image_files=None, sis_files=None, testmodule_files=None, test_timeout=None,eunitexerunner_flags=None , test_harness=None, - src_dst=None, pmd_files=None, trace_activation_files=None, custom_dir=None, component_path=None): + src_dst=None, pmd_files=None, trace_activation_files=None, custom_dir=None, + dll_files=None, component_path=None): """ Insert a test set into the test plan. """ @@ -212,9 +214,11 @@ trace_activation_files = [] if component_path is None: component_path = self.component_path + if dll_files is None: + dll_files = self.dll_files setd = dict(name="set%d" % len(self.sets), - image_files=image_files, engine_ini_file=engine_ini_file, ctc_enabled=self.ctc_enabled, component_path=component_path) + image_files=image_files, engine_ini_file=engine_ini_file, ctc_enabled=self.ctc_enabled, dll_files=dll_files, component_path=component_path) setd = dict(setd, custom_dir=custom_dir) if sis_files: @@ -420,7 +424,7 @@ else: generator = adg.Ats3TestDropGenerator() _logger.info("generating drop file: %s" % config.drop_file) - generator.generate(test_plan, output_file=config.drop_file, config_file=config.config_file) + generator.generate(test_plan, output_file=config.drop_file, config_file=config.config_file ) def split_paths(arg, delim=","): """ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/aste.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/aste.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/aste.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ """ASTE test drop generation.""" -# pylint: disable-msg=R0201,R0903,R0902,W0142 + #W0142 => * and ** were used #R* removed during refactoring @@ -33,10 +33,10 @@ import tempfile import zipfile import pkg_resources -from path import path # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 import amara import ntpath as atspath -import jinja2 # pylint: disable-msg=F0401 +import jinja2 # pylint: disable=F0401 _logger = logging.getLogger('ats3') @@ -375,7 +375,7 @@ """ generate an XML file""" loader = jinja2.ChoiceLoader([jinja2.PackageLoader(__name__, 'templates')]) env = jinja2.Environment(loader=loader) - template = env.from_string(pkg_resources.resource_string(__name__, 'aste_template.xml'))# pylint: disable-msg=E1101 + template = env.from_string(pkg_resources.resource_string(__name__, 'aste_template.xml'))# pylint: disable=E1101 xmltext = template.render(test_plan=test_plan, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1') return et.ElementTree(et.XML(xmltext)) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/ats4_template.xml Mon Sep 13 13:11:19 2010 +0800 @@ -29,8 +29,8 @@ {% if test_plan['diamonds_build_url'] -%} {{ test_plan['diamonds_build_url'] }} Smoke - {% endif %} - {{ test_plan['testrun_name'] }} + {%- endif %} + {{ test_plan['testrun_name'] }} @@ -47,7 +47,7 @@ {{ setd['component_path'] }} - {% include 'prestep_custom.xml' ignore missing %} + {{ atsself.get_template(setd['custom_dir'], 'prestep_custom.xml') }} {% if setd.image_files -%} @@ -57,23 +57,33 @@ {% for img in atsself.get_sorted_images(setd) -%} {% if img.startswith('\\\\') -%} - {% else %} + {% else -%} - {% endif %} + {%- endif %} {% set i = i + 1 %} - {% endfor -%} + {%- endfor %} - {% endif %} + {%- endif %} + {% set udaerase = atsself.get_udaerase_image(setd) %} + {% if udaerase -%} + + FlashTask + + + + + + {%- endif %} {% if setd["ctc_enabled"] == "True" -%} {{ macros.ctc_initialization() }} - {% endif %} + {%- endif %} CreateDirTask - - + + @@ -84,50 +94,60 @@ + + - {% endfor -%} - {% else %} + {%- endfor %} + {% else -%} {% if setd['src_dst'] != [] -%} - {% for file in setd['src_dst'] -%} + {% for file in setd['src_dst'] -%} FileUploadTask + + - {% endfor -%} - {% else %} + {%- endfor %} + {% else -%} {% for data_file in setd["data_files"] -%} FileUploadTask + + - {% endfor -%} + {%- endfor %} {% for data_file in setd["config_files"] -%} FileUploadTask + + - {% endfor -%} + {%- endfor %} {% for data_file in setd["testmodule_files"] -%} FileUploadTask + + - {% endfor -%} - {% endif %} - {% endif %} + {%- endfor %} + {%- endif %} + {%- endif %} {% if setd.engine_ini_file -%} {% if (setd.has_key("sis_files") and setd["sis_files"]) or setd["src_dst"] == [] -%} @@ -136,10 +156,12 @@ + + - {% endif %} - {% endif %} + {%- endif %} + {%- endif %} {% for sis_file in setd["sis_files"] -%} @@ -152,14 +174,11 @@ - {% endfor -%} + {%- endfor %} - - {% include 'prerun_custom.xml' ignore missing %} - + {{ atsself.get_template(setd['custom_dir'], 'prerun_custom.xml') }} {% if setd['src_dst'] -%} {{ macros.generate_runsteps_stif(setd) }} - {% for file in setd['src_dst'] -%} {% if setd["test_harness"] == "GENERIC" -%} {% if 'testscript' in file[2] -%} @@ -167,25 +186,28 @@ MTFTask - + - + + + - {% else %} + {% else -%} TEFTask - + - + + + - {% endif %} - {% endif %} - + {%- endif %} + {%- endif %} {% if file[2] == 'testmodule:rtest' -%} ExecutableTestCaseTask @@ -194,11 +216,26 @@ - + + + - {% endif %} - {% endif %} + {%- endif %} + {% if file[2] == "testmodule:sut" -%} + + SymbianUnitTestTask + + + + + + + + + + {%- endif %} + {%- endif %} {% if setd["test_harness"] == "EUNIT" -%} {% if file[2] == "testmodule" -%} @@ -208,77 +245,91 @@ + + - {% endif %} + {%- endif %} {% if file[2] == "testmodule:qt" -%} QTestTask - - - + + + + + - {% endif %} - {% endif %} - {% endfor -%} - {% else %} + {%- endif %} + {%- endif %} + {%- endfor %} + {% else -%} {{ macros.generate_runsteps_stif_single_set(setd) }} - {% endif %} - - {% include 'postrun_custom.xml' ignore missing %} + {%- endif %} + {{ atsself.get_template(setd['custom_dir'], 'postrun_custom.xml') }} {% if setd["ctc_enabled"] == "True" -%} {{ macros.ctc_finalization(setd) }} - {% endif %} + {%- endif %} FileDownloadTask - + + + - {% include 'poststep_custom.xml' ignore missing %} + {{ atsself.get_template(setd['custom_dir'], 'poststep_custom.xml') }} - {% endfor -%} + {%- endfor %} {% include 'postset_custom.xml' ignore missing %} {% include 'prepostaction.xml' ignore missing %} {% for action_type, parameters in test_plan.post_actions -%} - {% if action_type == 'RunProcessAction' %} + {% if action_type == 'RunProcessAction' -%} {{ action_type }} {% for name, value in parameters -%} - {% endfor -%} + {%- endfor %} - {% endif %} - {% endfor -%} + {%- endif %} + {%- endfor %} {% if test_plan['report_email'] -%} EmailAction - + + {% if test_plan['report_type'].lower() == 'no_attachment' -%} + + {%- endif %} - {% endif %} + {%- endif %} {% if test_plan['diamonds_build_url'] -%} DiamondsAction + {% if test_plan.sets != [] and test_plan.sets[0]["ctc_enabled"] == "True" -%} + + + + {%- endif %} - {% endif %} + {%- endif %} + {% include 'postpostaction.xml' ignore missing %} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/atsconfigparser.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/atsconfigparser.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/atsconfigparser.py Mon Sep 13 13:11:19 2010 +0800 @@ -103,7 +103,7 @@ settings[subconfig] = config[subconfig] return settings -def converttestxml(specfilename, testxmldata): # pylint: disable-msg=R0912 +def converttestxml(specfilename, testxmldata): # pylint: disable=R0912 """ convert the specfilename to xml""" specfile = open(specfilename) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/custom.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/custom.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/custom.py Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,7 @@ import ats3 import ats3.dropgenerator as adg from optparse import OptionParser -from path import path # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 import logging _logger = logging.getLogger('ats') diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/dropgenerator.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,9 +21,6 @@ """ Generate test drop zip file for ATS3""" -# pylint: disable-msg=W0142,R0912,R0201,R0915,R0913,R0904 -# pylint: disable-msg=C0302 -# pylint: disable-msg=W0404,W0603 #W0142 => * and ** were used #C0302 => Too many lines @@ -31,23 +28,22 @@ #W => use of global statement import codecs -from xml.parsers.expat import ExpatError +from xml.parsers.expat import ExpatError from xml.etree import ElementTree as et import pkg_resources -from path import path # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 import logging import os import re import zipfile import amara -import atsconfigparser +import ats3.atsconfigparser -# pylint: disable-msg=W0404 from ntpath import sep as atssep import ntpath as atspath -import jinja2 # pylint: disable-msg=F0401 +import jinja2 # pylint: disable=F0401 _logger = logging.getLogger('ats') @@ -106,7 +102,7 @@ if config_file: xmltext = et.tostring(xml.getroot(), "ISO-8859-1") - xmltext = atsconfigparser.converttestxml(config_file, xmltext) + xmltext = ats3.atsconfigparser.converttestxml(config_file, xmltext) xml = et.ElementTree(et.XML(xmltext)) return self.generate_drop(test_plan, xml, output_file) @@ -304,7 +300,7 @@ SE(params, "param", engineini=path(r"c:" + os.sep + "testframework") / ini_name) # if no inifile, but cfg files defined, use those - elif setd["config_files"]!=[]: + elif setd["config_files"] != []: for config_file in setd["config_files"]: step = SE(case, "step", name="Execute test: %s" % config_file.name, @@ -444,11 +440,17 @@ if 'rofs3' in image_file.name: sorted_images.append(image_file) for image_file in setd["image_files"]: - if 'core' not in image_file.name and 'rofs2' not in image_file.name and 'rofs3' not in image_file.name: + if 'core' not in image_file.name and 'rofs2' not in image_file.name and 'rofs3' not in image_file.name and 'udaerase' not in image_file.name.lower(): sorted_images.append(image_file) if len(sorted_images) > 0 and "rofs" in sorted_images[0]: return setd["image_files"] return sorted_images + + def get_udaerase_image(self, setd): + for image_file in setd["image_files"]: + if 'udaerase' in image_file.name.lower(): + return image_file + return None def generate_steps(self, setd, case, test_plan): """Generate the test plan s.""" @@ -520,7 +522,7 @@ filename = file1[1] filename = filename[file1[1].rfind(os.sep)+1:] harness = "testexecute.exe" - if file1[2] == "testscript:mtf": + if "testscript:mtf" in file1[2]: harness = "testframework.exe" step = SE(case, "step", name="Execute test: %s" % filename, harness=setd["test_harness"], @@ -530,12 +532,12 @@ SE(params, "param", file=harness) SE(params, "param", parameters=file1[1]) - if file1[2] == "testscript:mtf": + if "testscript:mtf" in file1[2]: SE(params, "param", {'result-file': self.MTF_LOG_DIR + os.sep + filename.replace('.script', '.htm')}) else: SE(params, "param", {'result-file': self.TEF_LOG_DIR + os.sep + filename.replace('.script', '.htm')}) SE(params, "param", timeout=time_out) - if file1[2] == "testscript:mtf": + if "testscript:mtf" in file1[2]: SE(params, "param", parser="MTFResultParser") else: SE(params, "param", parser="TEFTestResultParser") @@ -640,32 +642,42 @@ #for EUnit or other executables if sdst[2] == "testmodule": eunit_exe = "EUNITEXERUNNER.EXE" - if re_dll.search(filename): - step = SE(case, "step", name = "Execute test: %s" % filename, harness=setd["test_harness"], - **self.defaults) - SE(step, "command").text = "execute" - params = SE(step, "params") - SE(params, "param", file=path(r"z:" + os.sep + "sys" + os.sep + "bin") / eunit_exe) - elem = SE(params, "param") - elem.set('result-file', path(self.EUNIT_LOG_DIR) / no_dll_xml) - SE(params, "param", parameters="%s /F %s /l xml %s" % (eunit_flags, no_dll, filename)) - SE(params, "param", timeout=time_out) - + # include dll file only if it has some harness defined, else skip execute step, only install + if filename.lower() in setd['dll_files']: + if setd['dll_files'][filename.lower()] == "": + pass + else: + if re_dll.search(filename): + step = SE(case, "step", name = "Execute test: %s" % filename, harness=setd["test_harness"], + **self.defaults) + SE(step, "command").text = "execute" + params = SE(step, "params") + SE(params, "param", file=path(r"z:" + os.sep + "sys" + os.sep + "bin") / eunit_exe) + elem = SE(params, "param") + elem.set('result-file', path(self.EUNIT_LOG_DIR) / no_dll_xml) + SE(params, "param", parameters="%s /F %s /l xml %s" % (eunit_flags, no_dll, filename)) + SE(params, "param", timeout=time_out) + #for QtTest.lib executables elif sdst[2] == "testmodule:qt": - step = SE(case, "step", name = "Execute Qt-test: %s" % filename, harness=setd["test_harness"], - **self.defaults) - SE(step, "command").text = "execute" - params = SE(step, "params") - SE(params, "param", file=path(sdst[1])) - SE(params, "param", parameters=r"-lightxml -o %s\%s" % (path(self.QT_LOG_DIR), no_dll_xml)) - elem = SE(params, "param") - elem.set('result-file', path(self.QT_LOG_DIR) / no_dll_xml) - SE(params, "param", parser="QTestResultParser") - elem = SE(params, "param") - elem.set('delete-result',"true") - SE(params, "param", async="false") - SE(params, "param", timeout=time_out) + # include dll file only if it has some harness defined, else skip execute step, only install + if filename.lower() in setd['dll_files']: + if setd['dll_files'][filename.lower()] == "": + pass + else: + step = SE(case, "step", name = "Execute Qt-test: %s" % filename, harness=setd["test_harness"], + **self.defaults) + SE(step, "command").text = "execute" + params = SE(step, "params") + SE(params, "param", file=path(sdst[1])) + SE(params, "param", parameters=r"-lightxml -o %s\%s" % (path(self.QT_LOG_DIR), no_dll_xml)) + elem = SE(params, "param") + elem.set('result-file', path(self.QT_LOG_DIR) / no_dll_xml) + SE(params, "param", parser="QTestResultParser") + elem = SE(params, "param") + elem.set('delete-result',"true") + SE(params, "param", async="false") + SE(params, "param", timeout=time_out) @@ -795,7 +807,14 @@ def check_mtf_harness(self, _setd_): """check the testscript.mtf file is present""" for _srcdst_ in _setd_['src_dst']: - if _srcdst_[2] == "testscript:mtf": + if "testscript:mtf" in _srcdst_[2]: + return True + return False + + def check_sut_harness(self, _setd_): + """check the testscript.sut file is present""" + for _srcdst_ in _setd_['src_dst']: + if "testmodule:sut" in _srcdst_[2]: return True return False @@ -871,11 +890,11 @@ # clear the loop variable loop = '' cust = unicode(custom_action_file.read(1)) - except Exception, err: + except UnicodeError, err: _logger.error("Error %s in XML when prosessing %s\n" % ( err, filename)) xmltree.append(et.Comment("Error in XML file when prosessing %s\n" % ( filename))) - if loop != '' : + if loop != '': # we should have used all the input and cleared loop variable _logger.warning("Issues in customization file %s in XML when prosessing issue %s \n Line and column refer to section:\n%s\n" % ( filename, err, loop)) @@ -912,11 +931,13 @@ STIF_LOG_DIR = r"c:\logs\testframework" TEF_LOG_DIR = r"c:\logs\testexecute" MTF_LOG_DIR = r"c:\logs\testresults" + SUT_LOG_DIR = r"c:\sut" STIFUNIT_LOG_DIR = r"c:\logs\testframework" EUNIT_LOG_DIR = r"c:\Shared\EUnit\logs" #QT_LOG_DIR = r"c:\private\Qt\logs" QT_LOG_DIR = r"c:\shared\EUnit\logs" CTC_LOG_DIR = r"c:\data\ctc" + AtsInterface_LOG_DIR = r"c:\spd_logs\xml" def stif_init_file(self, src_dst): """init the STIF format file""" @@ -955,23 +976,39 @@ drop_id = temp_drop_id return atspath.join(ats_network, "ctc_helium" , diamonds_id, drop_id, setd["name"], "ctcdata") + + def stifmodulename(self, ini_file): + modname = None + ini = open(ini_file) + for line in ini: + if line.startswith('ModuleName'): + modname = line.split('=')[1].strip() + ini.close() + return modname - def getlogdir(self, setd): + def getlogdir(self, test_plan, setd): """ find the logger directory""" + returnval = None if setd["test_harness"] == "STIF": - return self.STIF_LOG_DIR + if test_plan['hti'] == 'True': + returnval = self.STIF_LOG_DIR + else: + returnval = self.AtsInterface_LOG_DIR elif setd["test_harness"] == "STIFUNIT": - return self.STIFUNIT_LOG_DIR + returnval = self.STIFUNIT_LOG_DIR elif setd["test_harness"] == "GENERIC": if self.check_mtf_harness(setd): - return self.MTF_LOG_DIR + returnval = self.MTF_LOG_DIR + elif self.check_sut_harness(setd): + returnval = self.SUT_LOG_DIR else: - return self.TEF_LOG_DIR + returnval = self.TEF_LOG_DIR elif setd["test_harness"] == "EUNIT": if self.check_qt_harness(setd): - return self.QT_LOG_DIR + returnval = self.QT_LOG_DIR else: - return self.EUNIT_LOG_DIR + returnval = self.EUNIT_LOG_DIR + return returnval def generate_xml(self, test_plan): """generate the XML""" @@ -989,7 +1026,19 @@ if hasattr(test_plan, 'custom_template'): template = env.from_string(open(test_plan.custom_template).read()) else: - template = env.from_string(pkg_resources.resource_string(__name__, 'ats4_template.xml'))# pylint: disable-msg=E1101 + template = env.from_string(pkg_resources.resource_string(__name__, 'ats4_template.xml'))# pylint: disable=E1101 xmltext = template.render(test_plan=test_plan, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1') - return et.ElementTree(et.XML(xmltext)) \ No newline at end of file + return et.ElementTree(et.XML(xmltext)) + + def get_template(self, directory, template_name): + if directory: + name = os.path.join(directory, template_name) + if os.path.exists(name): + template_file = open(name) + contents = template_file.read() + template_file.close() + return contents + return '' + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/matti/MattiDrops.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/matti/MattiDrops.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/matti/MattiDrops.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ #=============================================================================== """ create the MATTI test drop file for use on the test server """ -# pylint: disable-msg=R0902, R0903, R0912 +# pylint: disable=R0902, R0903, R0912 import os import re @@ -31,7 +31,7 @@ import logging from optparse import OptionParser from xml.etree import ElementTree as et -from jinja2 import Environment, PackageLoader # pylint: disable-msg=F0401 +from jinja2 import Environment, PackageLoader # pylint: disable=F0401 # Shortcuts E = et.Element diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/matti2.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/matti2.py Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,446 @@ +# -*- encoding: latin-1 -*- + +#============================================================================ +#Name : matti.py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== + +"""MATTI test drop generation.""" + +# pylint: disable=R0201,R0903,R0902,W0142 +#W0142 => * and ** were used +#R* removed during refactoring + +from optparse import OptionParser +from xml.etree import ElementTree as et +import logging +import os +import re +import tempfile +import zipfile +import pkg_resources # pylint: disable=F0401 +from path import path # pylint: disable=F0401 +import amara +import ntpath as atspath +import jinja2 # pylint: disable=F0401 +import ats3.parsers as parser + +_logger = logging.getLogger('matti') + +# Shortcuts +E = et.Element +SE = et.SubElement + +class Configuration(object): + """ + MATTI drop generation configuration. + """ + + def __init__(self, opts): + """ + Initialize from optparse configuration options. + """ + + self._opts = opts + # Customize some attributes from how optparse leaves them. + self.build_drive = path(self._opts.build_drive) + self.file_store = path(self._opts.file_store) + self.flash_images = self.split_paths(self._opts.flash_images) + self.matti_sis_files = self.split_paths(self._opts.matti_sis_files) + self.test_assets = self.split_paths(self._opts.testasset_location) + self.template_loc = path(self._opts.template_loc) + + + def split_paths(self, arg, delim=","): + """ + Split the string by delim, removing extra whitespace. + """ + return [path(part.strip()) + for part in arg.split(delim) if part.strip()] + + def __getattr__(self, attr): + return getattr(self._opts, attr) + + def __str__(self): + dump = "Configuration:\n" + seen = set() + for key, value in vars(self).items(): + if not key.startswith("_"): + dump += "\t%s = %s\n" % (key, value) + seen.add(key) + for key, value in vars(self._opts).items(): + if key not in seen: + dump += "\t%s = %s\n" % (key, value) + seen.add(key) + return dump + + +class MattiTestPlan(object): + """ + Tells MATTI server what to test and how. + + The MATTI test plan from which the test.xml file can be written. The test + plan requires TestAsset(s) to perform the tests + """ + + def __init__(self, config): + self.pkg_parser = parser.PkgFileParser() + self.file_store = config.file_store + self.matti_timeout = config.matti_timeout + self.test_profiles = config.test_profiles + self.sierra_enabled = to_bool(config.sierra_enabled) + self.sierra_parameters = config.sierra_parameters + self.test_profiles = config.test_profiles.strip().split(",") + self.build_drive = config.build_drive + self.matti_sis_files = "" + self.install_files = [] + self.matti_task_files = None + + def insert_execution_block(self, block_count=1, image_files=None, matti_sis_files=None, test_asset_path=None, matti_parameters=None): + """ + Insert Matti tasks and test data files into execution block + """ + self.matti_sis_files = matti_sis_files + temp_sis_files = [] + if self.matti_sis_files != None: + for sis_file in self.matti_sis_files: + temp_sis_files.append(sis_file.split("#")) + + test_asset_path = test_asset_path + if image_files is None: + image_files = [] + + exe_dict = dict(name="exe%d" % block_count, asset_path=test_asset_path, image_files=image_files, matti_sis_files=temp_sis_files) + exe_dict = dict(exe_dict, test_timeout=self.matti_timeout) + exe_dict = dict(exe_dict, matti_parameters=matti_parameters) + exe_dict = dict(exe_dict, sierra_enabled=self.sierra_enabled.lower()) + exe_dict = dict(exe_dict, sierra_parameters=self.sierra_parameters) + + + self.matti_task_files = self.create_matti_task_files_list(self.sierra_enabled, test_asset_path) + exe_dict = dict(exe_dict, matti_task_files=self.matti_task_files) + + self.install_files = self.create_install_files_list(test_asset_path) + exe_dict = dict(exe_dict, install_files=self.install_files) + return exe_dict + + def create_matti_task_files_list(self, enabler=None, asset_path=None): + """ + Creates list of files needed to include in MATTI execution tasks + if sierra.enabled then + profiles (.sip files) are included + else + all ruby (.rb) files are included + """ + + profiles = [] + rb_files = [] + + #If sierra engine is enabled (set to True) + if self.sierra_enabled.lower() == "true": + profile_path = path(os.path.join(asset_path, "profile")) + if os.path.exists(profile_path): + for profile_name in self.test_profiles: + item = list(profile_path.walkfiles("%s.sip"%profile_name.lower().strip())) + if len(item) > 0: + #profiles.append(os.path.join(profile_path, item[0])) + profiles.append(asset_path.rsplit(os.sep, 1)[1] + "/" + "profile" + "/" + item[0].rsplit(os.sep, 1)[1]) + return profiles + else: #If sierra engine is not enabled (set to False) + if os.path.exists(asset_path): + #returns list(asset_path.walkfiles("*.rb")): + for item in list(asset_path.walkfiles("*.rb")): + rb_files.append(asset_path.rsplit(os.sep, 1)[1] + "/" + item.rsplit(os.sep, 1)[1]) + # Sorting the result, so we ensure they are always in similar order. + rb_files.sort() + return rb_files + + def create_install_files_list(self, asset_path=None): + """ + Collects all the .pkg files and extract data + Creates a list of src, dst files. + """ + pkg_files = [] + if os.path.exists(asset_path): + pkg_files = list(asset_path.walkfiles("*.pkg")) + return self.pkg_parser.get_data_files(pkg_files, self.build_drive) + else: + return None + + def __getitem__(self, key): + return self.__dict__[key] + + + +class MattiTestDropGenerator(object): + """ + Generate test drop zip file for Matti. + + Generates drop zip files file from Test Assets. The main + responsibility of this class is to create testdrop and test.xml + file and build a zip file for the MATTI drop. + + """ + + def __init__(self): + self.drop_path_root = path("MATTIDrop") + self.drop_path = None + self.defaults = {} + + def generate(self, xml_dict, output_file, template_loc=None): + """Generate a test drop file.""" + xml = self.generate_xml(xml_dict, template_loc) + return self.generate_drop(xml_dict, xml, output_file) + + def generate_drop(self, xml_dict, xml, output_file): + """Generate test drop zip file.""" + + zfile = zipfile.ZipFile(output_file, "w", zipfile.ZIP_DEFLATED) + try: + for drop_file, src_file in self.drop_files(xml_dict): + + _logger.info(" + Adding: %s" % src_file.strip()) + try: + zfile.write(src_file.strip(), drop_file.encode('utf-8')) + except OSError, expr: + _logger.error(expr) + doc = amara.parse(et.tostring(xml.getroot())) + _logger.debug("XML output: %s" % doc.xml(indent=u"yes", encoding="ISO-8859-1")) + zfile.writestr("test.xml", doc.xml(indent="yes", encoding="ISO-8859-1")) + finally: + _logger.info("Matti testdrop created successfully!") + zfile.close() + + def generate_xml(self, xml_dict, template_loc): + """ generate an XML file""" + template_loc = path(template_loc).normpath() + loader = jinja2.ChoiceLoader([jinja2.PackageLoader(__name__, 'templates')]) + env = jinja2.Environment(loader=loader) + if template_loc is None or not ".xml" in template_loc.lower(): + template = env.from_string(pkg_resources.resource_string(__name__, 'matti_template.xml'))# pylint: disable=E1101 + else: + template = env.from_string(open(template_loc).read())# pylint: disable=E1101 + + xmltext = template.render(xml_dict=xml_dict, os=os, atspath=atspath, atsself=self).encode('ISO-8859-1') + #print xmltext + return et.ElementTree(et.XML(xmltext)) + + + def generate_testasset_zip(self, xml_dict, output_file=None): + """Generate TestAsset.zip for the MATTI server""" + filename = xml_dict["temp_directory"].joinpath(r"TestAsset.zip") + + if output_file != None: + filename = output_file + + for exe_block in xml_dict["execution_blocks"]: + testasset_location = path(exe_block["asset_path"]) + + zfile = zipfile.ZipFile(filename, "w", zipfile.ZIP_DEFLATED) + try: + for file_ in list(testasset_location.walkfiles()): + file_mod = file_.replace(testasset_location, "") + zfile.write(file_, file_mod.encode('utf-8')) + finally: + zfile.close() + return filename + + def drop_files(self, xml_dict): + """Yield a list of drop files.""" + + drop_set = set() + drop_files = [] + + #Adding test asset, there's an execution block for every test asset + for execution_block in xml_dict["execution_blocks"]: + testasset_location = path(execution_block["asset_path"]) + asset_files = list(testasset_location.walkfiles()) + + drop_path = path(execution_block["name"]) + + drop_files = ((drop_path.parent, "images", execution_block["image_files"]), + (drop_path.parent, "sisfiles", execution_block["matti_sis_files"]), + (drop_path.parent, "mattiparameters", execution_block["matti_parameters"]), + (drop_path.parent, execution_block["name"], asset_files)) + + for drop_dir, sub_dir, files in drop_files: + for file_path in files: + if file_path != None: + + #Adding image files to the top level, + #Also adding mattiparameters.xml file + if sub_dir.lower() == "images" or sub_dir.lower() == "mattiparameters": + drop_file = drop_dir.joinpath(sub_dir, file_path.name) + + #Adding sisfiles, installation of matti sisfiles is a bit different + #than normal sisfiles + elif sub_dir.lower() == "sisfiles": + drop_file = drop_dir.joinpath(sub_dir, path(file_path[0]).name) + file_path = path(file_path[0]) + + #Adding test asset files + else: + temp_file = file_path.rsplit(os.sep, 1)[0] + replace_string = testasset_location.rsplit(os.sep, 1)[0] + drop_file = drop_dir.joinpath(sub_dir + "\\" + temp_file.replace(replace_string, ""), file_path.name) + + drop_file = drop_file.normpath() + if drop_file not in drop_set: + drop_set.add(drop_file) + yield (drop_file, file_path.normpath()) + + +class MattiComponentParser(object): + """ + Add information to the XML dictionary + """ + def __init__(self, config): + self.flash_images = [path(p) for p in config.flash_images] + self.matti_parameters = [path(config.matti_parameters).normpath()] + self.matti_sis_files = config.matti_sis_files + self.build_drive = config.build_drive + self.test_timeout = config.matti_timeout + self.diamonds_build_url = config.diamonds_build_url + self.testrun_name = config.testrun_name + self.alias_name = config.alias_name + self.device_type = config.device_type + self.report_email = config.report_email + self.email_format = config.email_format + self.email_subject = config.email_subject + + self.xml_dict = {} + + + def insert_pre_data(self): + """ + Creates a dictionary for the data before + the block starts. + """ + self.xml_dict = dict(self.xml_dict, temp_directory=path(tempfile.mkdtemp())) + self.xml_dict = dict(self.xml_dict, diamonds_build_url=self.diamonds_build_url) + self.xml_dict = dict(self.xml_dict, testrun_name=self.testrun_name) + self.xml_dict = dict(self.xml_dict, alias_name=self.alias_name) + self.xml_dict = dict(self.xml_dict, device_type=self.device_type) + + def create_execution_block(self, config): + """Parse flash images and creates execution block for matti""" + execution_block_list = [] + block_count = 0 + for test_asset in config.test_assets: + if os.path.exists(test_asset): + test_plan = MattiTestPlan(config) + block_count += 1 + execution_block_list.append(test_plan.insert_execution_block(block_count, self.flash_images, self.matti_sis_files, test_asset, self.matti_parameters)) + + + self.xml_dict = dict(self.xml_dict, execution_blocks=execution_block_list) + + def insert_post_data(self): + """ + Creates a dictionary for the data after + the block ends. Or, Postaction data + """ + self.xml_dict = dict(self.xml_dict, report_email=self.report_email) + self.xml_dict = dict(self.xml_dict, email_format=self.email_format) + self.xml_dict = dict(self.xml_dict, email_subject=self.email_subject) + + return self.xml_dict + +def create_drop(config): + """Create a test drop.""" + xml_dict = {} + + _logger.debug("initialize Matti dictionary") + drop_parser = MattiComponentParser(config) + + #Inserting data for test run and global through out the dictionary + drop_parser.insert_pre_data() + + #for every asset path there should be a + #separate execution block + drop_parser.create_execution_block(config) + + #Inserting reporting and email data (post actions) + xml_dict = drop_parser.insert_post_data() + + generator = MattiTestDropGenerator() + + _logger.info("generating drop file: %s" % config.drop_file) + generator.generate(xml_dict, output_file=config.drop_file, template_loc=config.template_loc) + +def to_bool(param): + """setting a true or false based on a param value""" + param = str(param).lower() + if "true" == param or "t" == param or "1" == param: + return "True" + else: + return "False" + +def main(): + """Main entry point.""" + + + cli = OptionParser(usage="%prog [options] PATH1 [PATH2 [PATH3 ...]]") + cli.add_option("--ats4-enabled", help="ATS4 enabled", default="True") + cli.add_option("--build-drive", help="Build area root drive") + cli.add_option("--drop-file", help="Name for the final drop zip file", default="MATTIDrop.zip") + + cli.add_option("--minimum-flash-images", help="Minimum amount of flash images", default=2) + cli.add_option("--flash-images", help="Paths to the flash image files", default="") + cli.add_option("--matti-sis-files", help="Sis files location", default="") + + cli.add_option("--testasset-location", help="MATTI test assets location", default="") + cli.add_option("--template-loc", help="Custom template location", default="") + cli.add_option("--sierra-enabled", help="Enabled or disabled Sierra", default=True) + cli.add_option("--test-profiles", help="Test profiles e.g. bat, fute", default="") + cli.add_option("--matti-parameters", help="Location of xml file contains additional parameters for Matti", default="") + + cli.add_option("--matti-timeout", help="Test execution timeout value (default: %default)", default="60") + cli.add_option("--sierra-parameters", help="Additional sierra parameters for matti task", default="") + cli.add_option("--file-store", help="Destination path for reports.", default="") + cli.add_option("--report-email", help="Email notification receivers", default="") + cli.add_option("--testrun-name", help="Name of the test run", default="run") + cli.add_option("--alias-name", help="Name of the alias", default="sut_s60") + cli.add_option("--device-type", help="Device type (e.g. 'PRODUCT')", default="unknown") + cli.add_option("--diamonds-build-url", help="Diamonds build url") + cli.add_option("--email-format", help="Format of an email", default="") + cli.add_option("--email-subject", help="Subject of an email", default="Matti Testing") + + + cli.add_option("--verbose", help="Increase output verbosity", action="store_true", default=False) + + opts, _ = cli.parse_args() + + ats4_enabled = to_bool(opts.ats4_enabled) + + if ats4_enabled == "False": + cli.error("MATTI tests execute on ATS4. Set property 'ats4.enabled'") + + if not opts.flash_images: + cli.error("no flash image files given") + if len(opts.flash_images.split(",")) < int(opts.minimum_flash_images): + cli.error("Not enough flash files: %i defined, %i needed" % (len(opts.flash_images.split(",")), int(opts.minimum_flash_images) )) + + if opts.verbose: + _logger.setLevel(logging.DEBUG) + logging.basicConfig(level=logging.DEBUG) + _ = tempfile.mkdtemp() + config = Configuration(opts) + create_drop(config) + +if __name__ == "__main__": + main() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/matti_template.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/matti_template.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,154 @@ + + + + + + {% if xml_dict['diamonds_build_url'] -%} + {{ xml_dict['diamonds_build_url'] }} + Smoke + {% endif %} + {{ xml_dict['testrun_name'] }} + + + + + + + + + + {% for exe_block in xml_dict['execution_blocks'] -%} + + + + {% if exe_block['image_files'] -%} + + FlashTask + + {% set i = 1 %} + {% for img in exe_block['image_files'] -%} + + {% set i = i + 1 %} + {% endfor -%} + + + {% endif %} + + + {% if exe_block['install_files'] != [] -%} + {% for file in exe_block['install_files'] -%} + + FileUploadTask + + + + + + {% endfor -%} + {% endif %} + + {% if exe_block['matti_sis_files'] != [] -%} + {% for sisfile in exe_block['matti_sis_files'] -%} + + FileUploadTask + + + + + + {% endfor -%} + {% endif %} + + {% for sis_file in exe_block["matti_sis_files"] -%} + + InstallSisTask + + + + + + + + + + + + + + + + + + + + {%- endfor -%} + + + RebootTask + + + + CreateDirTask + + + + + + + {% for task_file in exe_block["matti_task_files"] -%} + + MATTITask + + + + + + + + + {% endfor -%} + + + + CleanupTask + + + + + + + {% endfor -%} + + + + EmailAction + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/parsers.py Mon Sep 13 13:11:19 2010 +0800 @@ -22,10 +22,6 @@ """ The ATS related parsers """ -# pylint: disable-msg=W0142,W0102 -# pylint: disable-msg=C0302 -# pylint: disable-msg=R0201,R0912,R0915,R0911,R0902 - #W0142 => * and ** were used #W0102 => Dangerous default value [] as argument #C0302 => Too many lines @@ -70,7 +66,7 @@ def __init__(self): self.path_to_build = "" - def get_cpp_output(self, bld_path = None, output_parameter = "n", imacros = None): + def get_cpp_output(self, bld_path = None, output_parameter = "n", imacros = None, bld_drive=None): """ To clean out conditionals from the compilation it is necessary to use C preprocessing to clean out those. @@ -90,8 +86,8 @@ else: os.chdir(os.path.normpath(os.path.join(bld_path))) - if imacros is not None: - includedir = os.path.join(os.path.splitdrive(bld_path)[0] + os.sep, 'epoc32', 'include') + if imacros and bld_drive: + includedir = os.path.join(bld_drive + os.sep, 'epoc32', 'include') command = r"cpp -imacros %s -I %s bld.inf" % (str(imacros), includedir) else: command = u"cpp bld.inf" @@ -198,6 +194,7 @@ test_sets[t_case[1]]['content'][t_case[1]]['harness'] = harness test_sets[t_case[1]]['content'][t_case[1]]['pkg_files'] = pkg_parser.get_pkg_files(t_case[1], False) test_sets[t_case[1]]['content'][t_case[1]]['mmp_files'] = bld_parser.get_test_mmp_files(t_case[1], False) + test_sets[t_case[1]]['content'][t_case[1]]['dll_files'] = mmp_parser.get_dll_files(t_case[1]) else: for key, value in test_sets.items(): if t_case[0] in value['content'].keys(): @@ -208,6 +205,7 @@ test_sets[key]['content'][t_case[1]]['harness'] = harness test_sets[key]['content'][t_case[1]]['pkg_files'] = pkg_parser.get_pkg_files(t_case[1], False) test_sets[key]['content'][t_case[1]]['mmp_files'] = bld_parser.get_test_mmp_files(t_case[1], False) + test_sets[key]['content'][t_case[1]]['dll_files'] = mmp_parser.get_dll_files(t_case[1]) else: test_sets[t_case[1]] = {} test_sets[t_case[1]]['content'] = {} @@ -216,6 +214,7 @@ test_sets[t_case[1]]['content'][t_case[1]]['harness'] = harness test_sets[t_case[1]]['content'][t_case[1]]['pkg_files'] = pkg_parser.get_pkg_files(t_case[1], False) test_sets[t_case[1]]['content'][t_case[1]]['mmp_files'] = bld_parser.get_test_mmp_files(t_case[1], False) + test_sets[t_case[1]]['content'][t_case[1]]['dll_files'] = mmp_parser.get_dll_files(t_case[1]) os.chdir(temp_path) if test_sets == {}: @@ -430,6 +429,59 @@ if mmp file is not given, the function will try to find the file(s) on the given location with extension ".mmp" """ return self.read_information_from_mmp(path_to_mmp, 7) + + def get_dll_files(self, path_to_mmp = None): + """ + Returns the dll files and their harness of the test component + """ + return self.read_information_from_mmp(path_to_mmp, 8) + + def get_mmp_harness(self, libraries=None): + """ + Harness was actually calculated at the test component level, it has to be calculated at the + mmp file level and it has to be stored as "dll file":"harness" in a dictionary so that while writing + execute step in test.xml; the dlls which doesn't have any harness are skipped from being written. + + This method identifies the harness from the given list of list libraries found in mmp file under LIBRARY tag(s) + Returns the harness of the libraries in mmp file + """ + stif = False + eunit = False + stifunit = False + generic = False + if libraries: + if "stiftestinterface.lib" in libraries: + stif = True + if "eunit.lib" in libraries or "qttest.lib" in libraries: + eunit = True + if "stifunit.lib" in libraries: + stifunit = True + elif "testexecuteutils.lib" in libraries or 'testframeworkclient.lib' in libraries or 'rtest' in libraries or 'symbianunittestfw.lib' in libraries: + generic = True + + return self.select_harness(generic, stif, eunit, stifunit) + + + def select_harness(self, generic, stif, eunit, stifunit): + """ + return the harness based on the Test Framework + """ + harness = "" + if generic: + harness = "GENERIC" + elif stif and eunit: + #_logger.warning("both eunit.lib and stiftestinterface.lib listed in mmp file - choosing STIF.") + harness = "STIF" + elif stif and not eunit: + harness = "STIF" + elif eunit and not stif: + harness = "EUNIT" + elif stifunit and not stif and not eunit: + harness = "STIFUNIT" + + return harness + + def read_information_from_mmp(self, path_to_mmp, flag = 0): """ @@ -444,19 +496,17 @@ 5 - libraries 6 - harness (in case of test component) 7 - mmpfilename + 8 - dictionary of dll files and their harness """ filename = "" filetype = "" dll_type = "" + libs = [] + dll_files = {} libraries = [] lst_mmp_paths = [] - harness = "" - stif = False - eunit = False - stifunit = False - tef = False self.path_to_mmp = path_to_mmp try: if isinstance(path_to_mmp, list): @@ -472,6 +522,7 @@ lst_mmp_paths.append(self.path_to_mmp) for mmp in lst_mmp_paths: + mmp_harness = "" mmp_file = open(mmp, 'r') for line in mmp_file: if re.match(r"\A(target\s).*([.]\w+)", line.lower().strip()): @@ -481,33 +532,19 @@ elif re.match(r"\A(targettype\s).*", line.lower().strip()): found = re.findall(r"\Atargettype[\s]*(\w+)", line.lower()) if found: - filetype = found[0] - - libraries = libraries + re.findall(r"\b(\w+[.]lib)\b", mmp.text().lower()) + filetype = found[0] + libs = [] + libs = re.findall(r"\b(\w+[.]lib)\b", mmp.text().lower()) + # get harness for a mmp/dll file + mmp_harness = self.get_mmp_harness(libs) + # store the harness of every dll file, later to be used while writing test.xml execute steps + dll_files[filename] = mmp_harness + libraries = libraries + libs if '//rtest' in mmp.text().lower() or '* rtest' in mmp.text().lower() or '// rtest' in mmp.text().lower(): libraries.append('rtest') - - if libraries: - if "stiftestinterface.lib" in libraries: - stif = True - if "eunit.lib" in libraries or "qttest.lib" in libraries: - eunit = True - if "stifunit.lib" in libraries: - stifunit = True - elif "testexecuteutils.lib" in libraries or 'testframeworkclient.lib' in libraries or 'rtest' in libraries: - tef = True - - if tef: - harness = "GENERIC" - elif stif and eunit: - #_logger.warning("both eunit.lib and stiftestinterface.lib listed in mmp file - choosing STIF.") - harness = "STIF" - elif stif and not eunit: - harness = "STIF" - elif eunit and not stif: - harness = "EUNIT" - elif stifunit and not stif and not eunit: - harness = "STIFUNIT" + + # get harness for one (sub)component file + harness = self.get_mmp_harness(libraries) if harness is "": dll_type = "dependent" @@ -518,23 +555,27 @@ except: traceback.print_exc() - finally: + else: + returnvals = None if flag == 0: - return (filename, filetype, libraries, harness) + returnvals = (filename, filetype, libraries, harness) elif flag == 1: - return (filename, filetype, libraries) + returnvals = (filename, filetype, libraries) elif flag == 2: - return (filename, filetype) + returnvals = (filename, filetype) elif flag == 3: - return filename + returnvals = filename elif flag == 4: - return filetype + returnvals = filetype elif flag == 5: - return libraries + returnvals = libraries elif flag == 6: - return harness + returnvals = harness elif flag == 7: - return dll_type + returnvals = dll_type + elif flag == 8: + returnvals = dll_files + return returnvals class PkgFileParser(object): """ @@ -545,9 +586,10 @@ for every file in the pkg file """ - def __init__(self, bldpath, platform = None, specific_pkg = None, drive=''): + def __init__(self, bldpath = None, platform = None, specific_pkg = None, drive=''): self.platform = platform self.build_platform = None + self.build_target = None if self.platform is not None and "_" in self.platform: plat_tar = re.search(r"(.*)_(.*).pkg", self.platform) self.build_platform, self.build_target = plat_tar.groups() @@ -619,7 +661,7 @@ self.exclude = exclude self._files = [] - if type(location) is not list: + if type(location).__name__ != 'list': locations = [location] else: locations = location @@ -628,7 +670,7 @@ #if location is already a file if ".pkg" in str(_file_).lower(): - self._files = _file_ + self._files.append(_file_) else: self.location = path(_file_) @@ -657,11 +699,12 @@ result = re.search(r'^\s*"(.*?)".*?-.*?"(.*?)"', pkg_line) if result is None: + if pkg_line.startswith('"'): + _logger.warning(pkg_line.strip() + ' line not valid pkg format in ' + pkg_file) return None val1, val2 = result.groups() if val1 != "": - #replacing delimiters (${platform} and ${target}) in PKG file templates, #for instance, QT tests PKG files have delimeters if "$(platform)" in val1.lower() and self.build_platform is not None: @@ -669,13 +712,20 @@ if "$(target)" in val1.lower() and self.build_target is not None: val1 = val1.lower().replace("$(target)", self.build_target) - if path.isabs(path(val1).normpath()): - map_src = os.path.normpath(os.path.join(self.drive, val1)) - elif re.search(r"\A\w", val1, 1): - map_src = str(path.joinpath(self.pkg_file_path + os.sep, os.path.normpath(val1)).normpath()) + #For MATTI PKG files in which location of the data files are unknown or can be changed + if "[PKG_LOC]" in val1.upper(): + val1 = val1.replace("[PKG_LOC]", self.pkg_file_path) + + if os.path.exists(val1): + map_src = os.path.abspath(val1) else: - map_src = str(path.joinpath(self.pkg_file_path, path(val1)).normpath()) - map_dst = str(path(val2).normpath()) + if os.path.isabs(os.path.normpath(val1)): + map_src = os.path.normpath(os.path.join(self.drive, val1)) + elif re.search(r"\A\w", val1, 1): + map_src = os.path.normpath(os.path.join(self.pkg_file_path + os.sep, os.path.normpath(val1))) + else: + map_src = os.path.normpath(os.path.join(self.pkg_file_path, val1)) + map_dst = os.path.normpath(val2) else: map_src, map_dst = val1, val2 map_src = map_src.strip() @@ -710,7 +760,10 @@ if "qttest.lib" in _libraries_: file_type = "data" + ":qt:dependent" else: - file_type = "testmodule" + if 'symbianunittestfw.lib' in _libraries_: + file_type = "testmodule:sut" + else: + file_type = "testmodule" elif ext == 'exe' and 'rtest' in _libraries_: file_type = "testmodule:rtest" @@ -731,9 +784,22 @@ file_type = "pmd" elif ext == "script": if "testframeworkclient.lib" in _libraries_: - file_type = "testscript:mtf" + file_type = "testscript:mtf:testframework.exe" else: - file_type = "testscript" + file_type = "testscript:testexecute.exe" + if ',' in pkg_line: + exename = pkg_line.split(',')[1].strip() + if exename == 'install_only': + file_type = "data" + elif exename == 'testframework.exe': + file_type = "testscript:mtf:" + exename + elif exename == 'testexecute.exe': + file_type = "testscript:" + exename + else: + if "testframeworkclient.lib" in _libraries_: + file_type = "testscript:mtf:" + exename + else: + file_type = "testscript:" + exename else: file_type = "data" @@ -747,6 +813,9 @@ def read_pkg_file(self, pkg_files): """Reads contents of PKG file""" pkg_paths = [] + if type(pkg_files).__name__ != "list": + pkg_files = [pkg_files] + for pkg_file in pkg_files: if not os.path.exists( pkg_file ): _logger.error("No PKG -file in path specified") @@ -758,7 +827,8 @@ except UnicodeError: file1 = open(pkg_file, 'r') lines = file1.readlines() - pkg_file_path = path(os.path.dirname(pkg_file)) + + pkg_file_path = path((pkg_file.rsplit(os.sep, 1))[0]) for line in lines: pkg_path = self.__map_pkg_path(line, pkg_file_path, os.path.basename(pkg_file)) if pkg_path is None: @@ -766,4 +836,4 @@ else: pkg_paths.append(pkg_path) - return pkg_paths \ No newline at end of file + return pkg_paths diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/templates/ats4_macros.xml Mon Sep 13 13:11:19 2010 +0800 @@ -19,7 +19,6 @@ ============================================================================ --> - {% macro ctc_initialization() -%} CreateDirTask @@ -31,6 +30,7 @@ NonTestExecuteTask + {%- endmacro %} @@ -41,6 +41,7 @@ + @@ -48,24 +49,19 @@ + - - {% if test_plan["ctc_run_process_params"].strip() != "" -%} - FileDownloadTask - - - - - - {% endif %} - - - FileDownloadTask - - - + + CTCDATA + + FileDownloadTask + + + + + {%- endmacro %} @@ -76,23 +72,25 @@ StifRunCasesTask - - - + + + - {% else %} + {% else -%} AtsInterfaceTask - - - - + + + + + + - {% endif %} - {% else %} + {%- endif %} + {% else -%} {% for file in setd['src_dst'] -%} {% if setd["test_harness"] == "STIF" or setd["test_harness"] == "STIFUNIT" -%} {% if file[2] == "conf" and ".dll" not in file[1].lower() -%} @@ -100,120 +98,129 @@ StifRunCasesTask - - - - + + + + - {% else %} + {% else -%} AtsInterfaceTask - - - - + + + + + + - {% endif %} - {% endif %} + {%- endif %} + {%- endif %} {% if file[2] == "testmodule" -%} {% if test_plan['hti'] == 'True' -%} StifRunCasesTask - - - + + + - {% else %} + {% else -%} AtsInterfaceTask - - - - + + + + + + - {% endif %} - {% endif %} - {% endif %} - {% endfor -%} - {% endif %} + {%- endif %} + {%- endif %} + {%- endif %} + {%- endfor %} + {%- endif %} {%- endmacro %} - {% macro generate_runsteps_stif_single_set(setd) -%} {% if setd["engine_ini_file"] != None -%} {% if test_plan['hti'] == 'True' -%} StifRunCasesTask - - - + + + - {% else %} + {% else -%} AtsInterfaceTask - - - - + + + + + + - {% endif %} + {%- endif %} {% elif setd["config_files"] != [] -%} {% for config_file in setd["config_files"] -%} {% if test_plan['hti'] == 'True' -%} StifRunCasesTask - - - - + + + + - {% else %} + {% else -%} AtsInterfaceTask - - - - + + + + + + - {% endif %} - {% endfor -%} - {% else %} + {%- endif %} + {%- endfor %} + {% else -%} {% for testmodule_file in setd["testmodule_files"] -%} {% if test_plan['hti'] == 'True' -%} StifRunCasesTask - - - + + + - {% else %} + {% else -%} AtsInterfaceTask - - - - + + + + + + - {% endif %} - {% endfor -%} - {% endif %} + {%- endif %} + {%- endfor %} + {%- endif %} {%- endmacro %} \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ats3/testconfigurator.py --- a/buildframework/helium/sf/python/pythoncore/lib/ats3/testconfigurator.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ats3/testconfigurator.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ """Parse Symbian SW component for ATS3 testing related information""" -# pylint: disable-msg=R0902,R0912,R0901,R0915,R0201 + #R* remove during refactoring from path import path # pylint: disable-msg=F0401 @@ -100,6 +100,7 @@ src_dst = [] pmd_files = [] trace_activation_files = [] + dll_files = {} if not os.path.exists( self.tsrc_dir ): _logger.error("Missing test source directory: %s", self.tsrc_dir) @@ -135,6 +136,10 @@ elif test_harness == "EUNIT": try: src_dst = pkg_parser.get_data_files(self.tsrc_pkg_files(_paths_dict_), self.build_drive) + #collecting dll files and their harness for the test component, it will be + # compared while writing 'execute' step in the test.xml generation + for sub_component in _paths_dict_[tsrc_dir]['content'].keys(): + dll_files.update(_paths_dict_[tsrc_dir]['content'][sub_component]['dll_files']) except OSError: _logger.warning("No pkg file found in the directory ( %s )" % self.tsrc_pkg_dir) @@ -187,6 +192,7 @@ pmd_files=pmd_files, trace_activation_files=trace_activation_files, custom_dir=self.custom_dir, + dll_files=dll_files, component_path=tsrc_dir) else: test_plan.insert_set(image_files=self.flash_images, @@ -195,6 +201,7 @@ test_harness=test_harness, src_dst=src_dst, custom_dir=self.custom_dir, + dll_files = dll_files, component_path=tsrc_dir) else: if self.trace_enabled == "True": @@ -210,6 +217,7 @@ pmd_files=pmd_files, trace_activation_files=trace_activation_files, custom_dir=self.custom_dir, + dll_files = dll_files, component_path=tsrc_dir) else: test_plan.insert_set(image_files=self.flash_images, @@ -218,13 +226,16 @@ test_harness=test_harness, src_dst=src_dst, custom_dir=self.custom_dir, + dll_files = dll_files, component_path=tsrc_dir) def check_dll_duplication(self, _dll_file_, _src_dst_ ): """Checks if the dll is already in the dictionary, created by pkg file""" for item in _src_dst_: first = item[0] - return _dll_file_.lower() in first.lower() + if _dll_file_.lower() in first.lower(): + return True + return False @property def tsrc_bld_dir(self): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/atsant.py --- a/buildframework/helium/sf/python/pythoncore/lib/atsant.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/atsant.py Mon Sep 13 13:11:19 2010 +0800 @@ -26,6 +26,7 @@ import os import logging import configuration +import amara _logger = logging.getLogger('atsant') @@ -36,7 +37,7 @@ self.productname = productname self.config = self.getconfig() - def getconfig(self, type=None, productname=None): + def getconfig(self, type_=None, productname=None): """get configuration""" noncust = None for root, _, files in os.walk(self.imagesdir, topdown=False): @@ -46,12 +47,12 @@ configBuilder = configuration.NestedConfigurationBuilder(open(filePath, 'r')) configSet = configBuilder.getConfiguration() for config in configSet.getConfigurations(): - if type and productname: - if type in config.type and config['PRODUCT_NAME'] in productname: + if type_ and productname: + if type_ in config.type and config['PRODUCT_NAME'].lower() in productname.lower(): return config else: noncust = config - if type: + if type_: return None if noncust: return noncust @@ -68,7 +69,7 @@ def findimages(self): """find images""" output = '' - for imagetype, imagetypename in [('core', 'CORE'), ('langpack', 'ROFS2'), ('cust', 'ROFS3'), ('udaerase', 'UDAERASE')]: + for imagetype, imagetypename in [('core', 'CORE'), ('langpack', 'ROFS2'), ('cust', 'ROFS3'), ('udaerase', 'UDAERASE'), ('emmc', 'EMMC')]: iconfigxml = self.getconfig(imagetype, self.productname) if iconfigxml == None: iconfigxml = self.config @@ -98,52 +99,64 @@ return retVal -def files_to_test(canonicalsysdeffile, excludetestlayers, idobuildfilter, builddrive, createmultipledropfiles): +def files_to_test(canonicalsysdeffile, excludetestlayers, idobuildfilter, builddrive, createmultipledropfiles, sysdef3=False): """list the files to test""" - sdf = sysdef.api.SystemDefinition(canonicalsysdeffile) - - single_key = 'singledropfile' #default single drop file name modules = {} - for layr in sdf.layers: - if re.match(r".*_test_layer$", layr): -# pylint: disable-msg=W0704 - try: - if re.search(r"\b%s\b" % layr, excludetestlayers): + if sysdef3 == True: + sdf = amara.parse(open(canonicalsysdeffile)) + for package in sdf.SystemDefinition.systemModel.package: + for collection in package.collection: + if hasattr(collection, 'component'): + for component in collection.component: + print component.id + if get_boolean(createmultipledropfiles): + group = 'singledropfile' + else: + group = 'default' + if hasattr(component, 'meta') and hasattr(component.meta, 'group'): + if not group.lower() == 'singledropfile': + group = component.meta.group[0].name + if hasattr(component, 'unit'): + for unit in component.unit: + if group not in modules: + modules[group] = [] + modules[group].append(builddrive + os.sep + unit.bldFile) + else: + sdf = sysdef.api.SystemDefinition(canonicalsysdeffile) + + single_key = 'singledropfile' #default single drop file name + + for layr in sdf.layers: + if re.match(r".*_test_layer$", layr): + if excludetestlayers and re.search(r"\b%s\b" % layr, excludetestlayers): continue - except TypeError: #needed to catch exceptions and not have them printed - pass -# pylint: enable-msg=W0704 - - layer = sdf.layers[layr] - for mod in layer.modules: - if get_boolean(createmultipledropfiles): #creating single drop file? - if single_key not in modules: #have we already added the key to the dictionary? - modules[single_key] = [] #no so add it - elif mod.name not in modules: - modules[mod.name] = [] - single_key = mod.name #change the key name to write to modules - for unit in mod.units: - include_unit = True - if idobuildfilter != None: - if idobuildfilter != "": - include_unit = False - if hasattr(unit, 'filters'): - if len(unit.filters) > 0: - for afilter in unit.filters: - if re.search(r"\b%s\b" % afilter, idobuildfilter): - include_unit = True - else: - include_unit = False - elif len(unit.filters) == 0: - include_unit = True + layer = sdf.layers[layr] + for mod in layer.modules: + if get_boolean(createmultipledropfiles): #creating single drop file? + if single_key not in modules: #have we already added the key to the dictionary? + modules[single_key] = [] #no so add it + elif mod.name not in modules: + modules[mod.name] = [] + single_key = mod.name #change the key name to write to modules + for unit in mod.units: + include_unit = True + if idobuildfilter != None: + if idobuildfilter != "": + include_unit = False + if hasattr(unit, 'filters'): + if len(unit.filters) > 0: + for afilter in unit.filters: + include_unit = re.search(r"\b%s\b" % afilter, idobuildfilter) + elif len(unit.filters) == 0: + include_unit = True + else: + include_unit = False else: include_unit = False - else: - include_unit = False - if hasattr(unit, 'filters'): - if len(unit.filters) == 0: - include_unit = True - if include_unit: - modules[single_key].append(os.path.join(builddrive + os.sep, unit.path)) + if hasattr(unit, 'filters'): + if len(unit.filters) == 0: + include_unit = True + if include_unit: + modules[single_key].append(builddrive + os.sep + unit.path) return modules diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/bomtofile.py --- a/buildframework/helium/sf/python/pythoncore/lib/bomtofile.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/bomtofile.py Mon Sep 13 13:11:19 2010 +0800 @@ -19,8 +19,7 @@ """build of Materials to file writer""" class BOMWriter(object): - """ - Read BOM and output in text + """ Read BOM and output in text. """ def __init__(self, session, project_name, project, output_dir): self.project_name = project_name @@ -48,16 +47,14 @@ fileout.write(str(i) + ") " + str(project) + "\n") cmproject = self.session.create(str(project)) + + baseline = str(cmproject.baseline).strip() + if baseline == "None": + fileout.write(str(i) + ") " + str(project) + "\n") + else: + fileout.write(str(i) + ") " + baseline + "\n") + i += 1 - try: - baseline = str(cmproject.baseline).strip() - if baseline == "None": - fileout.write(str(i) + ") " + str(project) + "\n") - else: - fileout.write(str(i) + ") " + baseline + "\n") - i += 1 - except Exception, ex: - print ex fileout.close() def writetasks(self): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/build/model.py --- a/buildframework/helium/sf/python/pythoncore/lib/build/model.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/build/model.py Mon Sep 13 13:11:19 2010 +0800 @@ -30,8 +30,8 @@ # Uncomment this line to enable logging in this module, or configure logging elsewhere _logger = logging.getLogger("bom") -#_logger.setLevel(logging.DEBUG) -logging.basicConfig(level=logging.DEBUG) +_logger.setLevel(logging.INFO) +#logging.basicConfig(level=logging.DEBUG) class SessionCreator(object): @@ -63,7 +63,7 @@ self.config = config self.build = "" self._projects = [] - self._icd_icfs = [] + self.icd_icfs = [] self._flags = [] self._capture_icd_icfs() @@ -95,8 +95,8 @@ if file_.endswith(exclude): excluded = True if file_.endswith('.zip') and not excluded: - self._icd_icfs.append(file_) - self._icd_icfs.sort(key=str) + self.icd_icfs.append(file_) + self.icd_icfs.sort(key=str) def _capture_flags(self): """capture flags""" @@ -414,16 +414,6 @@ def __str__(self): """ String representation. """ return str(self.ccm_task) - - -class ICD_ICF(object): - """ A ICD or ICF patch zip file provided by Symbian. """ - pass - - -class Flag(object): - """ A compilation flag. """ - pass class BOMDeltaXMLWriter(object): @@ -439,7 +429,7 @@ """ Write the BOM delta information to an XML file. """ bom_log = amara.parse(open(self._bom_log, 'r')) doc = amara.create_document(u'bomDelta') - # pylint: disable-msg=E1101 + # pylint: disable=E1101 doc.bomDelta.xml_append(doc.xml_create_element(u'buildFrom', content=unicode(bom_log.bom.build))) doc.bomDelta.xml_append(doc.xml_create_element(u'buildTo', content=unicode(self._bom.config['build.id']))) content_node = doc.xml_create_element(u'content') @@ -601,7 +591,7 @@ def write(self, path): """ Write the BOM information to an XML file. """ doc = amara.create_document(u'bom') - # pylint: disable-msg=E1101 + # pylint: disable=E1101 doc.bom.xml_append(doc.xml_create_element(u'build', content=unicode(self._bom.config['build.id']))) doc.bom.xml_append(doc.xml_create_element(u'content')) for project in self._bom.projects: @@ -639,7 +629,7 @@ fix_node = doc.xml_create_element(u'fix', content=(unicode(task)), attributes = {u'type': unicode(fix.__class__.__name__)}) project_node.xml_append(fix_node) - if self._bom._icd_icfs != []: + if self._bom.icd_icfs != []: # Add ICD info to BOM doc.bom.content.xml_append(doc.xml_create_element(u'input')) @@ -653,12 +643,14 @@ doc.bom.content.input.xml_append(doc.xml_create_element(u'icds')) - # pylint: disable-msg=R0914 - for i, icd in enumerate(self._bom._icd_icfs): + # pylint: disable=R0914 + for i, icd in enumerate(self._bom.icd_icfs): doc.bom.content.input.icds.xml_append(doc.xml_create_element(u'icd')) doc.bom.content.input.icds.icd[i].xml_append(doc.xml_create_element(u'name', content=(unicode(icd)))) #If currentRelease.xml exists then send s60 tag to diamonds current_release_xml_path = self._bom.config['currentRelease.xml'] + # data from the metadata will go first as they must be safer than the one + # given by the user if current_release_xml_path is not None and os.path.exists(current_release_xml_path): metadata = symrec.ReleaseMetadata(current_release_xml_path) service = metadata.service @@ -666,32 +658,80 @@ release = metadata.release # Get name, year, week and version from baseline configuration s60_input_node = doc.xml_create_element(u'input') - s60_version = self._bom.config['s60_version'] - s60_release = self._bom.config['s60_release'] - if s60_version != None: - s60_year = s60_version[0:4] - s60_week = s60_version[4:] + s60_type = u's60' + s60_year = u'0' + s60_week = u'0' + s60_release = u'' + # Using regular expression in first place + regexp = r'(?P.*)_(?P\d{4})(?P\d{2})_(?P.*)' + if self._bom.config['release_regexp']: + if '?P' not in self._bom.config['release_regexp']: + _logger.error('Missing TYPE in: %s' % str(self._bom.config['release_regexp'])) + _logger.info('Using default regular expression: %s' % regexp) + elif '?P' not in self._bom.config['release_regexp']: + _logger.error('Missing YEAR in: %s' % str(self._bom.config['release_regexp'])) + _logger.info('Using default regular expression: %s' % regexp) + elif '?P' not in self._bom.config['release_regexp']: + _logger.error('Missing WEEK in: %s' % str(self._bom.config['release_regexp'])) + _logger.info('Using default regular expression: %s' % regexp) + elif '?P' not in self._bom.config['release_regexp']: + _logger.error('Missing REVISION in: %s' % str(self._bom.config['release_regexp'])) + _logger.info('Using default regular expression: %s' % regexp) + else: + _logger.info('Using custom regular expression to capture the baseline release information: %s' + % str(self._bom.config['release_regexp'])) + regexp = self._bom.config['release_regexp'] + res = re.match(regexp, release) + if res != None: + s60_type = res.group('TYPE') + s60_release = res.group('TYPE') + '_' + res.group('REVISION') + s60_year = res.group('YEAR') + s60_week = res.group('WEEK') else: - s60_year = u'0' - s60_week = u'0' - if s60_version == None: - res = re.match(r'(.*)_(\d{4})(\d{2})_(.*)', release) - if res != None: - s60_release = res.group(1) + '_' + res.group(4) - s60_year = res.group(2) - s60_week = res.group(3) - s60_input_node.xml_append(doc.xml_create_element(u'name', content=(unicode("s60")))) + _logger.warning("Regular expression '%s' is not matching '%s'." % (regexp, release)) + if self._bom.config['s60_version'] != None: + # last resorts if it doesn't matches + _logger.warning("Falling back on s60.version and s60.release to determine input.") + s60_version = self._bom.config['s60_version'] + s60_year = s60_version[0:4] + s60_week = s60_version[4:] + if self._bom.config['s60_release']: + s60_release = self._bom.config['s60_release'] + + s60_input_node.xml_append(doc.xml_create_element(u'name', content=(unicode(s60_type)))) s60_input_node.xml_append(doc.xml_create_element(u'year', content=(unicode(s60_year)))) s60_input_node.xml_append(doc.xml_create_element(u'week', content=(unicode(s60_week)))) s60_input_node.xml_append(doc.xml_create_element(u'version', content=(unicode(s60_release)))) s60_input_source = s60_input_node.xml_create_element(u'source') - s60_input_source.xml_append(doc.xml_create_element(u'type', content=(unicode("grace")))) + s60_input_source.xml_append(doc.xml_create_element(u'type', content=(unicode("hydra")))) s60_input_source.xml_append(doc.xml_create_element(u'service', content=(unicode(service)))) s60_input_source.xml_append(doc.xml_create_element(u'product', content=(unicode(product)))) s60_input_source.xml_append(doc.xml_create_element(u'release', content=(unicode(release)))) s60_input_node.xml_append(s60_input_source) doc.bom.content.xml_append(s60_input_node) + elif self._bom.config['s60_version'] and self._bom.config['s60_release']: + _logger.info("currentRelease.xml not defined, falling back on s60.version and s60.release to determine input.") + s60_type = u's60' + s60_version = self._bom.config['s60_version'] + s60_year = u'0' + s60_week = u'0' + if len(s60_version) > 6: + s60_year = s60_version[0:4] + s60_week = s60_version[4:] + s60_release = self._bom.config['s60_release'] + s60_input_node = doc.xml_create_element(u'input') + s60_input_node.xml_append(doc.xml_create_element(u'name', content=(unicode(s60_type)))) + s60_input_node.xml_append(doc.xml_create_element(u'year', content=(unicode(s60_year)))) + s60_input_node.xml_append(doc.xml_create_element(u'week', content=(unicode(s60_week)))) + s60_input_node.xml_append(doc.xml_create_element(u'version', content=(unicode(s60_release)))) + + s60_input_source = s60_input_node.xml_create_element(u'source') + s60_input_source.xml_append(doc.xml_create_element(u'type', content=(unicode("unknown")))) + s60_input_node.xml_append(s60_input_source) + doc.bom.content.xml_append(s60_input_node) + + out = open(path, 'w') doc.xml(out, indent='yes') out.close() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py --- a/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/__init__.py Mon Sep 13 13:11:19 2010 +0800 @@ -41,8 +41,16 @@ VALID_OBJECT_STATES = ('working', 'checkpoint', 'public', 'prep', 'integrate', 'sqa', 'test','released') STATIC_OBJECT_STATES = ('integrate', 'sqa', 'test','released') CCM_SESSION_LOCK = os.path.join(tempfile.gettempdir(), "ccm_session.lock") +if os.path == '\\': + # on windows platform we need insulation of session opening + # so the _router.adr doesn't get modified while + # opening a session. This must be in a common location. + TEMPDIR = os.path.join(os.environ['SYSTEMROOT'], 'temp') + if not os.path.exists(TEMPDIR): + TEMPDIR = os.environ['TEMP'] + CCM_SESSION_LOCK = os.path.join(TEMPDIR, "ccm_session.lock") -def _execute(command, timeout=None): +def execute(command, timeout=None): """ Runs a command and returns the result data. """ targ = "" if timeout is not None: @@ -72,6 +80,7 @@ self.status = None self._output = None self._output_str = None + self.error = None def _setoutput(self, output): """set output""" @@ -116,15 +125,16 @@ """ Internal function to allow overloading, you must override _seterror. """ # the error output is automatically converted to ascii before any treatment - if isinstance(error, unicode): - self._error_str = error.encode('ascii', 'replace') - else: - self._error_str = error.decode('ascii', 'ignore') - _logger.debug("error ---->") - for line in self._error_str.splitlines(): - _logger.debug(line) - _logger.debug("<----") - self._seterror(self._error_str) + if error is not None: + if isinstance(error, unicode): + self._error_str = error.encode('ascii', 'replace') + else: + self._error_str = error.decode('ascii', 'ignore') + _logger.debug("error ---->") + for line in self._error_str.splitlines(): + _logger.debug(line) + _logger.debug("<----") + self._seterror(self._error_str) def _geterror(self): """ Returns the content of _output. """ @@ -606,12 +616,18 @@ if (self.dbpath != None): return result = self.execute("status") - for match in re.finditer(r'(?:(?:Graphical)|(?:Command)) Interface\s+@\s+(?P\w+:\d+(?:\:\d+\.\d+\.\d+\.\d+)+)(?P\s+\(current\s+session\))?\s*\nDatabase:\s*(?P\S+)', result.output, re.M | re.I): - dictionary = match.groupdict() - if (dictionary['current_session'] != None): - _logger.debug("AbstractSession: __find_dbpath: Found dbpath: %s" % dictionary['dbpath']) - self.dbpath = dictionary['dbpath'] - assert self.dbpath != None + + gotsession = False + for line in result.output.splitlines(): + if gotsession: + gotsession = False + if 'Database:' in line: + self.dbpath = line.replace('Database:', '').strip() + _logger.debug("AbstractSession: __find_dbpath: Found dbpath: %s" % self.dbpath) + if '(current session)' in line: + gotsession = True + if not self.dbpath: + raise Exception('self.dbpath is None ' + result.output) def execute(self, _, result=None): """ Abstract function that should implement the execution of ccm command @@ -739,13 +755,13 @@ command = "%s start -m -q -nogui -n %s -pw %s -h %s -d %s" % \ (CCM_BIN, username, password, engine, dbpath) _logger.debug('Starting new session:' + command.replace(password, "***")) - (result, status) = _execute(command, timeout=timeout) + (result, status) = execute(command, timeout=timeout) if status != 0: - raise Exception("Error creating a session: result:\n%s\nCommand: %s" % (result, command.replace(password, "***"))) + raise CCMException("Error creating a session: result:\n%s\nCommand: %s" % (result, command.replace(password, "***"))) session_addr = result.strip() _logger.debug(session_addr) if not re.match(r'[a-zA-Z0-9_\-.]+:\d+:\d+\.\d+\.\d+\.\d+(:\d+\.\d+\.\d+\.\d+)?', session_addr): - raise Exception("Error creating a session: result:\n%s" % result) + raise CCMException("Error creating a session: result:\n%s" % result) return Session(username, engine, dbpath, session_addr) def execute(self, cmdline, result=None): @@ -761,7 +777,7 @@ if result == None: result = Result(self) if os.sep == '\\': - command = "set CCM_ADDR=" + self._session_addr + " && " + CCM_BIN + " %s" % cmdline + command = "set CCM_ADDR=" + self._session_addr + " && \"" + CCM_BIN + "\" %s" % cmdline else: command = "export CCM_ADDR=" + self._session_addr + " && " + CCM_BIN + " %s" % cmdline _logger.debug('Execute > ' + command) @@ -1911,9 +1927,10 @@ router_address = None if database == None and dbpath != None: database = os.path.basename(dbpath) - + lock = fileutils.Lock(CCM_SESSION_LOCK) try: + _logger.info("Locking " + CCM_SESSION_LOCK) lock.lock(wait=True) # if we have the database name we can switch to the correct Synergy router if database != None: @@ -1932,9 +1949,11 @@ # If no existing sessions were available, start a new one _logger.info('Opening session.') new_session = Session.start(username, password, engine, dbpath) + _logger.info("Unlocking " + CCM_SESSION_LOCK) lock.unlock() return new_session finally: + _logger.info("Unlocking " + CCM_SESSION_LOCK) lock.unlock() raise CCMException("Cannot open session for user '%s'" % username) @@ -1969,6 +1988,7 @@ raise CCMException("Could not find CM/Synergy executable in the path.") command = "%s status" % (CCM_BIN) + _logger.info("Locking " + CCM_SESSION_LOCK) lock = fileutils.Lock(CCM_SESSION_LOCK) result = "" output = [] @@ -1989,11 +2009,11 @@ routerfile.close() _logger.debug('Command: ' + command) - (result, status) = _execute(command) + (result, status) = execute(command) if database != None: lock.unlock() if (status != 0): - raise CCMException("Ccm status execution returned an error.") + raise CCMException("Ccm status execution returned an error. " + command + " " + result) _logger.debug('ccm status result: ' + result) for match in re.finditer(r'Command Interface\s+@\s+(?P\w+:\d+:\d+.\d+.\d+.\d+(:\d+.\d+.\d+.\d+)*)(?P\s+\(current\s+session\))?\s+Database:\s*(?P\S+)', result, re.M): data = match.groupdict() @@ -2008,6 +2028,7 @@ output.append(existing_session) finally: if database != None: + _logger.info("Unlocking " + CCM_SESSION_LOCK) lock.unlock() return output diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py --- a/buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ccm/extra.py Mon Sep 13 13:11:19 2010 +0800 @@ -43,21 +43,21 @@ -def Snapshot(project, targetdir, dir=None): +def Snapshot(project, targetdir, dir_=None): """ This function can snapshot anything from Synergy, even prep/working projects """ assert project != None, "a project object must be supplied" assert project.type == "project", "project must be of project type" - if not dir: - dir = project.root_dir() - targetdir = os.path.join(targetdir, dir.name) + if not dir_: + dir_ = project.root_dir() + targetdir = os.path.join(targetdir, dir_.name) os.makedirs(targetdir) - for object in dir.children(project): - if object.type == 'dir': - Snapshot(project, targetdir, object) - elif object.type == 'project': - Snapshot(object, targetdir) + for object_ in dir_.children(project): + if object_.type == 'dir': + Snapshot(project, targetdir, object_) + elif object_.type == 'project': + Snapshot(object_, targetdir) else: - object.to_file(os.path.join(targetdir, object.name)) + object_.to_file(os.path.join(targetdir, object_.name)) class _FastSnapshot: @@ -74,14 +74,14 @@ """ Do the checkout, and then walkthrough the project hierarchy to find subproject to snapshot. """ _logger.info("Snapshotting %s under %s" % (self.project, self.targetdir)) self.project.snapshot(self.targetdir, False) - def walk(dir, targetdir): + def walk(dir_, targetdir): """walkthrough the project hierarchy to find subproject to snapshot""" - for object in dir.children(self.project): - if isinstance(object, ccm.Dir): - walk(object, os.path.join(targetdir, object.name)) - elif isinstance(object, ccm.Project): - _logger.info("Adding project %s" % object.objectname) - self.pool.addWork(_FastSnapshot(self.pool, object, targetdir, self.callback, self.exc_hld)) + for object_ in dir_.children(self.project): + if isinstance(object_, ccm.Dir): + walk(object_, os.path.join(targetdir, object_.name)) + elif isinstance(object_, ccm.Project): + _logger.info("Adding project %s" % object_.objectname) + self.pool.addWork(_FastSnapshot(self.pool, object_, targetdir, self.callback, self.exc_hld)) if len(self.project.subprojects) > 0: rootdir = self.project.root_dir() @@ -147,9 +147,9 @@ def __call__(self): output = "" _logger.info("Maintaining project %s" % self.subproject) - for tuple in self.subproject.finduse(): - if tuple['project'] == self.toplevel: - self.subproject['wa_path'] = os.path.join(self.toplevel['wa_path'], tuple['path']) + for tuple_ in self.subproject.finduse(): + if tuple_['project'] == self.toplevel: + self.subproject['wa_path'] = os.path.join(self.toplevel['wa_path'], tuple_['path']) self.subproject["project_subdir_template"] = "" _logger.info("Maintaining project %s under %s" % (self.subproject, self.subproject['wa_path'])) output = self.subproject.work_area(True, True, True, wat=self.wat) @@ -274,7 +274,9 @@ """load the command""" if self.cacheXml is not None and os.path.exists(self.cacheXml): _logger.info("Loading %s" % self.cacheXml) - doc = parse(open(self.cacheXml, 'r')) + stream = open(self.cacheXml, 'r') + doc = parse(stream) + stream.close() sessions = doc.documentElement self._lock.acquire() try: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/comments.py --- a/buildframework/helium/sf/python/pythoncore/lib/comments.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/comments.py Mon Sep 13 13:11:19 2010 +0800 @@ -87,12 +87,10 @@ if COMMENT_SYMBOLS.has_key(file_type): for i in range(len(COMMENT_SYMBOLS[file_type])): comment = comment.replace(COMMENT_SYMBOLS[file_type][i], "") - try: - doc.commentLog.xml_append_fragment(comment) - # Add a generic file attribute to the comment to label which file it comes from - doc.commentLog.xml_children[-1].xml_set_attribute(u'file', unicode(filename)) - except Exception: - _logger.warning("A comment in '%s' is not valid XML." % filename) + + doc.commentLog.xml_append_fragment(comment) + # Add a generic file attribute to the comment to label which file it comes from + doc.commentLog.xml_children[-1].xml_set_attribute(u'file', unicode(filename)) #print doc.xml() return doc diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/configuration.py --- a/buildframework/helium/sf/python/pythoncore/lib/configuration.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/configuration.py Mon Sep 13 13:11:19 2010 +0800 @@ -83,13 +83,13 @@ """ See if the given name matches the name of this configuration. """ return self.name == name - def get(self, key, default_value): + def get(self, key, failobj=None): """ Get an item from the configuration. """ try: return self.__getitem__(key) except KeyError: - return default_value - + return failobj + def get_list(self, key, default_value): """ Get a value as a list. """ try: @@ -402,7 +402,7 @@ """ Is this a buildable configuration? """ return self.abstract == None - def _addPropertyValue(self, key, value, parseList=True): + def add_property_value(self, key, value, parseList=True): """Adds a property value to the configuration. If the property does not exist, it is added without modification. @@ -519,14 +519,14 @@ Configuration.__init__(self) self._configs = configs - def getConfigurations(self, name=None, type=None): + def getConfigurations(self, name=None, type_=None): """ Return a list of configs that matches the name and type specified. This can be queried multiple times to retrieve different named configurations. """ result = [] for conf in self._configs: - if ((name != None and conf.match_name(name)) or name == None) and ((type != None and conf.type == type) or type == None): + if ((name != None and conf.match_name(name)) or name == None) and ((type_ != None and conf.type == type_) or type_ == None): result.append(conf) return result @@ -546,9 +546,11 @@ def __init__(self, inputfile, configname=''): """ Initialization. """ + ConfigurationBuilder.__init__(self) self.inputfile = inputfile self.configname = configname self._warn_on_deprecated_spec = False + self.rootNode = None def getConfiguration(self): """ Returns a ConfigurationSet object. @@ -624,14 +626,13 @@ out.write(doc.toprettyxml()) out.close() - - def getConfigurations(self, name=None, type=None): + def getConfigurations(self, name=None, type_=None): """ Get a list of the individual configurations. Once read a new builder must be opened to retrieve a differently filtered set of configurations. """ config_set = self.getConfiguration() - return config_set.getConfigurations(name, type) + return config_set.getConfigurations(name, type_) def getReferences(self): """get references""" @@ -682,18 +683,18 @@ if not isinstance(parent_value, types.ListType): parent_value = [parent_value] for value in parent_value: - config._addPropertyValue(name, value) + config.add_property_value(name, value) if child.nodeName == 'set' or child.nodeName == 'append': name = child.getAttribute('name') if child.hasAttribute('value'): value = child.getAttribute('value') - config._addPropertyValue(name, value) + config.add_property_value(name, value) elif child.hasChildNodes(): value = "" for textchild in child.childNodes: value += textchild.data - config._addPropertyValue(name, value, False) + config.add_property_value(name, value, False) elif child.nodeName == 'specRef': for ref in child.getAttribute('ref').split(','): node = self.getNodeByReference(ref) @@ -757,14 +758,4 @@ def to_xpath(self): """ Convert the key to XPath syntax. """ return self.string.replace('.', '/') - - -class XMLConfiguration(HierarchicalConfiguration): - """ A XML-based hierarchical configuration. """ - - def __init__(self, file_): - """ Initialization. """ - from lxml import etree - HierarchicalConfiguration.__init__(self) - - self._root = etree.parse(file_) + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/convertpkg.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/convertpkg.py Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,76 @@ +#============================================================================ +#Name : .py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== +import sys +import os +from distutils import dir_util # pylint: disable-msg=E0611 + +def main(): + if len(sys.argv) < 3: + print 'Usage: ' + sys.argv[0] + ' pkgsrc pkgdst test_type' + sys.exit(1) + convertpkg(sys.argv[1], sys.argv[2], sys.argv[3]) + +def convertpkg(srcs, dst, testtype): + i = 1 + + bldfile = open(os.path.join(dst, 'bld.inf'), 'w') + + for src in srcs.split(' '): + bldfile.write('#include "' + str(i) + '/group/bld.inf"\n') + srcfile = open(src) + os.makedirs(os.path.join(dst, str(i), 'group')) + dstfile = open(os.path.join(dst, str(i), 'group', os.path.basename(src)), 'w') + for line in srcfile: + if line.startswith('"') and not line.startswith('"\\') and not line.startswith('"/'): + line = line.replace('"', '"' + os.path.dirname(src) + os.sep, 1) + dstfile.write(line) + srcfile.close() + dstfile.close() + + customdir = os.path.join(os.path.dirname(src), 'custom') + if os.path.exists(customdir): + dir_util.copy_tree(customdir, os.path.join(dst, str(i), 'group', 'custom')) + + subbldfile = open(os.path.join(dst, str(i), 'group', 'bld.inf'), 'w') + subbldfile.write('PRJ_TESTMMPFILES\n') + subbldfile.write('test.mmp\n') + subbldfile.close() + + submmpfile = open(os.path.join(dst, str(i), 'group', 'test.mmp'), 'w') + submmpfile.write('TARGET fake.exe\n') + submmpfile.write('TARGETTYPE exe\n') + + if testtype == 'tef': + submmpfile.write('LIBRARY testexecuteutils.lib\n') + elif testtype == 'mtf': + submmpfile.write('LIBRARY testframeworkclient.lib\n') + elif testtype == 'rtest': + submmpfile.write('//rtest\n') + elif testtype == 'stif': + submmpfile.write('LIBRARY stiftestinterface.lib\n') + else: + raise Exception('Test type unknown: ' + testtype) + submmpfile.close() + + i += 1 + + bldfile.close() + +if __name__ == "__main__": + main() \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ctc.py --- a/buildframework/helium/sf/python/pythoncore/lib/ctc.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ctc.py Mon Sep 13 13:11:19 2010 +0800 @@ -35,15 +35,14 @@ self.ftp = None def upload(self): - """upload""" + """ Proceed to the upload. """ self._open() - """ Proceed to the upload. """ monsyms = [] i = 1 for p_path in self.paths: if os.path.exists(p_path) and os.path.isfile(p_path): # ftp://1.2.3.4/ctc_helium/[diamonds_id]/mon_syms/2/mon.sym - outputdir = "ctc_helium/%s/mon_syms/%d" % (self.diamondsid , i) + outputdir = "%s/mon_syms/%d" % (self.diamondsid , i) output = outputdir + "/MON.SYM" self._ftpmkdirs(outputdir) print "Copying %s under %s" % (p_path, output) @@ -61,22 +60,24 @@ """close""" self.ftp.quit() - def _ftpmkdirs(self, dir): + def _ftpmkdirs(self, dir_): """ftp make directory""" pwd = self.ftp.pwd() - for d_dir in dir.split('/'): - if len(d_dir)!=0: -# pylint: disable-msg=W0704 - #disable except not doing anything + for d_dir in dir_.split('/'): + if len(d_dir) != 0: try: print "Creating %s under %s" % (d_dir, self.ftp.pwd()) self.ftp.mkd(d_dir) except ftplib.error_perm: #capture the exception but not display it. pass -# pylint: enable-msg=W0704 self.ftp.cwd(d_dir) self.ftp.cwd(pwd) def _send(self, src, dst): """send """ - self.ftp.storbinary("STOR " + dst, open(src, "rb"), 1024) + try: + self.ftp.storbinary("STOR " + dst, open(src, "rb"), 1024) + except ftplib.error_perm, e: + print 'File already uploaded. ' + str(e) + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/delta_zip.py --- a/buildframework/helium/sf/python/pythoncore/lib/delta_zip.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/delta_zip.py Mon Sep 13 13:11:19 2010 +0800 @@ -38,6 +38,8 @@ self.temp_dir = temp_dir self.exclude_dirs = exclude_dirs self.list_of_files = list_of_files + self.dest_dir = None + self.list_of_lists = None def create_file_list(self): """Create list of files (was list_files.pl)""" @@ -171,6 +173,10 @@ class MD5SignatureBuilderEBS(MD5SignatureBuilder): """ build the MD5 CRCs for all the files in the list of files""" + def __init__(self, build_area_root, nb_split, temp_dir, exclude_dirs, list_of_files): + MD5SignatureBuilder.__init__(self, build_area_root, nb_split, temp_dir, exclude_dirs, list_of_files) + self.makefile = None + def create_build_file(self): """Create EBS XML""" liste = self.create_command_list() @@ -189,6 +195,7 @@ """ The MD5 CRC creation for delta zippinf for use on EC machines""" def __init__(self, build_area_root, nb_split, temp_dir, exclude_dirs, ec_cluster_manager, ec_build_class, list_of_files): MD5SignatureBuilder.__init__(self, build_area_root, nb_split, temp_dir, exclude_dirs, list_of_files) + self.makefile = None self.ec_cluster_manager = ec_cluster_manager self.ec_build_class = ec_build_class @@ -332,10 +339,10 @@ return string -def readEvalid(dir): +def readEvalid(dir_): """read E valid""" filesdict = {} - for root, _, files in os.walk(dir): + for root, _, files in os.walk(dir_): for name in files: f_file = os.path.join(root, name) directory = None @@ -373,7 +380,7 @@ shutil.rmtree(dest) os.mkdir(dest) for line in open(adomappingfile): - dir = line.split('=')[0].replace(r'\:', ':') + dir_ = line.split('=')[0].replace(r'\:', ':') tmpfile = os.path.join(dest, str(i)) - os.system('evalid -g ' + dir + ' ' + tmpfile) + os.system('evalid -g ' + dir_ + ' ' + tmpfile) i = i + 1 \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/dependancygraph.py --- a/buildframework/helium/sf/python/pythoncore/lib/dependancygraph.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/dependancygraph.py Mon Sep 13 13:11:19 2010 +0800 @@ -25,9 +25,9 @@ class Library: """ Class Library holds information of the required modules or components such as license and the version """ - def __init__(self, name, license, version=''): + def __init__(self, name, license_, version=''): self.name = name - self.license = license + self.license_ = license_ self.version = version self.requires = [] @@ -42,7 +42,7 @@ """add library""" for lib in self.getLibraries(conf): if lib.name.lower() == library.name.lower(): - lib.license = library.license + lib.license_ = library.license_ return self.getLibraries(conf).append(library) def getLibraries(self, conf): @@ -75,17 +75,17 @@ def readModules(self): """read modules""" - license = '' + license_ = '' for module in self.ivyxml['ivy-module'].dependencies.xml_children: if hasattr(module, 'data'): if 'License:' in module.data: - license = module.data.strip() + license_ = module.data.strip() elif hasattr(module, 'name'): modulename = module.name.replace('-', '_') if module.org != 'SWEPT': - self.group.addLibrary(module.conf, Library(modulename, license)) - license = '' + self.group.addLibrary(module.conf, Library(modulename, license_)) + license_ = '' def readSubModules(self): """read Sub Modules""" @@ -96,19 +96,19 @@ ivydir = os.path.join(ivydir, 'modules') ivyjarfile = os.path.join(ivydir, module.name + '-1.0.ivy.xml') ivymodulexml = amara.parse(open(ivyjarfile)) - license = '' + license_ = '' for artifact in ivymodulexml['ivy-module'].publications.xml_children: if hasattr(artifact, 'data'): if 'License:' in artifact.data: - license = artifact.data.strip() + license_ = artifact.data.strip() elif hasattr(artifact, 'name'): bits = artifact.name.split('-') name = bits[0] version = '' if len(bits) > 1: version = bits[1] - self.group.addLibrary(module.conf, Library(name, license, version)) - license = '' + self.group.addLibrary(module.conf, Library(name, license_, version)) + license_ = '' PYTHON_GROUP = True SUBCON_PYTHON_GROUP = False @@ -163,7 +163,7 @@ """read Pkg info""" name = '' version = '' - license = '' + license_ = '' license2 = '' for line in data: @@ -172,14 +172,14 @@ if 'Version:' in line: version = line.strip().replace('Version: ', '') if 'License:' in line: - license = line.strip().replace('License: ', '') + license_ = line.strip().replace('License: ', '') if 'Classifier: License :: ' in line: license2 = license2 + ' ' + line.strip().replace('Classifier: License :: ', '').replace('OSI Approved :: ', '') - if license.lower() == 'unknown' or license == '' or license2 != '': - license = license2 + if license_.lower() == 'unknown' or license_ == '' or license2 != '': + license_ = license2 - return Library(name, license, version) + return Library(name, license_, version) def addLicensesColors(graphdata, group): """add license colours""" @@ -190,8 +190,8 @@ for module in group.getLibraries(conf): if module.name.lower() in line.lower() and 'label=' in line: newline = line.replace('label=', 'color=%s,label=' % group.getColor(conf)) - if module.license != '': - newline = newline.replace("\"];", "|%s\"];" % module.license) + if module.license_ != '': + newline = newline.replace("\"];", "|%s\"];" % module.license_) break newgraphdata.append(newline) return newgraphdata @@ -270,14 +270,14 @@ output = "helium_ant -> helium_python;\n" if subcon: - list = [SUBCON_PYTHON_GROUP] + libs_list = [SUBCON_PYTHON_GROUP] else: - list = [SUBCON_PYTHON_GROUP, PYTHON_GROUP] + libs_list = [SUBCON_PYTHON_GROUP, PYTHON_GROUP] - for group in list: + for group in libs_list: for lib in libraries.getLibraries(group): output = output + ("helium_python -> \"%s\";\n" % lib.name) - output = output + ("\"%s\" [style=filled,shape=record,color=%s,label=\"%s %s|%s\"];\n" % (lib.name, libraries.getColor(group), lib.name, lib.version, lib.license)) + output = output + ("\"%s\" [style=filled,shape=record,color=%s,label=\"%s %s|%s\"];\n" % (lib.name, libraries.getColor(group), lib.name, lib.version, lib.license_)) for require in lib.requires: output = output + ("\"%s\" -> \"%s\";\n" % (lib.name, require)) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/docs.py --- a/buildframework/helium/sf/python/pythoncore/lib/docs.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/docs.py Mon Sep 13 13:11:19 2010 +0800 @@ -35,7 +35,7 @@ filePath = os.path.abspath(os.path.join(root, fname)) with open(filePath) as f_file: filePathAmara = 'file:///'+ filePath.replace('\\','/') - curPrj=amara.parse(filePathAmara) + curPrj = amara.parse(filePathAmara) for line in f_file: linePattern = re.compile('^import') lineMatch = linePattern.search(line) @@ -47,7 +47,7 @@ try: importModule = __import__(curModule) if hasattr(importModule, '__file__'): - modulePath=importModule.__file__ + modulePath = importModule.__file__ if 'helium' in modulePath: for projectList in dbPrj.antDatabase.project: if (projectList.name == curPrj.project.name): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/escapeddict.py --- a/buildframework/helium/sf/python/pythoncore/lib/escapeddict.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/escapeddict.py Mon Sep 13 13:11:19 2010 +0800 @@ -38,7 +38,10 @@ class EscapedDict(UserDict.UserDict): """ Implements a dictionary that escapes the key values recursively. """ - def __init__(self, dict={}, failonerror=False): + # pylint: disable=W0622 + def __init__(self, dict=None, failonerror=False): + if dict == None: + dict = {} UserDict.UserDict.__init__(self, dict) self.__failonerror = failonerror diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/fileutils.py --- a/buildframework/helium/sf/python/pythoncore/lib/fileutils.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/fileutils.py Mon Sep 13 13:11:19 2010 +0800 @@ -397,12 +397,12 @@ value = match.group(1) else: error = "Content of '%s' doesn't match r'^\d+|0842[0-9a-zA-Z]{3}\s*$'." % filename - except Exception, exc: + except IOError, exc: error = str(exc) if value is not None: return value # worse case.... - raise Exception(error) + raise IOError(error) def load_policy_content(filename): """ Testing policy content loading. """ @@ -410,8 +410,8 @@ try: fileh = codecs.open(filename, 'r', 'ascii') data = fileh.read() - except: - raise Exception("Error loading '%s' as an ASCII file." % filename) + except ValueError: + raise IOError("Error loading '%s' as an ASCII file." % filename) finally: fileh.close() return data @@ -485,7 +485,7 @@ break md5.update(chunk) file_handle.close() - except Exception, exc: + except IOError, exc: LOGGER.warning("Error happened on %d trial: %s" % (trial, str(exc))) return md5.hexdigest() @@ -497,8 +497,8 @@ LOGGER.debug('Opening symbian policy file: ' + filename) try: fileh = codecs.open(filename, 'r', 'ascii') - except: - raise Exception("Error loading '%s' as an ASCII file." % filename) + except ValueError: + raise IOError("Error loading '%s' as an ASCII file." % filename) for line in fileh: match = re.match(r'^Category\s+([A-Z])\s*$', line, re.M|re.DOTALL) if match != None: @@ -508,12 +508,12 @@ fileh.close() if match == None: error = "Content of '%s' doesn't match r'^Category\s+([A-Z])\s*$'." % filename - except Exception, exc: + except IOError, exc: error = str(exc) if value is not None: return value # worse case.... - raise Exception(error) + raise IOError(error) class LockFailedException(Exception): @@ -542,6 +542,7 @@ # Open the file if self.f_desc == None: self.f_desc = open(self._filename, "w+") + # pylint: disable=W0212 wfd = win32file._get_osfhandle(self.f_desc.fileno()) if not wait: try: @@ -565,9 +566,10 @@ if self.f_desc == None: LOGGER_LOCK.debug("already unlocked") return + # pylint: disable=W0212 wfd = win32file._get_osfhandle(self.f_desc.fileno()) try: - # pylint: disable-msg=E1101 + # pylint: disable=E1101 win32file.UnlockFile(wfd, 0 , 0, 0xffff, 0) self.f_desc.close() self.f_desc = None diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/freedisk.py --- a/buildframework/helium/sf/python/pythoncore/lib/freedisk.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/freedisk.py Mon Sep 13 13:11:19 2010 +0800 @@ -39,24 +39,23 @@ def print_space_report(drive, space_required): - """ - compares the required space with current free space on the provided drive + """ Compares the required space with current free space on the provided drive. """ try: if sys.platform == "win32": - import win32file # pylint: disable-msg=F0401 + import win32file # pylint: disable=F0401 free_bytes = win32file.GetDiskFreeSpaceEx(drive)[0] elif 'java' in sys.platform: - import java.io # pylint: disable-msg=F0401 + import java.io # pylint: disable=F0401 free_bytes = java.io.File(drive).getFreeSpace() else: import os import statvfs - # pylint: disable-msg=E1101 + # pylint: disable=E1101 stats = os.statvfs(drive) free_bytes = stats[statvfs.F_BSIZE] * stats[statvfs.F_BAVAIL] - except Exception, err_type: + except (IOError, win32file.error), err_type: print "ERROR: Either specified drive doesn't exist or an unknown error" print str(err_type) print HELP_STRING @@ -76,8 +75,7 @@ def main(): - """ - Gets and parse options and verifies the option values + """ Gets and parse options and verifies the option values. """ try: opts = getopt.getopt(sys.argv[1:], "hs:d:", \ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/getVariantConfiguration.py --- a/buildframework/helium/sf/python/pythoncore/lib/getVariantConfiguration.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/getVariantConfiguration.py Mon Sep 13 13:11:19 2010 +0800 @@ -71,7 +71,7 @@ if len(str(v_info)) > 0: outfile.write(str(v_info)+"\n") outfile.close() - except Exception, exc: + except IOError, exc: print "ERROR: %s" % exc sys.exit(-1) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/helium/documentation.py --- a/buildframework/helium/sf/python/pythoncore/lib/helium/documentation.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/helium/documentation.py Mon Sep 13 13:11:19 2010 +0800 @@ -19,8 +19,7 @@ """ Helium API documentation processing. """ -from lxml import etree - +import amara class APIDeltaWriter(object): """ Creates an XML delta of the Helium API between releases. """ @@ -31,81 +30,76 @@ def write(self, path): """ Write the API delta information to an XML file. """ - root = etree.Element('apiChanges') + root = amara.create_document('apiChanges') - old_db = etree.parse(self.old_database) - new_db = etree.parse(self.new_database) + old_db = amara.parse(self.old_database) + new_db = amara.parse(self.new_database) - - old_macro_names = set([macro[0].text for macro in old_db.findall('/project/macro')]) - new_macro_names = set([macro[0].text for macro in new_db.findall('/project/macro')]) + old_macro_names = set([str(macro.name) for macro in old_db.xml_xpath('/antDatabase/project/macro')]) + new_macro_names = set([str(macro.name) for macro in new_db.xml_xpath('/antDatabase/project/macro')]) - old_target_names = set([target[0].text for target in old_db.findall('/project/target')]) - new_target_names = set([target[0].text for target in new_db.findall('/project/target')]) + old_target_names = set([str(target.name) for target in old_db.xml_xpath('/antDatabase/project/target')]) + new_target_names = set([str(target.name) for target in new_db.xml_xpath('/antDatabase/project/target')]) + new_target_names_public = set([str(target.name) for target in new_db.xml_xpath("/antDatabase/project/target[scope='public']")]) - old_property_names = set([property[0].text for property in old_db.findall('/project/property')]) - new_property_names = set([property[0].text for property in new_db.findall('/project/property')]) + old_property_names = set([str(property_.name) for property_ in old_db.xml_xpath('/antDatabase/project/property')]) + new_property_names = set([str(property_.name) for property_ in new_db.xml_xpath('/antDatabase/project/property')]) + new_property_names_public = set([str(property_.name) for property_ in new_db.xml_xpath("/antDatabase/project/property[scope='public']")]) - old_project_names = set([project[0].text for project in old_db.findall('/project')]) - new_project_names = set([project[0].text for project in new_db.findall('/project')]) + old_project_names = set([str(project.name) for project in old_db.xml_xpath('/antDatabase/project')]) + new_project_names = set([str(project.name) for project in new_db.xml_xpath('/antDatabase/project')]) dict_old_taskdef_names = {} dict_new_taskdef_names = {} - for taskdef in old_db.findall('/project/taskdef'): - dict_old_taskdef_names[taskdef[0].text] = taskdef[1].text - for taskdef in new_db.findall('/project/taskdef'): - dict_new_taskdef_names[taskdef[0].text] = taskdef[1].text + for taskdef in old_db.xml_xpath('/antDatabase/project/taskdef'): + dict_old_taskdef_names[taskdef.name] = taskdef.name + for taskdef in new_db.xml_xpath('/antDatabase/project/taskdef'): + dict_new_taskdef_names[taskdef.name] = taskdef.name projects_removed = old_project_names.difference(new_project_names) for project in projects_removed: - project_element = etree.SubElement(root, 'project', attrib={'state': 'removed'}) - project_element.text = project + root.xml_append(root.xml_create_element('project', attributes={'state': 'removed'}, content=project)) projects_added = new_project_names.difference(old_project_names) for project in projects_added: - project_element = etree.SubElement(root, 'project', attrib={'state': 'added'}) - project_element.text = project + root.xml_append(root.xml_create_element('project', attributes={'state': 'added'}, content=project)) propertys_removed = old_property_names.difference(new_property_names) - for property in propertys_removed: - property_element = etree.SubElement(root, 'property', attrib={'state': 'removed'}) - property_element.text = property + for property_ in propertys_removed: + root.xml_append(root.xml_create_element('property', attributes={'state': 'removed'}, content=property_)) propertys_added = new_property_names.difference(old_property_names) - for property in propertys_added: - property_element = etree.SubElement(root, 'property', attrib={'state': 'added'}) - property_element.text = property + for property_ in propertys_added: + if property_ in new_property_names_public or new_property_names_public == set([]): + root.xml_append(root.xml_create_element('property', attributes={'state': 'added'}, content=property_)) macros_removed = old_macro_names.difference(new_macro_names) for macro in macros_removed: - macro_element = etree.SubElement(root, 'macro', attrib={'state': 'removed'}) - macro_element.text = macro + root.xml_append(root.xml_create_element('macro', attributes={'state': 'removed'}, content=macro)) macros_added = new_macro_names.difference(old_macro_names) for macro in macros_added: - macro_element = etree.SubElement(root, 'macro', attrib={'state': 'added'}) - macro_element.text = macro + root.xml_append(root.xml_create_element('macro', attributes={'state': 'added'}, content=macro)) targets_removed = old_target_names.difference(new_target_names) for target in targets_removed: - target_element = etree.SubElement(root, 'target', attrib={'state': 'removed'}) - target_element.text = target + root.xml_append(root.xml_create_element('target', attributes={'state': 'removed'}, content=target)) targets_added = new_target_names.difference(old_target_names) for target in targets_added: - target_element = etree.SubElement(root, 'target', attrib={'state': 'added'}) - target_element.text = target + if target in new_target_names_public or new_target_names_public == set([]): + root.xml_append(root.xml_create_element('target', attributes={'state': 'added'}, content=target)) taskdefs_removed = set(dict_old_taskdef_names.keys()) - set(dict_new_taskdef_names.keys()) for taskdefKey in taskdefs_removed: - taskdef_element = etree.SubElement(root, 'taskdef', attrib={'state': 'removed'}) - taskdef_element.text = taskdefKey - taskdef_element.attrib['classname'] = dict_old_taskdef_names[taskdefKey] + taskdef_element = root.xml_create_element('taskdef', attributes={'state': 'removed'}, content=str(taskdefKey)) + root.xml_append(taskdef_element) + taskdef_element.classname = dict_old_taskdef_names[taskdefKey] taskdefs_added = set(dict_new_taskdef_names.keys()) - set(dict_old_taskdef_names.keys()) for taskdefKey in taskdefs_added: - taskdef_element = etree.SubElement(root, 'taskdef', attrib={'state': 'added'}) - taskdef_element.text = taskdefKey - taskdef_element.attrib['classname'] = dict_new_taskdef_names[taskdefKey] + taskdef_element = root.xml_create_element('taskdef', attributes={'state': 'added'}, content=str(taskdefKey)) + root.xml_append(taskdef_element) + taskdef_element.classname = dict_new_taskdef_names[taskdefKey] - etree.dump(root) - tree = etree.ElementTree(root) - tree.write(path, pretty_print=True) + f = open(path, 'w') + root.xml(indent=True, out=f) + f.close() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/helium/logger.py --- a/buildframework/helium/sf/python/pythoncore/lib/helium/logger.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/helium/logger.py Mon Sep 13 13:11:19 2010 +0800 @@ -23,7 +23,7 @@ - First version of the module. """ -# pylint: disable-msg=E1101,E1103 +# pylint: disable=E1101,E1103 import codecs import xml.dom.minidom @@ -43,6 +43,7 @@ def __call__(self, *args): """Make this object callable. Call _print from the logger instance. @params *args a list of arguments""" + # pylint: disable=W0212 self.__logger._print(self.__name, args) @@ -142,10 +143,10 @@ print ("---------------------------------------------------------------------") print (" + %s" % title) - def SetCustomOutputer(self, type, classname, config = None): + def SetCustomOutputer(self, type_, classname, config = None): """set custom out puter""" node = self.__doc.createElementNS("", "__customoutputer") - node.setAttributeNS("", "type", type) + node.setAttributeNS("", "type", type_) node.setAttributeNS("", "module", classname) if config != None: node.appendChild(config) @@ -170,7 +171,7 @@ """Generic method that handle the print in the XML document @param kind type of output @param *args a list of arguments (must be strings)""" - output = u"".join(map(lambda x: u"%s" % x, list(*args))) + output = u"".join([u"%s" % x for x in list(*args)]) nodetype = kind.lower() msgtype = "" if nodetype != "print" and nodetype != "info" and nodetype != "debug": diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/helium/output/widgets.py --- a/buildframework/helium/sf/python/pythoncore/lib/helium/output/widgets.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/helium/output/widgets.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ handles components in XML documents""" -# pylint: disable-msg=E1101 +# pylint: disable=E1101 import xml.dom.minidom class Widget: @@ -100,7 +100,7 @@ self.__table.appendChild(row) - def addStatistics(self, type, value): + def addStatistics(self, type_, value): """add Statistics""" if self.__table_stat == None: head1 = self._Box__doc.createElementNS("", "h1") @@ -123,8 +123,8 @@ t_d = self._Box__doc.createElementNS("", "td") div = self._Box__doc.createElementNS("", "div") - div.setAttributeNS("", "class", "gbl_cnt_" + type) - div.appendChild(self._Box__doc.createTextNode("%d %ss" % (value, type))) + div.setAttributeNS("", "class", "gbl_cnt_" + type_) + div.appendChild(self._Box__doc.createTextNode("%d %ss" % (value, type_))) t_d.appendChild(div) self.__table_stat.appendChild(t_d) @@ -132,7 +132,7 @@ class Event(Widget): """ A widget representing an event component """ - def __init__(self, doc, container, id): + def __init__(self, doc, container, id_): Widget.__init__(self) self.__doc = doc node_head = doc.createElementNS("", "div") @@ -140,11 +140,11 @@ container.appendChild(node_head) link = doc.createElementNS("", "a") - link.setAttributeNS("", "href", "javascript:ToggleNode('Img%d')" % id) + link.setAttributeNS("", "href", "javascript:ToggleNode('Img%d')" % id_) node_head.appendChild(link) span = doc.createElementNS("", "span") - span.setAttributeNS("", "id", "Img%d" % id) + span.setAttributeNS("", "id", "Img%d" % id_) span.setAttributeNS("", "style", "background:url(http://fawww.europe.nokia.com/isis/isis_interface/img/icons/button_open.gif) no-repeat") link.appendChild(span) @@ -156,7 +156,7 @@ # shaow all showall = doc.createElementNS("", "a") - showall.setAttributeNS("", "href", "javascript:ShowChilds('Img%d')" % id) + showall.setAttributeNS("", "href", "javascript:ShowChilds('Img%d')" % id_) span = doc.createElementNS("", "span") span.setAttributeNS("", "class", "node_action") span.appendChild(doc.createTextNode("[Show All]")) @@ -164,7 +164,7 @@ #hide all hideall = doc.createElementNS("", "a") - hideall.setAttributeNS("", "href", "javascript:HideChilds('Img%d')" % id) + hideall.setAttributeNS("", "href", "javascript:HideChilds('Img%d')" % id_) span = doc.createElementNS("", "span") span.setAttributeNS("", "class", "node_action") span.appendChild(doc.createTextNode("[Hide All]")) @@ -172,7 +172,7 @@ #toggle node self.__togglenode = doc.createElementNS("", "a") - self.__togglenode.setAttributeNS("", "href", "javascript:ToggleNode('Img%d')" % id) + self.__togglenode.setAttributeNS("", "href", "javascript:ToggleNode('Img%d')" % id_) self.__togglenode.appendChild(doc.createTextNode("")) # append container node_head.appendChild(showall) @@ -180,7 +180,7 @@ node_head.appendChild(self.__togglenode) contentx = doc.createElementNS("", "div") - contentx.setAttributeNS("", "id", "Content%d" % id) + contentx.setAttributeNS("", "id", "Content%d" % id_) contentx.setAttributeNS("", "style", "display:none") container.appendChild(contentx) content = doc.createElementNS("", "div") @@ -194,15 +194,15 @@ """set Title""" self.__title.data = title - def addStatistics(self, type, value): + def addStatistics(self, type_, value): """add Statistics""" if self.__node_info == None: self.__node_info = self.__doc.createElementNS("", "span") self.__node_info.setAttributeNS("", "class", "node_info") self.__togglenode.appendChild(self.__node_info) span = self.__doc.createElementNS("", "span") - span.setAttributeNS("", "class","cnt_%s" % type) - span.appendChild(self.__doc.createTextNode("%d %ss" % (value, type))) + span.setAttributeNS("", "class","cnt_%s" % type_) + span.appendChild(self.__doc.createTextNode("%d %ss" % (value, type_))) self.__node_info.appendChild(span) # # 2 warnings @@ -302,7 +302,7 @@ """push Content""" self.getDOMContainer().appendChild(self.__doc.createTextNode(arg)) self.getDOMContainer().appendChild(self.__doc.createElementNS("","br")) - map(pushContent, text.strip().split("\n")) + [pushContent(line) for line in text.strip().split("\n")] def getDOMContainer(self): """get DOM Container""" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/helium/outputer.py --- a/buildframework/helium/sf/python/pythoncore/lib/helium/outputer.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/helium/outputer.py Mon Sep 13 13:11:19 2010 +0800 @@ -38,25 +38,25 @@ url_file.close() self.__xml = amara.parse(data) - def getClass(self, type, default = None): + def getClass(self, type_, default = None): """get Class""" - return self._getValue(type, "class", default) + return self._getValue(type_, "class", default) - def getImg(self, type, default = None): + def getImg(self, type_, default = None): """ get Image""" - return self._getValue(type, "img", default) + return self._getValue(type_, "img", default) - def getWidth(self, type, default = None): + def getWidth(self, type_, default = None): """get Width""" - return self._getValue(type, "width", default) + return self._getValue(type_, "width", default) - def getHeight(self, type, default = None): + def getHeight(self, type_, default = None): """get height""" - return self._getValue(type, "height", default) + return self._getValue(type_, "height", default) - def _getValue(self, type, attr, default = None): + def _getValue(self, type_, attr, default = None): """get value""" - r_attr = self.__xml.xml_xpath("/htmloutput/icons/icon[@type='%s']" % type) + r_attr = self.__xml.xml_xpath("/htmloutput/icons/icon[@type='%s']" % type_) if len(r_attr) == 0: if default == None: raise Exception("Not found") @@ -67,6 +67,7 @@ class XML2XHTML: """ This class is used to generate an html file from the given xml """ def __init__(self, filename, url="http://fawww.europe.nokia.com/isis/isis_interface/configuration.xml", usedataurl=False): + self.__title = None self.__config = Configuration(url) self.__filename = filename self.__srcdoc = xml.dom.minidom.parse(filename) @@ -165,15 +166,13 @@ elif child.nodeType == xml.dom.Node.ELEMENT_NODE and child.tagName == "task" and child.attributes.has_key('type') and child.attributes['type'] == "maincontent": self._handleMainContent(child, body) - try: - footer = root.getElementsByTagName("__footer")[0] - f_foot = self.__factory["__footer"](self.__doc, body) - if footer.attributes.has_key("title"): - f_foot.setTitle(footer.attributes['title'].value) - if footer.attributes.has_key("subtitle"): - f_foot.setSubTitle(footer.attributes['subtitle'].value) - except Exception: - pass + footer = root.getElementsByTagName("__footer")[0] + f_foot = self.__factory["__footer"](self.__doc, body) + if footer.attributes.has_key("title"): + f_foot.setTitle(footer.attributes['title'].value) + if footer.attributes.has_key("subtitle"): + f_foot.setSubTitle(footer.attributes['subtitle'].value) + # Generate summary self._createSummary() @@ -285,7 +284,7 @@ def _createSummary(self): """create Summary""" - # pylint: disable-msg=E1101 + # pylint: disable=E1101 if self.__xhtml_summary == None: self.__xhtml_summary = Summary(self.__doc, self.__body) self.__xhtml_summary.setTitle("Global Statistics") diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/iadinfo.py --- a/buildframework/helium/sf/python/pythoncore/lib/iadinfo.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/iadinfo.py Mon Sep 13 13:11:19 2010 +0800 @@ -1,6 +1,6 @@ #============================================================================ -#Name : iadinfo.py -#Part of : Helium +#Name : iadinfo.py +#Part of : Helium #Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). #All rights reserved. @@ -24,34 +24,39 @@ PyASN1Availabe = True -try : +try: from pyasn1.codec.der import decoder from pyasn1.type import base except ImportError: PyASN1Availabe = False -def _findItem(item, itemParent, index, objectIdentifier) : +def _findItem(item, itemParent, index, objectIdentifier): """find Item""" - if isinstance(item, base.AbstractSimpleAsn1Item) : - if item == objectIdentifier : + if isinstance(item, base.AbstractSimpleAsn1Item): + if item == objectIdentifier: return itemParent[index + 1] else: - for i_item in range(len(item)) : + for i_item in range(len(item)): found = _findItem(item[i_item], item, i_item, objectIdentifier) if found: return found -def findItem(decodedCert, objectIdentifier) : +def findItem(decodedCert, objectIdentifier): """find item""" return _findItem(decodedCert, None, 0, objectIdentifier) -class CertificateOrganization : +class CertificateOrganization: """ This class holds organisation details of certificate issuer or signer """ - def __init__(self) : - pass - - def parse(self, decodedCert) : + def __init__(self): + self.commonName = None + self.countryCode = None + self.locality = None + self.state = None + self.street = None + self.organization = None + + def parse(self, decodedCert): """parse certificate Organisation""" self.commonName = findItem(decodedCert, (2, 5, 4, 3)) self.countryCode = findItem(decodedCert, (2, 5, 4, 6)) @@ -60,29 +65,30 @@ self.street = findItem(decodedCert, (2, 5, 4, 9)) self.organization = findItem(decodedCert, (2, 5, 4, 10)) - def readableStr(self) : + def readableStr(self): """readable String""" buf = "" - if self.commonName : + if self.commonName: buf += self.commonName.prettyPrint() + "\n" - if self.countryCode : + if self.countryCode: buf += self.countryCode.prettyPrint() + "\n" - if self.locality : + if self.locality: buf += self.locality.prettyPrint() + "\n" - if self.state : + if self.state: buf += self.state.prettyPrint() + "\n" - if self.street : + if self.street: buf += self.street.prettyPrint() + "\n" - if self.organization : + if self.organization: buf += self.organization.prettyPrint() return buf -class CertificateInfo : +class CertificateInfo: """ This class holds certificate information such as certificate signer and issuer """ - def __init__(self) : - pass + def __init__(self): + self.issuer = None + self.signer = None - def parse(self, decodedCert) : + def parse(self, decodedCert): """parse""" self.issuer = CertificateOrganization() self.issuer.parse(decodedCert[0][3]) @@ -90,101 +96,101 @@ self.signer = CertificateOrganization() self.signer.parse(decodedCert[0][5]) - def readableStr(self) : + def readableStr(self): """readable String""" buf = "Signer:\n " + "\n ".join(self.signer.readableStr().split('\n')) + "\n" buf += "Issuer:\n " + "\n ".join(self.issuer.readableStr().split('\n')) + "\n" return buf -class SISFileHeader : +class SISFileHeader: """ Class SIS File header """ - def __init__(self) : + def __init__(self): self.uid1 = 0 self.uid2 = 0 self.uid3 = 0 self.uidChecksum = 0 -class SISField : +class SISField: """ Class SIS Field """ - def __init__(self) : - self.type = 0 + def __init__(self): + self.type_ = 0 self.length = None self.subFields = [] - def readFieldLength(self, fileReader) : + def readFieldLength(self, fileReader): """read Field Length""" length = fileReader.readBytesAsUint(4) - if length & 0x80000000 > 0 : + if length & 0x80000000 > 0: length = length << 32 length |= fileReader.readBytesAsUint(4) return length - def findField(self, fieldType, startIndex=0) : + def findField(self, fieldType, startIndex=0): """find Field""" result = None index = startIndex - for field in self.subFields[startIndex:] : - if field.type == fieldType : + for field in self.subFields[startIndex:]: + if field.type_ == fieldType: result = field break - ++ index + index = index + 1 return (result, index) - def readableStr(self) : + def readableStr(self): """readable String""" return "" - def traverse(self, handler, depth=0) : + def traverse(self, handler, depth=0): """ traverse""" handler.handleField(self, depth) - for field in self.subFields : + for field in self.subFields: field.traverse(handler, depth + 1) -class SISUnsupportedField(SISField) : +class SISUnsupportedField(SISField): """ Class SIS UnsupportedField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialisation From File""" self.length = self.readFieldLength(fileReader) fileReader.readPlainBytes(self.length) -class SISStringField(SISField) : +class SISStringField(SISField): """ Class SIS StringField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.data = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) buf = fileReader.readPlainBytes(self.length) self.data = u"" - while len(buf) > 0 : + while len(buf) > 0: temp = buf[:2] buf = buf[2:] self.data += unichr(ord(temp[0]) | ord(temp[1]) << 8) - def readableStr(self) : + def readableStr(self): """readable String""" return self.data -class SISArrayField(SISField) : +class SISArrayField(SISField): """ Class SIS ArrayField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) - type = fileReader.readBytesAsInt(4) + type_ = fileReader.readBytesAsInt(4) l_len = self.length - 4 - while l_len > 0 : - field = SISFieldTypes[type]() - field.type = type + while l_len > 0: + field = SISFieldTypes[type_]() + field.type_ = type_ field.initFromFile(fileReader) self.subFields.append(field) @@ -192,32 +198,32 @@ padding = fileReader.skipPadding() l_len -= padding -class SISCompressedField(SISField) : +class SISCompressedField(SISField): """ Class SIS CompressedField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.algorithm = None self.uncompressedDataSize = None self.data = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.algorithm = fileReader.readBytesAsUint(4) self.uncompressedDataSize = fileReader.readBytesAsUint(8) data = fileReader.readPlainBytes(self.length - 4 - 8) - if self.algorithm == 0 : + if self.algorithm == 0: self.data = data - elif self.algorithm == 1 : + elif self.algorithm == 1: self.data = zlib.decompress(data) -class SISVersionField(SISField) : +class SISVersionField(SISField): """ Class SIS VersionField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.version = (- 1, - 1, - 1) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) major = fileReader.readBytesAsInt(4) @@ -225,147 +231,147 @@ build = fileReader.readBytesAsInt(4) self.version = (major, minor, build) - def readableStr(self) : + def readableStr(self): """readable string""" return str(self.version) -class SISVersionRangeField(SISField) : +class SISVersionRangeField(SISField): """ Class SIS VersionRangeField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.fromVersion = None self.toVersion = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.fromVersion = fieldParser.parseField(fileReader) - if self.length - fieldParser.lastReadBytes > 0 : + if self.length - fieldParser.lastReadBytes > 0 : self.toVersion = fieldParser.parseField(fileReader) -class SISDateField(SISField) : +class SISDateField(SISField): """ Class SIS DateField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.year = None self.month = None self.day = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise from File""" self.length = self.readFieldLength(fileReader) self.year = fileReader.readBytesAsUint(2) self.month = fileReader.readBytesAsUint(1) self.day = fileReader.readBytesAsUint(1) - def readableStr(self) : + def readableStr(self): """readable string""" return str(self.year) + "." + str(self.month) + "." + str(self.day) -class SISTimeField(SISField) : +class SISTimeField(SISField): """ Class SIS TimeField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.hours = None self.minutes = None self.seconds = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise from File""" self.length = self.readFieldLength(fileReader) self.hours = fileReader.readBytesAsUint(1) self.minutes = fileReader.readBytesAsUint(1) self.seconds = fileReader.readBytesAsUint(1) - def readableStr(self) : + def readableStr(self): """readable String""" return str(self.hours) + ":" + str(self.minutes) + ":" + str(self.seconds) -class SISDateTimeField(SISField) : +class SISDateTimeField(SISField): """ Class SIS DateTimeField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.date = None self.time = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.date = fieldParser.parseField(fileReader) self.time = fieldParser.parseField(fileReader) -class SISUidField(SISField) : +class SISUidField(SISField): """ Class SIS UidField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.uid = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.uid = fileReader.readBytesAsUint(4) - def readableStr(self) : + def readableStr(self): """readable String""" return hex(self.uid) -class SISLanguageField(SISField) : +class SISLanguageField(SISField): """ Class SIS LanguageField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.language = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.language = fileReader.readBytesAsUint(4) - def readableStr(self) : + def readableStr(self): """readable String""" return str(self.language) -class SISContentsField(SISField) : +class SISContentsField(SISField): """ Class SIS ContentsField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() field = fieldParser.parseField(fileReader) - while field : - if field.type == 3 : # compressed + while field: + if field.type_ == 3: # compressed bufferReader = SISBufferReader(field.data) field = fieldParser.parseField(bufferReader) self.subFields.append(field) field = fieldParser.parseField(fileReader) -class SISControllerField(SISField) : +class SISControllerField(SISField): """ Class SIS ControllerField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() bufferReader = SISBufferReader(fileReader.readPlainBytes(self.length)) field = fieldParser.parseField(bufferReader) - while field : + while field: self.subFields.append(field) field = fieldParser.parseField(bufferReader) -class SISInfoField(SISField) : +class SISInfoField(SISField): """ Class SIS InfoField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.installType = None self.installFlags = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() @@ -378,34 +384,34 @@ self.installType = fileReader.readBytesAsUint(1) self.installFlags = fileReader.readBytesAsUint(1) -class SISSupportedLanguagesField(SISField) : +class SISSupportedLanguagesField(SISField): """ Class SISSupportedLanguagesField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # languages -class SISSupportedOptionsField(SISField) : +class SISSupportedOptionsField(SISField): """ Class SISSupportedOptionsField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # options -class SISPrerequisitiesField(SISField) : +class SISPrerequisitiesField(SISField): """ Class SISPrerequisitiesField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() @@ -413,77 +419,77 @@ self.subFields.append(fieldParser.parseField(fileReader)) # dependencies -class SISDependencyField(SISField) : +class SISDependencyField(SISField): """ Class SISDependencyField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # UID field = fieldParser.parseField(fileReader) # Version range field is optional - if field.type == VersionRangeField : + if field.type_ == VersionRangeField: self.subFields.append(field) # version range self.subFields.append(fieldParser.parseField(fileReader)) # dependency names - else : + else: self.subFields.append(field) # dependency names -class SISPropertiesField(SISField) : +class SISPropertiesField(SISField): """ Class SISPropertiesField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # properties -class SISPropertyField(SISField) : +class SISPropertyField(SISField): """ Class SISPropertyField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.key = None self.value = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.key = fileReader.readBytesAsInt(4) self.value = fileReader.readBytesAsInt(4) -class SISSignaturesField(SISUnsupportedField) : +class SISSignaturesField(SISUnsupportedField): """ Class SISSignaturesField There is a type for this field, but there is no definition of the field contents""" pass -class SISCertificateChainField(SISField) : +class SISCertificateChainField(SISField): """ Class SISCertificateChainField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # certificate data -class SISLogoField(SISField) : +class SISLogoField(SISField): """ Class SISLogoField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # logo file -class SISFileDescriptionField(SISField) : +class SISFileDescriptionField(SISField): """ Class SISFileDescriptionField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.operation = None self.operationOptions = None @@ -491,7 +497,7 @@ self.uncompressedLength = None self.fileIndex = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() @@ -500,7 +506,7 @@ self.subFields.append(fieldParser.parseField(fileReader)) field = fieldParser.parseField(fileReader) self.subFields.append(field) - if field.type == 41 : # read field was capabilities ==> there is one more field left + if field.type_ == 41: # read field was capabilities ==> there is one more field left self.subFields.append(fieldParser.parseField(fileReader)) self.operation = fileReader.readBytesAsUint(4) @@ -509,29 +515,29 @@ self.uncompressedLength = fileReader.readBytesAsUint(8) self.fileIndex = fileReader.readBytesAsUint(4) - def readableStr(self) : + def readableStr(self): """readable string""" return "index: " + str(self.fileIndex) -class SISHashField(SISField) : +class SISHashField(SISField): """ Class SISHashField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.algorithm = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.algorithm = fileReader.readBytesAsUint(4) self.subFields.append(fieldParser.parseField(fileReader)) # logo file -class SISIfField(SISField) : +class SISIfField(SISField): """ Class SISIfField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() @@ -539,27 +545,27 @@ self.subFields.append(fieldParser.parseField(fileReader)) # install block self.subFields.append(fieldParser.parseField(fileReader)) # else ifs -class SISElseIfField(SISField) : +class SISElseIfField(SISField): """ Class SISElseIfField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # expression self.subFields.append(fieldParser.parseField(fileReader)) # install block -class SISInstallBlockField(SISField) : +class SISInstallBlockField(SISField): """ Class SISInstallBlockField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.files = None self.embeddedSISFiles = None self.ifBlocks = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() @@ -567,212 +573,212 @@ self.subFields.append(fieldParser.parseField(fileReader)) self.subFields.append(fieldParser.parseField(fileReader)) -class SISExpressionField(SISField) : +class SISExpressionField(SISField): """ Class SISExpressionField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.operator = None self.integerValue = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.operator = fileReader.readBytesAsUint(4) self.integerValue = fileReader.readBytesAsInt(4) - if self.operator == 10 or self.operator == 13 : + if self.operator == 10 or self.operator == 13: self.subFields.append(fieldParser.parseField(fileReader)) - if self.operator == 1 or self.operator == 2 or self.operator == 3 or self.operator == 4 or self.operator == 5 or self.operator == 6 or self.operator == 7 or self.operator == 8 or self.operator == 11 or self.operator == 12 : + if self.operator == 1 or self.operator == 2 or self.operator == 3 or self.operator == 4 or self.operator == 5 or self.operator == 6 or self.operator == 7 or self.operator == 8 or self.operator == 11 or self.operator == 12: self.subFields.append(fieldParser.parseField(fileReader)) - if not (self.operator == 13 or self.operator == 14 or self.operator == 15 or self.operator == 16 or self.operator == 10) : + if not (self.operator == 13 or self.operator == 14 or self.operator == 15 or self.operator == 16 or self.operator == 10): self.subFields.append(fieldParser.parseField(fileReader)) -class SISDataField(SISField) : +class SISDataField(SISField): """ Class SISDataField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # data units -class SISDataUnitField(SISField) : +class SISDataUnitField(SISField): """ Class SISDataUnitField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # file data -class SISFileDataField(SISField) : +class SISFileDataField(SISField): """ Class SISFileDataField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # raw file data -class SISSupportedOptionField(SISField) : +class SISSupportedOptionField(SISField): """ Class SISSupportedOptionField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # names -class SISControllerChecksumField(SISField) : +class SISControllerChecksumField(SISField): """ Class SISControllerChecksumField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.checksum = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.checksum = fileReader.readBytesAsUint(2) -class SISDataChecksumField(SISField) : +class SISDataChecksumField(SISField): """ Class SISDataChecksumField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.checksum = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.checksum = fileReader.readBytesAsUint(2) -class SISSignatureField(SISField) : +class SISSignatureField(SISField): """ Class SISSignatureField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # signature algorithm self.subFields.append(fieldParser.parseField(fileReader)) # signature data -class SISBlobField(SISField) : +class SISBlobField(SISField): """ Class SISBlobField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.data = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.data = fileReader.readPlainBytes(self.length) -class SISSignatureAlgorithmField(SISField) : +class SISSignatureAlgorithmField(SISField): """ Class SISSignatureAlgorithmField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # algorithm identifier -class SISSignatureCertificateChainField(SISField) : +class SISSignatureCertificateChainField(SISField): """ Class SISSignatureCertificateChainField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) fieldParser = SISFieldParser() self.subFields.append(fieldParser.parseField(fileReader)) # signatures self.subFields.append(fieldParser.parseField(fileReader)) # certificate chain -class SISDataIndexField(SISField) : +class SISDataIndexField(SISField): """ Class SISDataIndexField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.dataIndex = None - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.dataIndex = fileReader.readBytesAsUint(4) -class SISCapabilitiesField(SISField) : +class SISCapabilitiesField(SISField): """ Class SISCapabilitiesField """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.capabilities = 0 self.readableCaps = [] - def initFromFile(self, fileReader) : + def initFromFile(self, fileReader): """initialise From File""" self.length = self.readFieldLength(fileReader) self.capabilities = fileReader.readBytesAsUint(self.length) - for i in range(20) : - if (self.capabilities >> i) & 0x01 : + for i in range(20): + if (self.capabilities >> i) & 0x01: self.readableCaps.append(CapabilityNames[i]) - def readableStr(self) : + def readableStr(self): """readable string""" return " ".join(self.readableCaps) SISFieldTypes = { - 1 : SISStringField, - 2 : SISArrayField, - 3 : SISCompressedField, - 4 : SISVersionField, - 5 : SISVersionRangeField, - 6 : SISDateField, - 7 : SISTimeField, - 8 : SISDateTimeField, - 9 : SISUidField, - 10 : SISUnsupportedField, - 11 : SISLanguageField, - 12 : SISContentsField, - 13 : SISControllerField, - 14 : SISInfoField, - 15 : SISSupportedLanguagesField, - 16 : SISSupportedOptionsField, - 17 : SISPrerequisitiesField, - 18 : SISDependencyField, - 19 : SISPropertiesField, - 20 : SISPropertyField, - 21 : SISSignaturesField, - 22 : SISCertificateChainField, - 23 : SISLogoField, - 24 : SISFileDescriptionField, - 25 : SISHashField, - 26 : SISIfField, - 27 : SISElseIfField, - 28 : SISInstallBlockField, - 29 : SISExpressionField, - 30 : SISDataField, - 31 : SISDataUnitField, - 32 : SISFileDataField, - 33 : SISSupportedOptionField, - 34 : SISControllerChecksumField, - 35 : SISDataChecksumField, - 36 : SISSignatureField, - 37 : SISBlobField, - 38 : SISSignatureAlgorithmField, - 39 : SISSignatureCertificateChainField, - 40 : SISDataIndexField, - 41 : SISCapabilitiesField + 1: SISStringField, + 2: SISArrayField, + 3: SISCompressedField, + 4: SISVersionField, + 5: SISVersionRangeField, + 6: SISDateField, + 7: SISTimeField, + 8: SISDateTimeField, + 9: SISUidField, + 10: SISUnsupportedField, + 11: SISLanguageField, + 12: SISContentsField, + 13: SISControllerField, + 14: SISInfoField, + 15: SISSupportedLanguagesField, + 16: SISSupportedOptionsField, + 17: SISPrerequisitiesField, + 18: SISDependencyField, + 19: SISPropertiesField, + 20: SISPropertyField, + 21: SISSignaturesField, + 22: SISCertificateChainField, + 23: SISLogoField, + 24: SISFileDescriptionField, + 25: SISHashField, + 26: SISIfField, + 27: SISElseIfField, + 28: SISInstallBlockField, + 29: SISExpressionField, + 30: SISDataField, + 31: SISDataUnitField, + 32: SISFileDataField, + 33: SISSupportedOptionField, + 34: SISControllerChecksumField, + 35: SISDataChecksumField, + 36: SISSignatureField, + 37: SISBlobField, + 38: SISSignatureAlgorithmField, + 39: SISSignatureCertificateChainField, + 40: SISDataIndexField, + 41: SISCapabilitiesField } [StringField, @@ -818,71 +824,71 @@ CapabilitiesField] = range(1, 42) FieldNames = { - 0 : "ROOT", - StringField : "StringField", - ArrayField : "ArrayField", - CompressedField : "CompressedField", - VersionField : "VersionField", - VersionRangeField : "VersionRangeField", - DateField : "DateField", - TimeField : "TimeField", - DateTimeField : "DateTimeField", - UidField : "UidField", - UnusedField : "UnusedField", - LanguageField : "LanguageField", - ContentsField : "ContentsField", - ControllerField : "ControllerField", - InfoField : "InfoField", - SupportedLanguagesField : "SupportedLanguagesField", - SupportedOptionsField : "SupportedOptionsField", - PrerequisitiesField : "PrerequisitiesField", - DependencyField : "DependencyField", - PropertiesField : "PropertiesField", - PropertyField : "PropertyField", - SignaturesField : "SignaturesField", - CertificateChainField : "CertificateChainField", - LogoField : "LogoField", - FileDescriptionField : "FileDescriptionField", - HashField : "HashField", - IfField : "IfField", - ElseIfField : "ElseIfField", - InstallBlockField : "InstallBlockField", - ExpressionField : "ExpressionField", - DataField : "DataField", - DataUnitField : "DataUnitField", - FileDataField : "FileDataField", - SupportedOptionField : "SupportedOptionField", - ControllerChecksumField : "ControllerChecksumField", - DataChecksumField : "DataChecksumField", - SignatureField : "SignatureField", - BlobField : "BlobField", - SignatureAlgorithmField : "SignatureAlgorithmField", - SignatureCertificateChainField : "SignatureCertificateChainField", - DataIndexField : "DataIndexField", - CapabilitiesField : "CapabilitiesField" + 0: "ROOT", + StringField: "StringField", + ArrayField: "ArrayField", + CompressedField: "CompressedField", + VersionField: "VersionField", + VersionRangeField: "VersionRangeField", + DateField: "DateField", + TimeField: "TimeField", + DateTimeField: "DateTimeField", + UidField: "UidField", + UnusedField: "UnusedField", + LanguageField: "LanguageField", + ContentsField: "ContentsField", + ControllerField: "ControllerField", + InfoField: "InfoField", + SupportedLanguagesField: "SupportedLanguagesField", + SupportedOptionsField: "SupportedOptionsField", + PrerequisitiesField: "PrerequisitiesField", + DependencyField: "DependencyField", + PropertiesField: "PropertiesField", + PropertyField: "PropertyField", + SignaturesField: "SignaturesField", + CertificateChainField: "CertificateChainField", + LogoField: "LogoField", + FileDescriptionField: "FileDescriptionField", + HashField: "HashField", + IfField: "IfField", + ElseIfField: "ElseIfField", + InstallBlockField: "InstallBlockField", + ExpressionField: "ExpressionField", + DataField: "DataField", + DataUnitField: "DataUnitField", + FileDataField: "FileDataField", + SupportedOptionField: "SupportedOptionField", + ControllerChecksumField: "ControllerChecksumField", + DataChecksumField: "DataChecksumField", + SignatureField: "SignatureField", + BlobField: "BlobField", + SignatureAlgorithmField: "SignatureAlgorithmField", + SignatureCertificateChainField: "SignatureCertificateChainField", + DataIndexField: "DataIndexField", + CapabilitiesField: "CapabilitiesField" } CapabilityNames = { - 0 : "TCB", - 1 : "CommDD", - 2 : "PowerMgmt", - 3 : "MultimediaDD", - 4 : "ReadDeviceData", - 5 : "WriteDeviceData", - 6 : "DRM", - 7 : "TrustedUI", - 8 : "ProtServ", - 9 : "DiskAdmin", - 10 : "NetworkControl", - 11 : "AllFiles", - 12 : "SwEvent", - 13 : "NetworkServices", - 14 : "LocalServices", - 15 : "ReadUserData", - 16 : "WriteUserData", - 17 : "Location", - 18 : "SurroundingsDD", - 19 : "UserEnvironment" + 0: "TCB", + 1: "CommDD", + 2: "PowerMgmt", + 3: "MultimediaDD", + 4: "ReadDeviceData", + 5: "WriteDeviceData", + 6: "DRM", + 7: "TrustedUI", + 8: "ProtServ", + 9: "DiskAdmin", + 10: "NetworkControl", + 11: "AllFiles", + 12: "SwEvent", + 13: "NetworkServices", + 14: "LocalServices", + 15: "ReadUserData", + 16: "WriteUserData", + 17: "Location", + 18: "SurroundingsDD", + 19: "UserEnvironment" } InstallTypes = { @@ -893,86 +899,86 @@ 4: "PP" } -class SISReader : +class SISReader: """ SIS Reader """ - def __init__(self) : + def __init__(self): self.bytesRead = 0 - def readUnsignedBytes(self, numBytes) : + def readUnsignedBytes(self, numBytes): """read Unsigned bytes""" buf = self.readPlainBytes(numBytes) - if len(buf) < numBytes : + if len(buf) < numBytes: return [] - format = "" - for _ in range(numBytes) : - format += "B" - return struct.unpack(format, buf) + format_ = "" + for _ in range(numBytes): + format_ += "B" + return struct.unpack(format_, buf) - def readSignedBytes(self, numBytes) : + def readSignedBytes(self, numBytes): """read signed bytes""" buf = self.readPlainBytes(numBytes) - if len(buf) < numBytes : + if len(buf) < numBytes: return [] - format = "" - for _ in range(numBytes) : - format += "b" - return struct.unpack(format, buf) + format_ = "" + for _ in range(numBytes): + format_ += "b" + return struct.unpack(format_, buf) - def readBytesAsUint(self, numBytes) : + def readBytesAsUint(self, numBytes): """read bytes as Unit""" result = 0 - bytes = self.readUnsignedBytes(numBytes) - if len(bytes) == numBytes : - for i_byte in range(numBytes) : - result |= bytes[i_byte] << (i_byte * 8) + bytes_ = self.readUnsignedBytes(numBytes) + if len(bytes_) == numBytes: + for i_byte in range(numBytes): + result |= bytes_[i_byte] << (i_byte * 8) return result - def readBytesAsInt(self, numBytes) : + def readBytesAsInt(self, numBytes): """read bytes as Integer""" result = 0 - bytes = self.readSignedBytes(numBytes) - if len(bytes) == numBytes : - for i_byte in range(numBytes) : - result |= bytes[i_byte] << (i_byte * 8) + bytes_ = self.readSignedBytes(numBytes) + if len(bytes_) == numBytes: + for i_byte in range(numBytes): + result |= bytes_[i_byte] << (i_byte * 8) return result - def skipPadding(self) : + def skipPadding(self): """skip padding""" result = 0 - if self.bytesRead % 4 != 0 : + if self.bytesRead % 4 != 0: paddingLength = 4 - self.bytesRead % 4 self.readPlainBytes(paddingLength) result = paddingLength return result - def readPlainBytes(self, numBytes) : + def readPlainBytes(self, numBytes): """read plain bytes""" pass -class SISFileReader(SISReader) : +class SISFileReader(SISReader): """ SIS File Reader """ - def __init__(self, inStream) : + def __init__(self, inStream): SISReader.__init__(self) self.inStream = inStream self.eof = False self.bytesRead = 0 - def readPlainBytes(self, numBytes) : + def readPlainBytes(self, numBytes): """read Plain byytes""" - if self.eof : + if self.eof: return "" - if numBytes == 0 : + if numBytes == 0: return "" buf = "" buf = self.inStream.read(numBytes) - if len(buf) < numBytes : + if len(buf) < numBytes: self.eof = True return "" @@ -980,121 +986,122 @@ return buf - def isEof(self) : + def isEof(self): """is it End of File""" return self.eof -class SISBufferReader(SISReader) : +class SISBufferReader(SISReader): """ SIS Buffer reader """ - def __init__(self, buffer) : - self.buffer = buffer + def __init__(self, buffer_): + SISReader.__init__(self) + self.buffer_ = buffer_ self.bytesRead = 0 - def readPlainBytes(self, numBytes) : + def readPlainBytes(self, numBytes): """read Plain bytes""" - if self.isEof() : + if self.isEof(): return "" - if numBytes == 0 : + if numBytes == 0: return "" - result = self.buffer[self.bytesRead:self.bytesRead + numBytes] + result = self.buffer_[self.bytesRead:self.bytesRead + numBytes] self.bytesRead += numBytes return result - def isEof(self) : + def isEof(self): """is it End of File""" - return self.bytesRead >= len(self.buffer) + return self.bytesRead >= len(self.buffer_) -class SISFieldParser : +class SISFieldParser: """ Parser to read a SIS field """ - def __init__(self) : + def __init__(self): self.lastReadBytes = 0 - def parseField(self, fileReader) : + def parseField(self, fileReader): """Reads the next field from the fileReader stream and returns it""" field = None self.lastReadBytes = 0 - type = fileReader.readBytesAsUint(4) + type_ = fileReader.readBytesAsUint(4) self.lastReadBytes += 4 - if type != 0 : - field = SISFieldTypes[type]() - field.type = type + if type_ != 0: + field = SISFieldTypes[type_]() + field.type_ = type_ field.initFromFile(fileReader) self.lastReadBytes += field.length + 4 # Field length + length field self.lastReadBytes += fileReader.skipPadding() return field -class SISInfo(SISField) : +class SISInfo(SISField): """ SIS file information """ - def __init__(self) : + def __init__(self): SISField.__init__(self) self.fin = None self.fileHeader = SISFileHeader() - def parse(self, filename) : + def parse(self, filename): """parse""" fin = open(filename, 'rb') fileReader = SISFileReader(fin) self.parseHeader(fileReader) self.parseSISFields(fileReader) - def parseHeader(self, fileReader) : + def parseHeader(self, fileReader): """parse Holder""" self.fileHeader.uid1 = fileReader.readBytesAsUint(4) self.fileHeader.uid2 = fileReader.readBytesAsUint(4) self.fileHeader.uid3 = fileReader.readBytesAsUint(4) self.fileHeader.uidChecksum = fileReader.readBytesAsUint(4) - def parseSISFields(self, fileReader) : + def parseSISFields(self, fileReader): """parse SIS Fileds""" parser = SISFieldParser() - while not fileReader.isEof() : + while not fileReader.isEof(): self.subFields.append(parser.parseField(fileReader)) -class Handler : +class Handler: """ A handler class """ - def __init__(self) : + def __init__(self): self.files = [] self.fileDatas = [] self.signatureCertificateChains = [] - def handleField(self, field, _) : + def handleField(self, field, _): """handle Field""" - if field.type == FileDescriptionField : + if field.type_ == FileDescriptionField: self.files.append(field) - elif field.type == FileDataField : + elif field.type_ == FileDataField: self.fileDatas.append(field) - elif field.type == SignatureCertificateChainField : + elif field.type_ == SignatureCertificateChainField : self.signatureCertificateChains.append(field) - def execute(self, options) : + def execute(self, options): """execute""" - for f_file in self.files : - if options.info : + for f_file in self.files: + if options.info: buf = " " + f_file.findField(StringField)[0].readableStr() caps = f_file.findField(CapabilitiesField)[0] - if caps : + if caps: buf += " [" + " ".join(f_file.findField(CapabilitiesField)[0].readableCaps) + "]" print buf - if options.extract : + if options.extract: parts = f_file.findField(StringField)[0].readableStr().split("\\") - if len(parts[len(parts) - 1]) > 0 : + if len(parts[len(parts) - 1]) > 0: path = os.path.abspath(options.extract) path += os.sep + os.sep.join(parts[1: - 1]) - if not os.path.exists(path) : + if not os.path.exists(path): os.makedirs(path) newFile = file(path + os.sep + parts[len(parts) - 1], "wb") newFile.write(self.fileDatas[f_file.fileIndex].findField(CompressedField)[0].data) newFile.close() - for sig in self.signatureCertificateChains : + for sig in self.signatureCertificateChains: if options.certificate: buf = sig.findField(CertificateChainField)[0].subFields[0].data print "Certificate chain:" i_num = 1 - while len(buf) > 0 : + while len(buf) > 0: print " Certificate " + str(i_num) + ":" i_num += 1 decoded = decoder.decode(buf) @@ -1104,24 +1111,24 @@ print " " + "\n ".join(readableStr.split('\n')) buf = decoded[1] -class ContentPrinter : +class ContentPrinter: """ A handler class which prints the field contents """ - def __init__(self) : + def __init__(self): pass - def handleField(self, field, depth) : + def handleField(self, field, depth): """handle Field""" buf = "" - for _ in range(depth) : + for _ in range(depth): buf += " " - buf += FieldNames[field.type] + " " - if len(field.readableStr()) > 0 : + buf += FieldNames[field.type_] + " " + if len(field.readableStr()) > 0: buf += field.readableStr() print buf -class IADHandler : +class IADHandler: """ IAD handler class """ - def __init__(self) : + def __init__(self): self.packageVersion = (0, 0, 0) self.packageUid = 0 self.vendorName = "" @@ -1132,26 +1139,29 @@ self.packageDependencies = [] self.installType = 0 self.installFlags = 0 + self.packageVersionField = None + self.packageUidField = None + self.vendorNameField = None - def handleDependency(self, field) : + def handleDependency(self, field): """handle dependancy""" dep = [0, - 1, - 1, - 1, - 1, - 1, - 1] dep[0] = field.subFields[0].uid - if field.subFields[1] and field.subFields[1].type == VersionRangeField : + if field.subFields[1] and field.subFields[1].type_ == VersionRangeField: res = field.subFields[1] - if res.fromVersion != None : + if res.fromVersion != None: dep[1] = res.fromVersion.version[0] dep[2] = res.fromVersion.version[1] dep[3] = res.fromVersion.version[2] - if res.toVersion != None : + if res.toVersion != None: dep[4] = res.toVersion.version[0] dep[5] = res.toVersion.version[1] dep[6] = res.toVersion.version[2] return dep - def handleField(self, field, _) : + def handleField(self, field, _): """handle Field""" - if field.type == InfoField : + if field.type_ == InfoField: self.packageVersion = field.subFields[4].version self.packageVersionField = field.subFields[4] self.packageUid = field.subFields[0].uid @@ -1160,19 +1170,19 @@ self.vendorNameField = field.subFields[1] self.installType = field.installType self.installFlags = field.installFlags - for name in field.subFields[2].subFields : + for name in field.subFields[2].subFields: self.packageNames.append(name.data) - elif field.type == LanguageField : + elif field.type_ == LanguageField: self.languages.append(field.language) - elif field.type == PrerequisitiesField : - for f_field in field.subFields[0].subFields : + elif field.type_ == PrerequisitiesField: + for f_field in field.subFields[0].subFields: dependency = self.handleDependency(f_field) self.platformDependencies.append(dependency) - for f_field in field.subFields[1].subFields : + for f_field in field.subFields[1].subFields: dependency = self.handleDependency(f_field) self.packageDependencies.append(dependency) - def getInfo (self, fileName) : + def getInfo (self, fileName): """get Info""" sisInfo = SISInfo() sisInfo.parse(fileName) @@ -1187,11 +1197,11 @@ + "" + repr(handler.packageVersion[2]) + "" \ + "\n" \ + " " + InstallTypes[self.installType] + "\n" - for num, name in enumerate(handler.packageNames) : + for num, name in enumerate(handler.packageNames): info += " " + name + "\n" - for language in handler.languages : + for language in handler.languages: info += " " + repr(language) + "\n" - for platDep in handler.platformDependencies : + for platDep in handler.platformDependencies: info += " " + hex(platDep[0]) + "\n" info += " " \ + "" + repr(platDep[1]) + "" \ @@ -1203,7 +1213,7 @@ # info += "" + repr(platDep[6]) + "" info += "\n" \ + " \n" - for packageDep in handler.packageDependencies : + for packageDep in handler.packageDependencies: info += " " + hex(packageDep[0]) + "\n" info += " " \ + "" + repr(packageDep[1]) + "" \ @@ -1218,6 +1228,6 @@ info += "\n" return info -if __name__ == "__main__" : +if __name__ == "__main__": _handler = IADHandler() print (_handler.getInfo (sys.argv[1])) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/ido.py --- a/buildframework/helium/sf/python/pythoncore/lib/ido.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/ido.py Mon Sep 13 13:11:19 2010 +0800 @@ -29,13 +29,13 @@ def get_sysdef_location(sysdef): """ Search for layer_real_source_path entity inside the sysdef file. """ - input = open(sysdef, 'r') - for line in input.readlines(): + input_ = open(sysdef, 'r') + for line in input_.readlines(): result = MATCH_ENTITY.match(line) if result != None: - input.close() + input_.close() return result.groups()[0] - input.close() + input_.close() print 'layer_real_source_path entity not found in ' + sysdef return None diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/idoprep.py --- a/buildframework/helium/sf/python/pythoncore/lib/idoprep.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/idoprep.py Mon Sep 13 13:11:19 2010 +0800 @@ -34,13 +34,13 @@ s60 grace release are set. """ if not grace: - raise Exception("Property 's60.grace.server' is not defined.") + raise EnvironmentError("Property 's60.grace.server' is not defined.") if not service: - raise Exception("Property 's60.grace.service' is not defined.") + raise EnvironmentError("Property 's60.grace.service' is not defined.") if not product: - raise Exception("Property 's60.grace.product' is not defined.") + raise EnvironmentError("Property 's60.grace.product' is not defined.") if not release: - raise Exception("Property 's60.grace.release' is not defined.") + raise EnvironmentError("Property 's60.grace.release' is not defined.") def get_s60_env_details(grace, service, product, release, rev, cachefilename, s60gracecheckmd5, s60graceusetickler): """ Return s60 environ details """ @@ -59,7 +59,7 @@ branch = os.path.join(grace, service, product) if not os.path.exists(branch): - raise Exception("Error occurred: Could not find directory %s" % branch) + raise IOError("Error occurred: Could not find directory %s" % branch) result = [] for rel in os.listdir(branch): @@ -92,14 +92,14 @@ _logger.info(str("%s is not a valid release." % rel)) elif metadata_filename is None: _logger.info(str("Could not find the release metadata file under %s" % rel)) - except Exception, exc: + except IOError, exc: _logger.warning(str("WARNING: %s: %s" % (rel , exc))) _logger.warning(("%s is not a valid release." % rel)) traceback.print_exc() result = validresults if len(result) == 0: - raise Exception("Error finding GRACE release.") + raise EnvironmentError("Error finding GRACE release.") print result[0] return result @@ -119,10 +119,10 @@ def create_ado_mapping(sysdefconfig, adomappingfile, adoqualitymappingfile, builddrive, adoqualitydirs): """ Creates ado mapping and ado quality mapping files """ - input = open(sysdefconfig, 'r') + input_ = open(sysdefconfig, 'r') output = open(adomappingfile, 'w') outputquality = open(adoqualitymappingfile, 'w') - for sysdef in input.readlines(): + for sysdef in input_.readlines(): sysdef = sysdef.strip() if len(sysdef) > 0: print "Checking %s" % sysdef @@ -143,14 +143,14 @@ if adoqualitydirs == None: outputquality.write("%s=%s\n" % (sysdef, component)) else: - for dir in adoqualitydirs.split(','): - if os.path.normpath(dir) == os.path.normpath(os.path.join(builddrive, os.environ['EPOCROOT'], location)): + for dir_ in adoqualitydirs.split(','): + if os.path.normpath(dir_) == os.path.normpath(os.path.join(builddrive, os.environ['EPOCROOT'], location)): outputquality.write("%s=%s\n" % (sysdef, component)) outputquality.close() output.close() - input.close() + input_.close() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/imaker/__init__.py --- a/buildframework/helium/sf/python/pythoncore/lib/imaker/__init__.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/imaker/__init__.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,6 +18,6 @@ #=============================================================================== """ iMaker framework. """ -from api import * #this needs to remain here even though pylint throws it as - #a warning 'unused' due to being needed by what imports this AGH!!! - #can't the thing that imports this import the api file? +from imaker.api import * #this needs to remain here even though pylint throws it as + #a warning 'unused' due to being needed by what imports this AGH!!! + #can't the thing that imports this import the api file? diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/integration/ant.py --- a/buildframework/helium/sf/python/pythoncore/lib/integration/ant.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/integration/ant.py Mon Sep 13 13:11:19 2010 +0800 @@ -46,7 +46,7 @@ for filename in components_per_file.keys(): if len(components_per_file[filename]) > 1: output.write(" \n" % filename) - output.write("".join(map(lambda x: " \n" % x, components_per_file[filename]))) + output.write("".join([" \n" % x for x in components_per_file[filename]])) output.write(" \n") output.write("\n") output.close() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/integration/quality.py --- a/buildframework/helium/sf/python/pythoncore/lib/integration/quality.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/integration/quality.py Mon Sep 13 13:11:19 2010 +0800 @@ -144,7 +144,7 @@ value = None try: value = fileutils.read_policy_content(filename) - except Exception: + except IOError: yield ["invalidencoding", filename, None] if value is not None: if self._ids != None: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/log2xml.py --- a/buildframework/helium/sf/python/pythoncore/lib/log2xml.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/log2xml.py Mon Sep 13 13:11:19 2010 +0800 @@ -123,11 +123,11 @@ v_char = ord(char) if v_char == 0x9 or v_char == 0xa or v_char == 0xd: result += char - elif v_char>=0x20 and v_char <= 0xd7ff: + elif v_char >= 0x20 and v_char <= 0xd7ff: result += char - elif v_char>=0xe000 and v_char <= 0xfffd: + elif v_char >= 0xe000 and v_char <= 0xfffd: result += char - elif v_char>=0x10000 and v_char <= 0x10ffff: + elif v_char >= 0x10000 and v_char <= 0x10ffff: result += char else: result += " " @@ -330,6 +330,7 @@ class ContentWriter(ContentHandler): """ SAX Content writer. Parse and write an XML file. """ def __init__(self, op_sys, indent=""): + ContentHandler.__init__(self) self.os = op_sys self.indent = indent self.__content = u"" @@ -339,7 +340,7 @@ self.os.write(self.indent + "<" + name) if attrs.getLength() > 0: self.os.write(" ") - self.os.write(" ".join(map(lambda x: "%s=\"%s\"" % (x, attrs.getValue(x)), attrs.getNames()))) + self.os.write(" ".join(["%s=\"%s\"" % (x, attrs.getValue(x)) for x in attrs.getNames()])) self.os.write(">\n") self.indent += "\t" self.__content = "" @@ -385,26 +386,26 @@ parser = make_parser() parser.setContentHandler(AppendSummary(outfile, xmllog)) - input = open(summary, 'r') - parser.parse(input) - input.close() + input_ = open(summary, 'r') + parser.parse(input_) + input_.close() outfile.close() # Updating the summary file. os.unlink(summary) os.rename(summary + ".tmp", summary) -def symbian_log_header(output, config, command, dir): +def symbian_log_header(output, config, command, dir_): """symbian log header""" output.log("===-------------------------------------------------") output.log("=== %s" % config) output.log("===-------------------------------------------------") output.log("=== %s started %s" % (config, datetime.datetime.now().ctime())) - output.log("=== %s == %s" % (config, dir)) + output.log("=== %s == %s" % (config, dir_)) output.log("-- %s" % command) output.log("++ Started at %s" % datetime.datetime.now().ctime()) output.log("+++ HiRes Start %f" % time.time()) - output.log("Chdir %s" % dir) + output.log("Chdir %s" % dir_) def symbian_log_footer(output): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/nokia/get_gscm_info.pl --- a/buildframework/helium/sf/python/pythoncore/lib/nokia/get_gscm_info.pl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/nokia/get_gscm_info.pl Mon Sep 13 13:11:19 2010 +0800 @@ -42,7 +42,10 @@ } else { - $gscm_lib = $ENV{'CCM_HOME'} . "/../gscm-apps/lib"; # TODO: remove hardcoded path! + use File::Basename; + + # Do not use .. because evaluation get wrong under 64-bit Linux + $gscm_lib = dirname($ENV{'CCM_HOME'}) . "/gscm-apps/lib"; # TODO: remove hardcoded path! } my ($perl_version) = $Config{version} =~ /^(\d+\.\d+)/; unshift @INC, "$gscm_lib/$perl_version/$archname", "$gscm_lib/$perl_version", $gscm_lib; diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/nokia/gscm.py --- a/buildframework/helium/sf/python/pythoncore/lib/nokia/gscm.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/nokia/gscm.py Mon Sep 13 13:11:19 2010 +0800 @@ -44,7 +44,7 @@ """ Generic method that call function 'method' on GSCM wrapper script. """ (f_desc, filename) = tempfile.mkstemp() f_file = os.fdopen(f_desc, 'w') - f_file.write(pkg_resources.resource_string(__name__, "get_gscm_info.pl"))# pylint: disable-msg=E1101 + f_file.write(pkg_resources.resource_string(__name__, "get_gscm_info.pl"))# pylint: disable=E1101 f_file.close() command = "perl " + filename command += " %s %s" % (method, dbname) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/packageiad.py --- a/buildframework/helium/sf/python/pythoncore/lib/packageiad.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/packageiad.py Mon Sep 13 13:11:19 2010 +0800 @@ -38,11 +38,11 @@ """ get the list of build directories """ units = layer.getElementsByTagName ("unit") for unit in units : - dir = unit.getAttribute ("bldFile").rstrip ('\\/') - i = dir.rfind ("\\") + dir_ = unit.getAttribute ("bldFile").rstrip ('\\/') + i = dir_.rfind ("\\") if i == - 1 : - i = dir.rfind ("/") - bldDirs.append (dir[:i + 1]) + i = dir_.rfind ("/") + bldDirs.append (dir_[:i + 1]) def getLayer(self, configuration, layers, bldDirs) : """ get each layer info """ @@ -93,14 +93,14 @@ sisFile = packageName + '/' + packageName + ".sis" infoFile = packageName + "/sisinfo.xml" depFile = packageName + "/depends.xml" - zip = zipfile.ZipFile (zipFile, "w") - zip.write (sisFile, sisFile.encode ("utf-8")) - zip.write (infoFile, infoFile.encode ("utf-8")) - zip.write (depFile, depFile.encode ("utf-8")) + zip_ = zipfile.ZipFile (zipFile, "w") + zip_.write (sisFile, sisFile.encode ("utf-8")) + zip_.write (infoFile, infoFile.encode ("utf-8")) + zip_.write (depFile, depFile.encode ("utf-8")) if self.hasStub : stubFile = packageName + '/' + packageName + "_stub.sis" - zip.write (stubFile, stubFile.encode ("utf-8")) - zip.close() + zip_.write (stubFile, stubFile.encode ("utf-8")) + zip_.close() def processSisDir(self, sisDir, makesis) : diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/preparation.py --- a/buildframework/helium/sf/python/pythoncore/lib/preparation.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/preparation.py Mon Sep 13 13:11:19 2010 +0800 @@ -364,7 +364,7 @@ co_role = ccm.get_role_for_purpose(session, self._config['purpose']) _logger.info("Switching user to role: %s" % co_role) session.role = co_role - _logger.info("Switched user to role: %s" % session._get_role()) + _logger.info("Switched user to role: %s" % session.role) def __restoreRole(self, session): @@ -374,7 +374,7 @@ session.role = self.__role self.__role = None - _logger.info("Switched user to role: %s" % session._get_role()) + _logger.info("Switched user to role: %s" % session.role) def __setup_project(self, project, coproject): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_archive.py Mon Sep 13 13:11:19 2010 +0800 @@ -30,20 +30,20 @@ import fileutils import xml.dom.minidom import tempfile -import test_fileutils +import pythoncorecpythontests.test_fileutils _logger = logging.getLogger('test.archive') -_root_test_dir = test_fileutils._root_test_dir +root_test_dir = pythoncorecpythontests.test_fileutils.root_test_dir def setup_module(): """ Creates some test data files for file-related testing. """ - test_fileutils.setup_module() + pythoncorecpythontests.test_fileutils.setup_module() def teardown_module(): """ Cleans up test data files for file-related testing. """ - test_fileutils.teardown_module() + pythoncorecpythontests.test_fileutils.teardown_module() class ArchivePreBuilderTest(unittest.TestCase): @@ -55,7 +55,7 @@ builder = configuration.NestedConfigurationBuilder(os.environ['TEST_DATA'] + '/data/archive_test_input.cfg.xml') archiveConfigSet = builder.getConfiguration() archivePreBuilder = archive.ArchivePreBuilder(archiveConfigSet, "config", index=0) - buildFilePath = os.path.join(_root_test_dir, r'archive_test.ant.xml') + buildFilePath = os.path.join(root_test_dir, r'archive_test.ant.xml') archivePreBuilder.write(buildFilePath) build_file = open(buildFilePath) build_file_content = build_file.read() @@ -80,9 +80,9 @@ def test_manifest_files(self): """ A LogicalArchive can create a correct manifest. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'manifest_test', 'include': 'dir1/*.txt', 'archive.tool': '7za' @@ -94,7 +94,7 @@ expectedPaths = [os.path.normpath('dir1/file1.txt')] - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_includefile.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/manifest_test_includefile.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -105,9 +105,9 @@ def test_empty_manifest_file(self): """ A LogicalArchive can handle empty manifest. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'manifest_test', 'include': 'nothing', 'archive.tool': '7za' @@ -119,7 +119,7 @@ expectedPaths = [] - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_includefile.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/manifest_test_includefile.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -130,16 +130,16 @@ def test_manifest_files_with_exclude_list(self): """ A LogicalArchive can create a correct manifest. """ - excludelst = os.path.join(_root_test_dir, 'exclude.lst') + excludelst = os.path.join(root_test_dir, 'exclude.lst') flh = open(excludelst, 'w+') flh.write("/epoc32/tools/variant/variant.cfg\n") flh.write("\\epoc32\\tools\\abld.pl\n") - flh.write(os.path.join(_root_test_dir, 'dir1', 'file1.txt') + "\n") - flh.write(os.path.join(_root_test_dir, 'dir1/subdir1/subdir1_file.txt') + "\n") + flh.write(os.path.join(root_test_dir, 'dir1', 'file1.txt') + "\n") + flh.write(os.path.join(root_test_dir, 'dir1/subdir1/subdir1_file.txt') + "\n") flh.close() - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'manifest_test', 'include': 'dir1/**', 'exclude.lst': excludelst, @@ -157,7 +157,7 @@ ] expectedPaths.sort() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_includefile.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/manifest_test_includefile.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -169,17 +169,17 @@ def test_manifestfiles_wth_xcld_lst_abs_ndrv(self): """ A LogicalArchive can create a correct manifest with external list and drive. """ - rtd = os.path.splitdrive(os.path.abspath(_root_test_dir))[1] - excludelst = os.path.join(_root_test_dir, 'exclude.lst') + rtd = os.path.splitdrive(os.path.abspath(root_test_dir))[1] + excludelst = os.path.join(root_test_dir, 'exclude.lst') flh = open(excludelst, 'w+') flh.write("/epoc32/tools/variant/variant.cfg\n") flh.write("\\epoc32\\tools\\abld.pl\n") flh.write(os.path.join(rtd, 'dir1', 'file1.txt') + "\n") flh.write(os.path.join(rtd, 'dir1/subdir1/subdir1_file.txt') + "\n") flh.close() - configDict = {'root.dir': os.path.abspath(_root_test_dir), - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': os.path.abspath(root_test_dir), + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'manifest_test', 'include': 'dir1/**', 'exclude.lst': excludelst, @@ -197,7 +197,7 @@ ] expectedPaths.sort() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_includefile.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/manifest_test_includefile.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -243,9 +243,9 @@ def do_distribution_policy_config(self, expected_paths, policy): """ . """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 's60_policy_test', 'include': 's60/', 'distribution.policy.s60': policy, @@ -256,7 +256,7 @@ builder = archive.ArchivePreBuilder(configuration.ConfigurationSet([config]), "config", index=0) builder.build_manifest(config) - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_test_includefile.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/s60_policy_test_includefile.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -277,9 +277,9 @@ def test_split_manifest_file_unicode(self): """ A LogicalArchive can split a manifest correctly. """ - configDict = {'root.dir': os.path.abspath(_root_test_dir), - 'temp.build.dir': os.path.abspath(os.path.join(_root_test_dir, 'temp_build_files')), - 'archives.dir': os.path.abspath(_root_test_dir), + configDict = {'root.dir': os.path.abspath(root_test_dir), + 'temp.build.dir': os.path.abspath(os.path.join(root_test_dir, 'temp_build_files')), + 'archives.dir': os.path.abspath(root_test_dir), 'name': 'manifest_test_unicode', 'max.files.per.archive': '1', 'include': 'test_unicode/', @@ -291,10 +291,10 @@ manifest_file_path = builder.build_manifest(config) builder.manifest_to_commands(config, manifest_file_path) - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_unicode_includefile.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_unicode_part01.txt') - includeFilePath2 = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_unicode_part02.txt') - includeFilePath3 = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_unicode_part03.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/manifest_test_unicode_includefile.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/manifest_test_unicode_part01.txt') + includeFilePath2 = os.path.join(root_test_dir, 'temp_build_files/manifest_test_unicode_part02.txt') + includeFilePath3 = os.path.join(root_test_dir, 'temp_build_files/manifest_test_unicode_part03.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -316,9 +316,9 @@ def test_distribution_policy_mapper_config(self): """ Testing the policy mapper. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 's60_policy_mapper_test', 'include': 's60/', 'archive.tool': '7za', @@ -372,11 +372,11 @@ if os.sep == '\\': for i in range(len(expected_paths9999)): expected_paths9999[i] = expected_paths9999[i].lower() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_includefile.txt') - includeFilePath0 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_0.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_1.txt') - includeFilePath9999 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_9999.txt') - includeFilePathInternal = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test.internal.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_includefile.txt') + includeFilePath0 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_0.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_1.txt') + includeFilePath9999 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_9999.txt') + includeFilePathInternal = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test.internal.txt') content = self.__read_manifest(includeFilePath) expected_paths.sort() @@ -408,14 +408,14 @@ print "Commands : ", cmds assert len(cmds) == 3 -# pylint: disable-msg=C0103 +# pylint: disable=C0103 def test_distribution_policy_mapper_config_no_zip2zip(self): """ Testing the policy mapper. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 's60_policy_mapper_test_noz2z', 'include': 's60/', 'archive.tool': '7za', @@ -470,11 +470,11 @@ expected_paths9999[i] = expected_paths9999[i].lower() expected_paths.sort() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_includefile.txt') - includeFilePath0 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_0.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_1.txt') - includeFilePath9999 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_9999.txt') - includeFilePathInternal = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_noz2z.internal.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_includefile.txt') + includeFilePath0 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_0.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_1.txt') + includeFilePath9999 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_9999.txt') + includeFilePathInternal = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_noz2z.internal.txt') content = self.__read_manifest(includeFilePath) expected_paths.sort() @@ -508,12 +508,12 @@ def test_dist_policy_mapper_remover_config(self): """ Testing the policy remover mapper. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 's60_policy_mapper_test', 'include': 's60/', - 'policy.root.dir': os.path.join(_root_test_dir, 's60'), + 'policy.root.dir': os.path.join(root_test_dir, 's60'), 'archive.tool': '7za', 'mapper': 'policy.remover', 'policy.zip2zip': 'true', @@ -559,9 +559,9 @@ for i in range(len(expected_paths1)): expected_paths1[i] = expected_paths1[i].lower() expected_paths1.sort() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_includefile.txt') - includeFilePath0 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_0.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/s60_policy_mapper_test_1.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_includefile.txt') + includeFilePath0 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_0.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/s60_policy_mapper_test_1.txt') content = self.__read_manifest(includeFilePath) expected_paths.sort() @@ -587,12 +587,12 @@ def test_dist_policy_mapper_sf_remvr_config(self): """ Testing the policy SFL remover mapper. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'sf_policy_sf_mapper_test', 'include': 'sf/', - 'policy.root.dir': os.path.join(_root_test_dir, 'sf'), + 'policy.root.dir': os.path.join(root_test_dir, 'sf'), 'archive.tool': '7za', 'mapper': 'sfl.policy.remover', 'policy.zip2zip': 'false', @@ -659,12 +659,12 @@ for i in range(len(expected_paths9)): expected_paths9[i] = expected_paths9[i].lower() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_includefile.txt') - includeFilePath0 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_0.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_1.txt') - includeFilePath3 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_3.txt') - includeFilePath7 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_7.txt') - includeFilePath9 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_9999.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_includefile.txt') + includeFilePath0 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_0.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_1.txt') + includeFilePath3 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_3.txt') + includeFilePath7 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_7.txt') + includeFilePath9 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_sf_mapper_test_9999.txt') content = self.__read_manifest(includeFilePath) @@ -713,12 +713,12 @@ def test_dist_policy_mapper_epl_remvr_config(self): """ Testing the policy EPL remover mapper. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'sf_policy_epl_mapper_test', 'include': 'sf/', - 'policy.root.dir': os.path.join(_root_test_dir, 'sf'), + 'policy.root.dir': os.path.join(root_test_dir, 'sf'), 'archive.tool': '7za', 'mapper': 'epl.policy.remover', 'policy.zip2zip': 'false', @@ -785,12 +785,12 @@ for i in range(len(expected_paths9)): expected_paths9[i] = expected_paths9[i].lower() - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_includefile.txt') - includeFilePath0 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_0.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_1.txt') - includeFilePath3 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_3.txt') - includeFilePath7 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_7.txt') - includeFilePath9 = os.path.join(_root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_9999.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_includefile.txt') + includeFilePath0 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_0.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_1.txt') + includeFilePath3 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_3.txt') + includeFilePath7 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_7.txt') + includeFilePath9 = os.path.join(root_test_dir, 'temp_build_files/sf_policy_epl_mapper_test_9999.txt') content = self.__read_manifest(includeFilePath) @@ -851,9 +851,9 @@ def test_split_manifest_file(self): """ A LogicalArchive can split a manifest correctly. """ - configDict = {'root.dir': os.path.abspath(_root_test_dir), - 'temp.build.dir': os.path.abspath(os.path.join(_root_test_dir, 'temp_build_files')), - 'archives.dir': os.path.abspath(_root_test_dir), + configDict = {'root.dir': os.path.abspath(root_test_dir), + 'temp.build.dir': os.path.abspath(os.path.join(root_test_dir, 'temp_build_files')), + 'archives.dir': os.path.abspath(root_test_dir), 'name': 'manifest_test', 'max.files.per.archive': '1', 'include': 'dir/', @@ -870,9 +870,9 @@ expectedPaths1 = ['dir' + os.sep + 'emptysubdir1\n'] expectedPaths2 = ['dir' + os.sep + 'emptysubdir2\n'] - includeFilePath = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_includefile.txt') - includeFilePath1 = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_part01.txt') - includeFilePath2 = os.path.join(_root_test_dir, 'temp_build_files/manifest_test_part02.txt') + includeFilePath = os.path.join(root_test_dir, 'temp_build_files/manifest_test_includefile.txt') + includeFilePath1 = os.path.join(root_test_dir, 'temp_build_files/manifest_test_part01.txt') + includeFilePath2 = os.path.join(root_test_dir, 'temp_build_files/manifest_test_part02.txt') with open(includeFilePath) as f_file: content = f_file.readlines() @@ -895,16 +895,16 @@ """test root drive value""" def test_checkRootDirValue(self): """ Testing the root drive value. """ - configDict = {'root.dir': _root_test_dir, - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + configDict = {'root.dir': root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'regular_path_test', 'include': 'dir1/*.txt', 'archive.tool': '7za' } configDictUnc = {'root.dir': "\\\\server\\share\\dir", - 'temp.build.dir': os.path.join(_root_test_dir, 'temp_build_files'), - 'archives.dir': _root_test_dir, + 'temp.build.dir': os.path.join(root_test_dir, 'temp_build_files'), + 'archives.dir': root_test_dir, 'name': 'unc_test', 'include': 'dir1/*.txt', 'archive.tool': '7za' @@ -926,7 +926,7 @@ self.assert_('\\\\server\\share1\\dir\\' in roots) self.assert_('\\\\server2\\share\\somedir\\' in roots) -class MockedConfigBuilder: +class MockedConfigBuilder(object): """.""" def writeToXML(self, xml_file, configs, parse_xml_file): @@ -965,9 +965,9 @@ """ Testing 7z archiver class """ def test_archive(self): """ Testing whether the ant file for running 7z is created """ - configDict = {'root.dir': os.path.abspath(_root_test_dir), - 'temp.build.dir': os.path.abspath(os.path.join(_root_test_dir, 'temp_build_files')), - 'archives.dir': os.path.abspath(_root_test_dir), + configDict = {'root.dir': os.path.abspath(root_test_dir), + 'temp.build.dir': os.path.abspath(os.path.join(root_test_dir, 'temp_build_files')), + 'archives.dir': os.path.abspath(root_test_dir), 'name': 'manifest_test', 'max.files.per.archive': '1', 'include': 'dir/', @@ -978,7 +978,7 @@ builder = archive.ArchivePreBuilder(configuration.ConfigurationSet([config]), "config", index=0) manifest_file_path = builder.build_manifest(config) builder.manifest_to_commands(config, manifest_file_path) - tmpfilename = os.path.join(os.path.abspath(_root_test_dir),'test_archive_7z.xml') + tmpfilename = os.path.join(os.path.abspath(root_test_dir),'test_archive_7z.xml') builder.write(tmpfilename) tmpfileh = open(tmpfilename,'r') content = tmpfileh.read() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3.py Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,7 @@ #=============================================================================== """ Testing ATS3 framework. """ -# pylint: disable-msg=E1101,C0302,w0142,w0603,R0912,R0902,R0903,R0201,W0404, R0915 +# pylint: disable=E1101,C0302,w0142,w0603,R0912,R0902,R0903,R0201,W0404, R0915 #w0142 => * and ** were used #w0603 => global variables used TSRC_PATH etc #R* => will be fixed while refactoring @@ -40,9 +40,9 @@ import subprocess import fileutils -from path import path # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 import amara -import mocker # pylint: disable-msg=F0401 +import mocker # pylint: disable=F0401 import ats3 import ats3.testconfigurator as atc @@ -560,7 +560,8 @@ trace_path=self.atp.file_store.joinpath(u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§", "traces", "set0", "tracelog.blx"), trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], - custom_dir=None, + custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[1] == dict(name="set1", image_files=self.image_files, @@ -574,6 +575,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[2] == dict(name="set2", @@ -591,6 +593,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[3] == dict(name="set3", data_files=[], @@ -607,6 +610,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[4] == dict(name="set4", @@ -624,6 +628,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) def test_post_actions_email(self): @@ -1155,6 +1160,7 @@ self.component_path = None self.custom_files = None self.ctc_run_process_params = None + self.dll_files = {} def generate_xml(self, harness, trace_enabled="False"): """Generates XML""" @@ -1165,6 +1171,8 @@ self.data_files = files("data/file1", "data/file2", "data/file3") self.config_files = files("conf/file1.cfg", "conf/file2.cfg") self.testmodule_files = files("testmodules/file1.dll", "testmodules/file2.dll") + self.dll_files["file1.dll"] = "EUNIT" + self.dll_files["file2.dll"] = "" self.image_files = files("output/images/file1.fpsx", "output/images/file2.fpsx") self.engine_ini_file = files("init/TestFramework.ini")[0] self.report_email = "test.receiver@company.com" @@ -1238,12 +1246,12 @@ config_files=self.config_files, testmodule_files=self.testmodule_files, engine_ini_file=self.engine_ini_file, test_harness=harness0,src_dst=self.src_dst0, ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, - custom_dir = self.custom_dir, component_path=self.component_path), + custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), dict(name="set1", image_files=self.image_files, data_files=self.data_files, config_files=self.config_files, testmodule_files=self.testmodule_files, engine_ini_file=self.engine_ini_file, test_harness=harness1, src_dst=self.src_dst1, ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, - custom_dir = self.custom_dir, component_path=self.component_path), + custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), ]) else: mocker.expect(test_plan.sets).result([ @@ -1253,14 +1261,14 @@ pmd_files=self.pmd_files, trace_activation_files=self.trace_activation_files, trace_path=self.file_store.joinpath("traces", "set0", "tracelog.blx"), ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, - custom_dir = self.custom_dir, component_path=self.component_path), + custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), dict(name="set1", image_files=self.image_files, data_files=self.data_files, config_files=self.config_files, testmodule_files=self.testmodule_files, engine_ini_file=self.engine_ini_file, test_harness=harness1, src_dst=self.src_dst1, pmd_files=self.pmd_files, trace_activation_files=self.trace_activation_files, trace_path=self.file_store.joinpath("traces", "set1", "tracelog.blx"), ctc_enabled=self.ctc_enabled, eunitexerunner_flags=self.eunitexerunner_flags, - custom_dir = self.custom_dir, component_path=self.component_path), + custom_dir = self.custom_dir, dll_files = self.dll_files, component_path=self.component_path), ]) mocker.expect(test_plan.post_actions).result([ ("SendEmailAction", (("subject", "email subject"), @@ -1417,16 +1425,7 @@ assert params[0].get("file") == path(r"z:" + os.sep + "sys" + os.sep + "bin" + os.sep + "EUNITEXERUNNER.EXE") assert params[1].get("result-file") == path(r"c:" + os.sep + "Shared" + os.sep + "EUnit" + os.sep + "logs" + os.sep + "file1_log.xml") assert params[2].get("parameters") == "/E S60AppEnv /R Off /F file1 /l xml file1.dll" - assert params[3].get("timeout") == "60" - step = steps.next() - file_ = self.testmodule_files[1] - assert step.get("name") == "Execute test: %s" % file_.name - assert step.findtext("./command") == "execute" - params = step.findall("./params/param") - assert params[0].get("file") == path(r"z:" + os.sep + "sys" + os.sep + "bin" + os.sep + "EUNITEXERUNNER.EXE") - assert params[1].get("result-file") == path(r"c:" + os.sep + "Shared" + os.sep + "EUnit" + os.sep + "logs" + os.sep + "file2_log.xml") - assert params[2].get("parameters") == "/E S60AppEnv /R Off /F file2 /l xml file2.dll" - assert params[3].get("timeout") == "60" + assert params[3].get("timeout") == "60" def test_steps_trace_enabled(self): """checks if traing is enabled""" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3_aste.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3_aste.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats3_aste.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,8 +21,8 @@ """ Testing ATS3 ASTE framework. """ -# pylint: disable-msg=W0603,W0142,R0903,R0911,R0912,R0902,R0901,R0201 -# pylint: disable-msg=E1101 +# pylint: disable=W0603,W0142,R0903,R0911,R0912,R0902,R0901,R0201 +# pylint: disable=E1101 #E1101 => Mocker shows mockery #R* remove during refactoring @@ -37,8 +37,8 @@ import zipfile import os -from path import path # pylint: disable-msg=F0401 -import mocker # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 +import mocker # pylint: disable=F0401 import ats3.aste diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4.py Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,7 @@ #=============================================================================== """ Testing ats4 framework. """ -# pylint: disable-msg=E1101, C0302, W0142, W0603, R0902,R0903,R0912,R0915 +# pylint: disable=E1101, C0302, W0142, W0603, R0902,R0903,R0912,R0915 #E1101 => Mocker shows mockery #C0302 => too many lines #W0142 => used * or ** magic @@ -40,9 +40,9 @@ import subprocess import fileutils -from path import path # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 import amara -import mocker # pylint: disable-msg=F0401 +import mocker # pylint: disable=F0401 import ntpath @@ -302,17 +302,6 @@ params = step.findall("./parameters/parameter") #assert params[0].get("value") == "false" assert params[0].get("value") == path(r"c:\data\ctc\ctcdata.txt") - if testtype == "withpkgfiles": - assert params[1].get("value") == r"\\10.0.0.1\ctc_helium\builds\drop0\set1\ctcdata" - else: - assert params[1].get("value") == r"\\10.0.0.1\ctc_helium\builds\drop0\set0\ctcdata" - - #For the ctcdata.txt to be published on the build network drive - step = steps.next() - assert step.findtext("./type") == "FileDownloadTask" - params = step.findall("./parameters/parameter") - #assert params[0].get("value") == "true" - assert params[0].get("value") == path(r"c:\data\ctc\ctcdata.txt") def check_ctc_start(steps): """Checks if CTC starts in ATS""" @@ -338,7 +327,6 @@ def check_diamonds_action(action): """ Testing Diamonds action. """ assert action.findtext("./type") == "DiamondsAction" - assert not action.findall("./parameters/parameter") def check_send_email_action(action, reportemail): """verifies if sening email option works""" @@ -534,6 +522,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[1] == dict(name="set1", image_files=self.image_files, @@ -547,6 +536,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[2] == dict(name="set2", @@ -564,6 +554,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[3] == dict(name="set3", data_files=[], @@ -580,6 +571,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) assert self.atp.sets[4] == dict(name="set4", @@ -597,6 +589,7 @@ trace_activation_files=self.trace_activation_files, ctc_enabled=self.atp["ctc_enabled"], custom_dir=None, + dll_files={}, component_path=self.component_path) def test_post_actions_email(self): @@ -778,6 +771,7 @@ mocker.expect(test_plan.custom_dir).result(path(r"self.custom_dir")) mocker.expect(test_plan["report_email"]).result(self.report_email) mocker.expect(test_plan["ctc_run_process_params"]).result(self.ctc_run_process_params) + mocker.expect(test_plan["report_type"]).result("") if self.trace_enabled.lower() == "true": mocker.expect(test_plan["trace_enabled"]).result("True") @@ -834,6 +828,7 @@ self.mocker.replay() self.test_plan = test_plan self.gen = adg.Ats3TemplateTestDropGenerator() + self.gen.output_file = 'ats4drop0.zip' return self.gen.generate_xml(test_plan) def test_basic_structure(self): @@ -1193,6 +1188,7 @@ mocker.expect(test_plan.custom_dir).result(path(r"self.custom_dir")) mocker.expect(test_plan["ctc_run_process_params"]).result(self.ctc_run_process_params) mocker.expect(test_plan["report_email"]).result(self.report_email) + mocker.expect(test_plan["report_type"]).result("") if self.trace_enabled == "False": mocker.expect(test_plan.sets).result([ dict(name="set0", image_files=self.image_files, data_files=self.data_files, @@ -1240,6 +1236,7 @@ self.test_plan = test_plan self.gen = adg.Ats3TemplateTestDropGenerator() + self.gen.output_file = 'ats4drop0.zip' return self.gen.generate_xml(test_plan) # for thar in test_harness: # xml = self.generate_xml(thar) @@ -1571,6 +1568,7 @@ mocker.expect(test_plan.custom_dir).result(path(r"self.custom_dir")) mocker.expect(test_plan["ctc_run_process_params"]).result(self.ctc_run_process_params) mocker.expect(test_plan["report_email"]).result(self.report_email) + mocker.expect(test_plan["report_type"]).result("") mocker.expect(test_plan.sets).result([ dict(name="set0", image_files=self.image_files, sis_files=self.sis_files, engine_ini_file=self.engine_ini_file, test_harness=self.harness, ctc_enabled="False", component_path=self.component_path, custom_dir=None), @@ -1580,6 +1578,7 @@ self.test_plan = test_plan self.gen = adg.Ats3TemplateTestDropGenerator() + self.gen.output_file = 'ats4drop0.zip' return self.gen.generate_xml(test_plan) def test_case_steps(self): @@ -1612,3 +1611,24 @@ assert step.findtext("./type") == "InstallSisTask" params = step.findall("./parameters/parameter") assert params[-1].get("value") == "c:\\testframework\\" + ntpath.basename(filename) + +def test_ats_sut(): + opts = Bunch(file_store='', flash_images='', diamonds_build_url='', testrun_name='', device_type='', report_email='', test_timeout='', drop_file='', config_file='', target_platform='', data_dir='', build_drive='', sis_files='', harness='', trace_enabled='', specific_pkg='', ats4_enabled='true', device_hwid='') + + test_plan = ats3.Ats3TestPlan(opts) + component_parser = ats3.testconfigurator.Ats3ComponentParser(opts) + + test_plan.sets = [dict(name="set0", image_files='', test_harness='GENERIC', custom_dir=None, src_dst=[("file1.dll", r"c:\sys\bin\file1.dll", "testmodule:sut")])] + + generator = ats3.dropgenerator.Ats3TemplateTestDropGenerator() + generator.output_file = 'ats4drop0.zip' + xml = generator.generate_xml(test_plan) + #print et.tostring(xml.getroot()) + + steps = iter(xml.findall(".//task")) + steps.next() + steps.next() + step = steps.next() + assert step.findtext("./type") == "SymbianUnitTestTask" + params = step.findall("./parameters/parameter") + assert params[1].get("value") == r"-tests=c:\sys\bin\file1.dll -noprompt" \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4_aste.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4_aste.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ats4_aste.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ """ Testing ATS4 ASTE framework. """ -# pylint: disable-msg=E1101, R0903, R0911, R0912, W0603, W0142, R0902, R0201 +# pylint: disable=E1101, R0903, R0911, R0912, W0603, W0142, R0902, R0201 #E1101 => Mocker shows mockery #C0302 => too many lines #W0142 => used * or ** magic @@ -39,8 +39,8 @@ import zipfile import os -from path import path # pylint: disable-msg=F0401 -import mocker # pylint: disable-msg=F0401 +from path import path # pylint: disable=F0401 +import mocker # pylint: disable=F0401 import ats3.aste diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsant.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsant.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_atsant.py Mon Sep 13 13:11:19 2010 +0800 @@ -37,6 +37,17 @@ files = atsant.files_to_test(os.path.join(os.environ['TEST_DATA'], 'data/packageiad/layers.sysdef.xml'), None, None, 'z:', 'true') assert len(files) == 1 +def test_atsant_multipledrop_with_sysdef3(): + """test atsant and check MULTIPLE drop files are created when sysdef3 files are in use""" + files = atsant.files_to_test(os.path.join(os.environ['TEST_DATA'], 'data/packageiad/sysdef3_test.xml'), None, None, 'z:', 'false', True) + assert len(files) == 2 + +def test_atsant_singledrop_with_sysdef3(): + """test atsant and check SINGLE drop file is created when sysdef3 files are in use""" + files = atsant.files_to_test(os.path.join(os.environ['TEST_DATA'], 'data/packageiad/sysdef3_test.xml'), None, None, 'z:', 'true', True) + + assert len(files) == 1 + def test_IConfigATS(): """test I config ATS""" tmpdir = tempfile.mkdtemp() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ccm.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ccm.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ccm.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ """ -# pylint: disable-msg=E1101 +# pylint: disable=E1101 import logging import os @@ -38,7 +38,7 @@ def test_running_sessions(self): """ Running sessions can be checked. """ - obj = self.mocker.replace(ccm._execute) + obj = self.mocker.replace(ccm.execute) if sys.platform == "win32": obj('c:\\apps\\ccm65\\bin\\ccm.exe status') else: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_convertpkg.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_convertpkg.py Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,38 @@ +#============================================================================ +#Name : test_ant.py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== + +""" convertpkg.py module tests. """ + +import tempfile +import os + +def test_convertpkg(): + import convertpkg + tmpdir = tempfile.mkdtemp() + + (f_desc, pkgfile) = tempfile.mkstemp() + f_file = os.fdopen(f_desc, 'w') + f_file.write(r'"/sf/a.script"-"c:\a.script"' + '\n') + f_file.close() + + convertpkg.convertpkg(pkgfile, tmpdir, 'tef') + + assert os.path.exists(os.path.join(tmpdir, 'bld.inf')) + assert os.path.exists(os.path.join(tmpdir, '1', 'group', 'test.mmp')) + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_documentation.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_documentation.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_documentation.py Mon Sep 13 13:11:19 2010 +0800 @@ -35,7 +35,7 @@ (fileDes, tempFileName) = tempfile.mkstemp() old_db = os.path.join(os.environ['TEST_DATA'], 'data', 'docs', 'sample_old_db.xml') new_db = os.path.join(os.environ['TEST_DATA'], 'data', 'docs', 'sample_new_db.xml') - writer = APIDeltaWriter(old_db, new_db) + writer = APIDeltaWriter(open(old_db), open(new_db)) saveout = sys.stdout sys.stdout = sys.stderr writer.write(tempFileName) @@ -45,4 +45,4 @@ content = tempFile.readlines() tempFile.close() os.unlink(tempFileName) - assert len(content) == 12 + assert len(content) == 13 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_fileutils.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_fileutils.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_fileutils.py Mon Sep 13 13:11:19 2010 +0800 @@ -152,11 +152,11 @@ } # Used by test_archive. -_root_test_dir = "build/_test_" + str(time.strftime("%H.%M.%S")) +root_test_dir = "build/_test_" + str(time.strftime("%H.%M.%S")) def _testpath(subpath): """ Normalised path for test paths. """ - return os.path.normpath(os.path.join(_root_test_dir, subpath)) + return os.path.normpath(os.path.join(root_test_dir, subpath)) def setup_module(): """ Setup files test config. @@ -167,7 +167,7 @@ #print 'setup_module()' #print _test_file_content.keys() for child_path in _test_file_paths: - path = os.path.join(_root_test_dir, child_path) + path = os.path.join(root_test_dir, child_path) path_dir = path path_dir = os.path.dirname(path) @@ -185,8 +185,8 @@ def teardown_module(): """ Teardown test config. """ - if os.path.exists(_root_test_dir): - fileutils.rmtree(_root_test_dir) + if os.path.exists(root_test_dir): + fileutils.rmtree(root_test_dir) class FileScannerTest(unittest.TestCase): @@ -386,7 +386,6 @@ print testpaths assert result == testpaths - def test_emptydir(self): """Empty dir.""" scanner = fileutils.FileScanner(_testpath('')) @@ -452,7 +451,6 @@ print testpaths assert result == testpaths - def test_distribution_policy_exclude(self): """ Distribution policy files can determine file selection - exclude. """ scanner = fileutils.FileScanner(_testpath('')) @@ -466,7 +464,6 @@ assert result == testpaths - def test_symbian_distribution_policy_cat_a(self): """test symbian distribution policy category A""" scanner = fileutils.FileScanner(_testpath('')) @@ -507,7 +504,6 @@ assert result == testpaths - def test_find_subroots(self): """ Testing the find_subroots method. """ scanner = fileutils.FileScanner(_testpath('')) @@ -534,18 +530,17 @@ _logger.debug(result) assert result == [_testpath('')] - def test_load_policy_content(self): """test load policy content""" try: fileutils.load_policy_content(_testpath('test_policies/1/Distribution.Policy.S60')) assert "Should fail while loading 'test_policies/1/Distribution.Policy.S60'." - except: + except IOError: pass try: fileutils.load_policy_content(_testpath('s60/Distribution.Policy.S60')) - except: + except IOError: assert "Should not fail while loading 's60/Distribution.Policy.S60'." @@ -555,7 +550,7 @@ try: fileutils.read_policy_content(filename) assert "Should fail while loading '%s'." % filename - except: + except IOError: pass else: assert fileutils.read_policy_content(filename) == value @@ -566,7 +561,7 @@ try: fileutils.read_symbian_policy_content(filename) assert "Should fail while loading '%s'." % filename - except: + except IOError: pass else: assert fileutils.read_symbian_policy_content(filename) == value @@ -601,7 +596,7 @@ class TestLongPath(unittest.TestCase): """ Unit test case for testing long path strings """ - long_path = os.path.join(_root_test_dir, '01234567890123456789012345678901234567890123456789', + long_path = os.path.join(root_test_dir, '01234567890123456789012345678901234567890123456789', '01234567890123456789012345678901234567890123456789', '01234567890123456789012345678901234567890123456789', '01234567890123456789012345678901234567890123456789', '01234567890123456789012345678901234567890123456789') def setUp(self): @@ -623,7 +618,7 @@ def mkdir(self, path): """create a folder""" if 'java' in sys.platform: - import java.io + import java.io # pylint: disable=F0401 f_file = java.io.File(path) if not f_file.exists(): os.mkdir(path) @@ -632,23 +627,23 @@ try: import win32file win32file.CreateDirectoryW('\\\\?\\' + path, None) - except: + except (ImportError, IOError, win32file.error): pass else: os.mkdir(path) def test_rmtree_long_path(self): """test remove tree with a long path name""" - fileutils.rmtree(_root_test_dir) + fileutils.rmtree(root_test_dir) assert not os.path.exists(self.long_path) - assert not os.path.exists(_root_test_dir) + assert not os.path.exists(root_test_dir) def test_rmtree_long_path_unc_format(self): """test remove tree with long path name and UNC format""" if sys.platform == "win32": - fileutils.rmtree(u"\\\\?\\" + os.path.join(os.path.abspath('.'), _root_test_dir)) + fileutils.rmtree(u"\\\\?\\" + os.path.join(os.path.abspath('.'), root_test_dir)) assert not os.path.exists(self.long_path) - assert not os.path.exists(_root_test_dir) + assert not os.path.exists(root_test_dir) class DestInSrcTest(unittest.TestCase): """ Unit test case to test fileutils.destinsrc """ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ """ Testing MATTI framework. """ -# pylint: disable-msg=E1101 +# pylint: disable=E1101 import logging logging.getLogger().setLevel(logging.ERROR) @@ -30,8 +30,6 @@ from path import path import ats3.aste import ats3.matti.MattiDrops -#from lxml import objectify -#from lxml import etree import tempfile TEST_FILE_NAME = 'test.xml' diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti2.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_matti2.py Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,294 @@ +# -*- coding: latin-1 -*- + +#============================================================================ +#Name : test_matti2.py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== + +""" Testing MATTI framework. """ + +# pylint: disable=E1101 + +import logging +logging.getLogger().setLevel(logging.INFO) +import os +#import shutil +from path import path +import ats3.matti2 +import tempfile +import zipfile +import platform + +TEST_PATH = None +TEST_FILES = {} +MATTI = None +OUTPUT = None +SISFILES = None +TOTAL_TESTS_COUNT = 3 + + +class Bunch(object): + """ Configuration object. Argument from constructor are converted into class attributes. """ + def __init__(self, **kwargs): + self.__dict__.update(kwargs) + +class SetUp(object): + """ Setup the module. """ + + def __init__(self): + """ Setup test environment. """ + global TEST_PATH, MATTI, OUTPUT, SISFILES + + TEST_PATH = path(tempfile.mkdtemp()) + component = TEST_PATH + component.joinpath("matti").makedirs() + for path_parts in (("matti_testcases", "profile", "all.sip"), + ("matti_testcases", "profile", "bat.sip"), + ("matti_testcases", "profile", "fute.sip"), + ("matti_testcases", "hwdata", "paths.pkg"), + ("matti_testcases", "hwdata", "file1.txt"), + ("matti_testcases", "hwdata", "settings.ini"), + ("matti_testcases", "matti_parameters", "matti_parameters.xml"), + ("matti_testcases", "unit_test1.rb"), + ("matti_testcases", "unit_test2.rb"), + ("output", "images", "image1.fpsx"), + ("output", "images", "image2.fpsx"), + ("sisfiles", "abc.sis"), + ("sisfiles", "xyz.sis"), + ("output", "ats", "temp.txt")): + filepath = component.joinpath(*path_parts) + if not filepath.parent.exists(): + filepath.parent.makedirs() + filepath.touch() + TEST_FILES.setdefault(path_parts[1], []).append(filepath) + + OUTPUT = component.joinpath(r"output") + MATTI = component.joinpath("matti_testcases") + SISFILES = component.joinpath(r"sisfiles") + + if not filepath.parent.exists(): + filepath.parent.makedirs() + filepath.touch() + + #mtc => matti_testcases + mtc = component.joinpath("matti_testcases") + mtc.joinpath("unit_test1.rb").write_text("unit_tests") + mtc.joinpath("unit_test2.rb").write_text("unit_tests") + + # profiles + profiles = component.joinpath("matti_testcases", "profile") + profiles.joinpath("all.sip").write_text("sip profile") + profiles.joinpath("bat.sip").write_text("sip profile") + profiles.joinpath("fute.sip").write_text("sip profile") + + #hwdata => hardware data + profiles = component.joinpath("matti_testcases", "hwdata") + profiles.joinpath("file1.txt").write_text("data file") + profiles.joinpath("settings.ini").write_text("settings initialization file") + profiles.joinpath("paths.pkg").write_text( + r""" + ;Language - standard language definitions + &EN + + ; standard SIS file header + #{"BTEngTestApp"},(0x04DA27D5),1,0,0 + + ;Supports Series 60 v 3.0 + (0x101F7961), 0, 0, 0, {"Series60ProductID"} + + ;Localized Vendor Name + %{"BTEngTestApp"} + + ;Unique Vendor name + :"Nokia" + + ; Files to copy + + "[PKG_LOC]\file1.txt"-"C:\Private\10202BE9\PERSISTS\file1.txt" + "[PKG_LOC]\settings.ini"-"c:\sys\settings.ini" + """.replace('\\', os.sep)) + + +def teardown_module(test_run_count): + """ stuff to do after running the tests """ + + if test_run_count == 0: + path(TEST_PATH).rmtree() + +class TestMattiTestPlan(SetUp): + """ test MattiDrop.py """ + global OUTPUT, MATTI, SISFILES + + def __init__(self): + """initialize Matti Tests""" + SetUp.__init__(self) + self.file_store = OUTPUT + self.test_asset_path = MATTI + self.matti_sis_files = r"%s/abc.sis#f:\data\abc.sis#c:\abc.sis, %s/xyz.sis#f:\data\abc.sis#f:\xyz.sis" % (SISFILES, SISFILES) + self.build_drive = "j:" + self.drop_file = path(r"%s/ats/ATSMattiDrop.zip" %OUTPUT).normpath() + + image_files = r"%s/images/image1.fpsx, %s/images/image2.fpsx " % (OUTPUT, OUTPUT) + self.flash_images = image_files + + self.template_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/matti_template.xml') + self.template_loc = os.path.normpath(self.template_loc) + self.matti_parameters = "" + self.config = None + + def read_xml(self, file_location, zip_file=False): + """reads test.xml file if a path is given""" + + xml_text = "" + file_location = path(file_location) + if zip_file: + if zipfile.is_zipfile(file_location): + myzip = zipfile.ZipFile(file_location, 'r') + xml_text = myzip.read('test.xml') + myzip.close() + + else: + hnd = open(file_location, 'r') + for line in hnd.readlines(): + xml_text = xml_text + line + + return xml_text + + def test_xml_with_all_parameters(self): + """ test Matti2.py with all parameters present and correct and sierra is enabled""" + global TOTAL_TESTS_COUNT + opts = Bunch(build_drive=self.build_drive, + drop_file=path(r"%s/ats/ATSMattiDrop1.zip" %OUTPUT).normpath(), + flash_images=self.flash_images, + matti_sis_files=self.matti_sis_files, + testasset_location=self.test_asset_path, + template_loc=self.template_loc, + sierra_enabled="True", + test_profiles="bat, fute", + matti_parameters="", + matti_timeout="1200", + sierra_parameters="--teardown", + file_store=self.file_store, + report_email="firstname.lastname@domain.com", + testrun_name="matti test run", + alias_name="alias", + device_type="new_device", + diamonds_build_url="http://diamonds.com/1234", + email_format="simplelogger", + email_subject="Matti test report", + verbode="false") + + self.config = ats3.matti2.Configuration(opts) + ats3.matti2.create_drop(self.config) + + xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/test_all_present.xml') + stored_xml = self.read_xml(xml_loc, False).strip() + drop_loc = os.path.join(OUTPUT, 'ats/ATSMattiDrop1.zip') + generated_xml = self.read_xml(drop_loc, True).strip() + + if platform.system().lower() == "linux": + assert stored_xml.replace('\r', '') in generated_xml + else: + assert stored_xml in generated_xml + + TOTAL_TESTS_COUNT -= 1 + teardown_module(TOTAL_TESTS_COUNT) + + def test_xml_if_sierra_is_not_enabled(self): + """ test Matti2.py with all parameters present and correct and sierra is not enabled (or false)""" + global TOTAL_TESTS_COUNT + opts = Bunch(build_drive=self.build_drive, + drop_file=path(r"%s/ats/ATSMattiDrop2.zip" %OUTPUT).normpath(), + flash_images=self.flash_images, + matti_sis_files=self.matti_sis_files, + testasset_location=self.test_asset_path, + template_loc=self.template_loc, + sierra_enabled="False", + test_profiles="bat, fute", + matti_parameters="", + matti_timeout="1200", + sierra_parameters="--teardown", + file_store=self.file_store, + report_email="firstname.lastname@domain.com", + testrun_name="matti test run", + alias_name="alias", + device_type="new_device", + diamonds_build_url="http://diamonds.com/1234", + email_format="simplelogger", + email_subject="Matti test report", + verbode="false") + + self.config = ats3.matti2.Configuration(opts) + ats3.matti2.create_drop(self.config) + + xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/test_all_present_sierra_disabled.xml') + stored_xml = self.read_xml(xml_loc, False).strip() + drop_loc = os.path.join(OUTPUT, 'ats/ATSMattiDrop2.zip') + generated_xml = self.read_xml(drop_loc, True).strip() + + if platform.system().lower() == "linux": + assert stored_xml.replace('\r', '') in generated_xml + else: + assert stored_xml in generated_xml + + TOTAL_TESTS_COUNT -= 1 + teardown_module(TOTAL_TESTS_COUNT) + + def test_xml_if_sierra_is_enabled_template_location_is_missing(self): + """ test Matti2.py with all parameters present and correct and if sierra is enabled but template location is used as default one""" + global TOTAL_TESTS_COUNT + opts = Bunch(build_drive=self.build_drive, + drop_file=path(r"%s/ats/ATSMattiDrop3.zip" %OUTPUT).normpath(), + flash_images=self.flash_images, + matti_sis_files=self.matti_sis_files, + testasset_location=self.test_asset_path, + template_loc="", + sierra_enabled="True", + test_profiles="bat, fute", + matti_parameters="", + matti_timeout="1200", + sierra_parameters="--teardown", + file_store=self.file_store, + report_email="firstname.lastname@domain.com", + testrun_name="matti test run", + alias_name="alias", + device_type="new_device", + diamonds_build_url="http://diamonds.com/1234", + email_format="simplelogger", + email_subject="Matti test report", + verbode="false") + + self.config = ats3.matti2.Configuration(opts) + ats3.matti2.create_drop(self.config) + + xml_loc = os.path.join(os.environ['TEST_DATA'], 'data/matti/test_all_present.xml') + stored_xml = self.read_xml(xml_loc, False).strip() + drop_loc = os.path.join(OUTPUT, 'ats/ATSMattiDrop3.zip') + generated_xml = self.read_xml(drop_loc, True).strip() + + if platform.system().lower() == "linux": + assert stored_xml.replace('\r', '') in generated_xml + else: + assert stored_xml in generated_xml + + TOTAL_TESTS_COUNT -= 1 + teardown_module(TOTAL_TESTS_COUNT) + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_parsers.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_parsers.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_parsers.py Mon Sep 13 13:11:19 2010 +0800 @@ -148,6 +148,14 @@ TARGETTYPE PLUGIN """) tc1_dep1_mmp.close() + + tc1_dep2_mmp = open(path.joinpath(TSRC_DIR, "tsrc", "tc1", "dependent_1", "group", "onemore.mmp"), 'w') + tc1_dep2_mmp.write( + r""" +TARGET onemore.dll +TARGETTYPE PLUGIN + """) + tc1_dep2_mmp.close() tc1_dep2 = open(path.joinpath(TSRC_DIR, "tsrc", "tc1", "dependent_2", "group", "bld.inf"), "w") tc1_dep2.write( @@ -407,13 +415,13 @@ self.tcp = ats3.parsers.CppParser() upper_bld_path = os.path.dirname(self.bld_path) - self.dependent_paths_dictionary = {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/subtest/if_test/group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/subtest/if_test/group"))): {'pkg_files': [], 'mmp_files': ['if_test.mmp'], 'harness': 'STIFUNIT', 'type': ''}}}, - (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc2//group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc2/group"))): {'pkg_files': ['tc2.pkg'], 'mmp_files': ['tc2.mmp'], 'harness': 'EUNIT', 'type': 'executable'}}}, - (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc3/group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc3/group"))): {'pkg_files':[], 'mmp_files': ['tc3.mmp'], 'harness': 'EUNIT', 'type': 'executable'}}}, - (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/subtest/group"))): {'pkg_files': [], 'mmp_files': ['sub_test.mmp'], 'harness': 'STIF', 'type': 'executable'}, - (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/dependent_1/group"))): {'pkg_files': [], 'mmp_files': ['dependent_1.mmp', 'onemore.mmp'], 'harness': "", 'type':''}, - (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/dependent_2/group"))): {'pkg_files': [], 'mmp_files': ['dependent_2.mmp'], 'harness': "", 'type': 'dependent'}, - (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/group"))): {'pkg_files': ['tc1.pkg'], 'mmp_files': ['tc1.mmp'],'harness': 'STIF', 'type': 'executable'}}}} + self.dependent_paths_dictionary = {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/subtest/if_test/group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/subtest/if_test/group"))): {'pkg_files': [], 'mmp_files': ['if_test.mmp'], 'dll_files': {'tc1_if.dll': 'STIFUNIT'}, 'harness': 'STIFUNIT', 'type': ''}}}, + (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc2//group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc2/group"))): {'pkg_files': ['tc2.pkg'], 'mmp_files': ['tc2.mmp'], 'dll_files': {'tc2.dll': 'EUNIT'}, 'harness': 'EUNIT', 'type': 'executable'}}}, + (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc3/group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc3/group"))): {'pkg_files':[], 'mmp_files': ['tc3.mmp'], 'dll_files': {'tc3.dll': 'EUNIT'}, 'harness': 'EUNIT', 'type': 'executable'}}}, + (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/group"))): {'content': {(os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/subtest/group"))): {'pkg_files': [], 'mmp_files': ['sub_test.mmp'], 'dll_files': {'sub_test.dll': 'STIF'}, 'harness': 'STIF', 'type': 'executable'}, + (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/dependent_1/group"))): {'pkg_files': [], 'mmp_files': ['dependent_1.mmp', 'onemore.mmp'],'dll_files': {'dependent_1.dll': '', 'onemore.dll': ''}, 'harness': "", 'type':'dependent'}, + (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/dependent_2/group"))): {'pkg_files': [], 'mmp_files': ['dependent_2.mmp'], 'dll_files': {'dependent_2.dll': ''}, 'harness': "", 'type': 'dependent'}, + (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/group"))): {'pkg_files': ['tc1.pkg'], 'mmp_files': ['tc1.mmp'], 'dll_files': {'tc1.dll': 'STIF'}, 'harness': 'STIF', 'type': 'executable'}}}} self.extended_path_list = [(os.path.normpath(upper_bld_path), upper_bld_path), (os.path.normpath(os.path.join(upper_bld_path, "../tsrc/tc1/group")), upper_bld_path), @@ -549,6 +557,8 @@ def __init__(self, methodName="runTest"): mocker.MockerTestCase.__init__(self, methodName) + self.mmp_file_path = None + self.lst_test_mmp = [] def setUp(self): """Setup for BldFile parser""" @@ -667,6 +677,83 @@ """Test if get_harness returns right harness for given mmp""" assert self.tc1_harness == self.tcp.get_harness(os.path.normpath(os.path.join(self.path_list[0], 'tc1.mmp'))) + def test_get_mmp_harness(self): + """ + Testing required combinations of libraries with get_mmp_harness method and asserting the harness. + """ + assert self.tcp.get_mmp_harness(None) == "" + assert self.tcp.get_mmp_harness(["foo"]) == "" # value, but unexpected + #single values + assert self.tcp.get_mmp_harness(["stiftestinterface.lib"]) == "STIF" + assert self.tcp.get_mmp_harness(["eunit.lib"]) == "EUNIT" + assert self.tcp.get_mmp_harness(["qttest.lib"]) == "EUNIT" + assert self.tcp.get_mmp_harness(["testexecuteutils.lib"]) == "GENERIC" + assert self.tcp.get_mmp_harness(["testframeworkclient.lib"]) == "GENERIC" + assert self.tcp.get_mmp_harness(["rtest"]) == "GENERIC" + #tef gets priority even if other libraries exist + #takeout only STIFUNIT.lib then TEF + assert self.tcp.get_mmp_harness(["stiftestinterface.lib", "eunit.lib", "qttest.lib", "testexecuteutils.lib" , "testframeworkclient.lib", "rtest"]) == "GENERIC" + #condition stif and eunit, then harness STIF + assert self.tcp.get_mmp_harness(["stiftestinterface.lib", "eunit.lib"]) == "STIF" + #condition stif and not eunit, then harness STIF + assert self.tcp.get_mmp_harness(["stiftestinterface.lib", "stifunit.lib"]) == "STIF" + #condition eunit and not stif , then harness EUNIT + assert self.tcp.get_mmp_harness(["eunit.lib", "qttest.lib", "stifunit.lib"]) == "EUNIT" + #condition stifunit and not eunit and not stif + assert self.tcp.get_mmp_harness(["stifunit.lib"]) == "STIFUNIT" + + + def test_select_harness(self): + """Test if select_harness returns right harness for given set of Test Framework + tef,stif,eunit and stifunit + tef stif eunit stifunit = result + =================================== + False,False,False,False == "" + + True, False,False,False == "GENERIC" + True, True, False,False == "GENERIC" + True, False,True, False == "GENERIC" + True, False,False,True == "GENERIC" + True, False,True, True == "GENERIC" + True, True, True, False == "GENERIC" + True, True, False,True == "GENERIC" + True, True, True, True == "GENERIC" + + False,True, False,False == "STIF" + False,True, True, False == "STIF" + False,True, False,True == "STIF" + False,True, True, True == "STIF" + + False,False, True, False == "EUNIT" + False,False, True, True == "EUNIT" + + False,false, False, True == "STIFUNIT" + + """ + + assert self.tcp.select_harness(False, False, False, False ) == "" + + assert self.tcp.select_harness(True, False, False, False ) == "GENERIC" + assert self.tcp.select_harness(True, True, False, False ) == "GENERIC" + assert self.tcp.select_harness(True, False, True, False ) == "GENERIC" + assert self.tcp.select_harness(True, False, False, True ) == "GENERIC" + assert self.tcp.select_harness(True, False, True, True ) == "GENERIC" + assert self.tcp.select_harness(True, True, True, False ) == "GENERIC" + assert self.tcp.select_harness(True, True, False, True ) == "GENERIC" + assert self.tcp.select_harness(True, True, True, True ) == "GENERIC" + + assert self.tcp.select_harness(False, True, False, False ) == "STIF" + assert self.tcp.select_harness(False, True, True, False ) == "STIF" + assert self.tcp.select_harness(False, True, False, True ) == "STIF" + assert self.tcp.select_harness(False, True, True, True ) == "STIF" + + assert self.tcp.select_harness(False, False, True, False) == "EUNIT" + assert self.tcp.select_harness(False, False, True, True ) == "EUNIT" + + assert self.tcp.select_harness(False, False, False, True) == "STIFUNIT" + + + def test_read_information_method(self): """Test if read_information_from_mmp returns wanted output for given parameter and mmp-file""" assert self.tc1_all == self.tcp.read_information_from_mmp(os.path.normpath(os.path.join(self.path_list[0], 'tc1.mmp')), 0) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_sis.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_sis.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_sis.py Mon Sep 13 13:11:19 2010 +0800 @@ -23,14 +23,12 @@ import unittest import tempfile import os -from lxml import etree - +import amara import configuration import sis _logger = logging.getLogger('test.sis') - class ArchivePreBuilderTest(unittest.TestCase): """ Tests for sis module. """ @@ -39,20 +37,20 @@ data = {'name': 'foo', 'path': 'bar'} tree = self._setup_test_case(data) - assert tree.xpath("/project/target[@name='stage1']/parallel/*/arg/@line")[0] == '-v foo.pkg foo.sis' + assert tree.xml_xpath("/project/target[@name='stage1']/parallel/*/arg/@line")[0] == '-v foo.pkg foo.sis' def test_sis_v2(self): """ V2 config format. """ data = {'input': 'foo.pkg'} tree = self._setup_test_case(data) - assert tree.xpath("/project/target[@name='stage1']/parallel/*/arg/@line")[0] == '-v foo.pkg foo.sis' + assert tree.xml_xpath("/project/target[@name='stage1']/parallel/*/arg/@line")[0] == '-v foo.pkg foo.sis' def test_sis_v2_1(self): """ V2 config format for sisx. """ data = {'input': 'foo.pkg', 'output': 'foo.sisx'} tree = self._setup_test_case(data) - assert tree.xpath("/project/target[@name='stage1']/parallel/*/arg/@line")[0] == '-v foo.pkg foo.sis' - assert tree.xpath("/project/target[@name='stage2']/parallel/*/arg/@line")[0] == '-v foo.sis foo.sisx cert1 key1' + assert tree.xml_xpath("/project/target[@name='stage1']/parallel/*/arg/@line")[0] == '-v foo.pkg foo.sis' + assert tree.xml_xpath("/project/target[@name='stage2']/parallel/*/arg/@line")[0] == '-v foo.sis foo.sisx cert1 key1' def _setup_test_case(self, additional_data): """ Setup test case based on varying inputs. """ @@ -66,7 +64,7 @@ sis_prebuilder = sis.SisPreBuilder(config) tmpfile = os.path.join(tempfile.mkdtemp(), 'test.xml') sis_prebuilder.write(tmpfile) - tree = etree.parse(tmpfile) + tree = amara.parse(open(tmpfile)) return tree diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_timeout_launcher.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_timeout_launcher.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_timeout_launcher.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ unit tests the timeout launcher """ -# pylint: disable-msg=E1101 +# pylint: disable=E1101 import logging import sys @@ -38,7 +38,7 @@ WINDOWS = True -# pylint: disable-msg=C0103 +# pylint: disable=C0103 class os(object): #has to be named this as it is mocking os method. """ dummy the os function call""" @@ -64,7 +64,7 @@ sys.argv = ['timeout_launcher.py', '--timeout=1', 'version'] timeout_launcher.main() -# pylint: disable-msg=W0104 +# pylint: disable=W0104 def test_valid_with_timeout(self): """test_valid_with_timeout: initial test with valid values and timeout.""" @@ -104,7 +104,10 @@ process = self.mocker.mock() obj = self.mocker.replace("subprocess.Popen") - obj(' '.join(cmdline), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) + shell = True + if WINDOWS: + shell = False + obj(' '.join(cmdline), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=shell) self.mocker.result(process) process.communicate()[0] @@ -172,6 +175,6 @@ failed = False try: timeout_launcher.main() - except: + except Exception: failed = True assert failed diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_amara.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_amara.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_amara.py Mon Sep 13 13:11:19 2010 +0800 @@ -22,6 +22,10 @@ import amara from xmlhelper import recursive_node_scan +import urllib +import tempfile +import os +import sys def test_amara(): """test amara""" @@ -80,3 +84,68 @@ #xcf5 = amara.parse(open(r'C:\USERS\helium\helium-dev-forbuilds\helium\tests\data\bom\build_model_bom.xml')) #u'%s' % xcf5.bom.content.project.folder.task.synopsis + + doc = amara.create_document(u"commentLog") + if not doc: + pass + + xml1 = """Add rofsfiles for usage in paged images""" + doc2 = amara.parse(xml1) + assert doc2.commentLog.branchInfo.category == "" + + doc2.commentLog.xml_remove_child(doc2.commentLog.branchInfo) + + myxml3 = """""" + xml3 = amara.parse(myxml3) + for p_temp in xml3.xml_xpath("//b"): + p_temp.value = u'2' + assert '2' in xml3.xml() + + xml4 = """\n\ta\n""" + + print amara.parse(xml4).xml(indent="yes").replace('\n', 'n').replace('\t', 't') + assert xml4 in amara.parse(xml4).xml(indent="yes") + + ppxml = """ + + + 35 + 1 + + +""" + + newppxml = amara.parse(ppxml) + oldppxml = amara.parse(ppxml) + + oldppdata = {} + for oldfeature in oldppxml.SettingsData.ProductProfile.Feature: + oldppdata[str(oldfeature.Index)] = oldfeature.Value + for newfeature in newppxml.SettingsData.ProductProfile.Feature: + if not oldppdata.has_key(str(newfeature.Index)): + raise Exception(newfeature.Value) + elif oldppdata[str(newfeature.Index)] != str(newfeature.Value): + raise Exception(str(oldppdata[str(newfeature.Index)]) + ' ' + str(newfeature.Value)) + +def test_amara_xinclude(): + (f_desc1, filename1) = tempfile.mkstemp() + f_file1 = os.fdopen(f_desc1, 'w') + f_file1.write(r'qwerty') + f_file1.close() + (f_desc, filename) = tempfile.mkstemp() + f_file = os.fdopen(f_desc, 'w') + + #try: + # from Ft.Lib import Uri + # fileurl = Uri.OsPathToUri(filename1) + #except ImportError: + fileurl = filename1 + + f_file.write(r'') + f_file.close() + + #if 'java' in sys.platform: + doc3 = amara.parse(urllib.pathname2url(filename)) + #else: + # doc3 = amara.parse(Uri.OsPathToUri(filename)) + assert 'qwerty' in doc3.xml() \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_bomtofile.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_bomtofile.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_bomtofile.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ test BOM to file""" -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import tempfile from shutil import rmtree diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_build_io.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_build_io.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_build_io.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ Test the build.io module. """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 #method could be a function warning removed import logging diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_buildtools.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_buildtools.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_buildtools.py Mon Sep 13 13:11:19 2010 +0800 @@ -30,7 +30,8 @@ def setUp(self): """called before all tests run to setup variables etc.""" self.temp = "temp" - os.makedirs(self.temp) + if not os.path.exists(self.temp): + os.makedirs(self.temp) def tearDown(self): """ called after tests have run to clear anything left hanging around""" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_4pn.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_4pn.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_4pn.py Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,7 @@ """ Test cases for ccm python toolkit. """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import ccm diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_object.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_object.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_object.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ unitesting CCMObject functionality """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import ccm @@ -80,7 +80,9 @@ class MockResultSession(ccm.AbstractSession): """ Fake session used to test Result""" - def __init__(self, behave = {}, database="fakedb"): + def __init__(self, behave=None, database="fakedb"): + if behave == None: + behave = {} ccm.AbstractSession.__init__(self, None, None, None, None) self._behave = behave self._database = database @@ -101,6 +103,7 @@ result.status = -1 return result + class CCMObjectTest(unittest.TestCase): """ Unit test case for CCMObject functionality """ def test_get_baseline(self): @@ -115,7 +118,6 @@ objv2 = session.create('foo-2.0:project:db#1') assert objv2.baseline == objv1 - def test_delete_project(self): """ Check project deletion """ behave = {'delete -project "project-1:project:db#1"': "Deleting object 'project-1:project:db#1'"} @@ -140,7 +142,7 @@ try: result = project.delete(recurse=True, scope='project_and_subproject_hierarchy') assert False, "The delete method must fail in case of synergy failure" - except: + except ccm.CCMException: pass def test_delete_object(self): @@ -151,5 +153,7 @@ result = obj.delete() assert "Deleting object 'object-1:object:db#1'" in result.output + + if __name__ == "__main__": unittest.main() diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_results.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_results.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccm_results.py Mon Sep 13 13:11:19 2010 +0800 @@ -25,7 +25,7 @@ import os import logging -# pylint: disable-msg=R0201 +# pylint: disable=R0201 _logger = logging.getLogger('test.ccm_results') logging.basicConfig(level=logging.INFO) @@ -49,8 +49,10 @@ class MockResultSession(ccm.AbstractSession): """ Fake session used to test Result""" - def __init__(self, behave = {}, database="fakedb"): + def __init__(self, behave=None, database="fakedb"): ccm.AbstractSession.__init__(self, None, None, None, None) + if behave == None: + behave = {} self._behave = behave self._database = database @@ -324,7 +326,7 @@ session = MockResultSession(behave) result = session.execute('test_update', ccm.ConflictsResult(session)) #_logger.debug(result.output) - # pylint: disable-msg=E1103 + # pylint: disable=E1103 assert len(result.output.keys()) == 7, "Should detect 7 projects." subproj = session.create("Cartman_sub_sub_sub02-Release_v4:project:%s#1" % session.database()) assert len(result.output[subproj]) == 2, "%s should contain 2 conflicts" % subproj.objectname @@ -393,11 +395,11 @@ Serious: Update failed. """ - _logger = logging.getLogger('count.logger') - _logger.setLevel(logging.WARNING) + count_logger = logging.getLogger('count.logger') + count_logger.setLevel(logging.WARNING) handler = CounterHandler() - _logger.addHandler(handler) - ccm.log_result(log, ccm.UPDATE_LOG_RULES, _logger) + count_logger.addHandler(handler) + ccm.log_result(log, ccm.UPDATE_LOG_RULES, count_logger) print handler.warnings print handler.errors assert handler.warnings == 5 @@ -415,11 +417,11 @@ Copy Project complete with 1 errors. WARNING: There is no matching baseline project for 'ci-hitchcock_nga' in baseline 'tr1s60#ABS_domain_mcl92-abs.mcl.92_200907'. This baseline might not be complete """ - _logger = logging.getLogger('count.logger') - _logger.setLevel(logging.WARNING) + count_logger = logging.getLogger('count.logger') + count_logger.setLevel(logging.WARNING) handler = CounterHandler() - _logger.addHandler(handler) - ccm.log_result(log, ccm.CHECKOUT_LOG_RULES, _logger) + count_logger.addHandler(handler) + ccm.log_result(log, ccm.CHECKOUT_LOG_RULES, count_logger) print handler.warnings print handler.errors assert handler.warnings == 4 @@ -438,11 +440,11 @@ You can use Reconcile to resolve work area conflicts Warning: Conflicts detected during synchronization. Check your logs. """ - _logger = logging.getLogger('count.logger') - _logger.setLevel(logging.WARNING) + count_logger = logging.getLogger('count.logger') + count_logger.setLevel(logging.WARNING) handler = CounterHandler() - _logger.addHandler(handler) - ccm.log_result(log, ccm.SYNC_LOG_RULES, _logger) + count_logger.addHandler(handler) + ccm.log_result(log, ccm.SYNC_LOG_RULES, count_logger) print handler.warnings print handler.errors assert handler.warnings == 0 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ccmutil.py Mon Sep 13 13:11:19 2010 +0800 @@ -46,7 +46,7 @@ dbpath = "ccm.database.path" try: session = ccmutil.get_session(database, username, password, engine, dbpath) - except Exception: + except ccm.CCMException: print "Error creating session" assert session is None @@ -60,7 +60,7 @@ dbpath = "ccm.database.path" try: session = ccmutil.get_session(database, username, password, engine, dbpath) - except Exception: + except ccm.CCMException: print "Error creating session" assert session is None @@ -72,7 +72,10 @@ class MockSession(ccm.AbstractSession): """ Fake session used to test """ - def __init__(self, behave = {}, username=None, password=None, engine=None, dbpath=None, database=None): + def __init__(self, behave=None, username=None, password=None, engine=None, dbpath=None, database=None): + ccm.AbstractSession.__init__(self, username, engine, dbpath, None) + if behave == None: + behave = {} if database == "fakedb": self._behave = behave self._database = database diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_compilation.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_compilation.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_compilation.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """test compilation """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import compilation diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_configuration.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_configuration.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_configuration.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ test configuration """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import logging import StringIO @@ -63,11 +63,11 @@ assert len(configs) == 1 assert configs[0].type == 'test.type', "config.type must match 'test.type'." - configs = config_set.getConfigurations(type='test.type') + configs = config_set.getConfigurations(type_='test.type') assert len(configs) == 2 assert configs[0].type == 'test.type', "config.type must match 'test.type'." - configs = config_set.getConfigurations(name='test_spec', type='test.type') + configs = config_set.getConfigurations(name='test_spec', type_='test.type') assert len(configs) == 2 assert configs[0].type == 'test.type', "config.type must match 'test.type'." @@ -261,27 +261,4 @@ assert config['text.b'] == 'text.value.B' assert config['foo'] == 'bar' - -if 'java' not in sys.platform: - class XMLConfigurationTest(unittest.TestCase): - """ Test XML format configuration files. """ - - def test_single_node_xml(self): - """ Properties can be read from 1 level of XML sub-elements. """ - config = configuration.XMLConfiguration(open(os.path.join(os.environ['TEST_DATA'], 'data/ant_config_test.xml'), 'r')) - - assert config['foo'] == 'bar' - assert config['interpolated'] == 'foo value = bar' - - def test_nested_node_xml(self): - """ Properties can be read from multiple levels of XML sub-elements. """ - config = configuration.XMLConfiguration(open(os.path.join(os.environ['TEST_DATA'], 'data/ant_config_test.xml'), 'r')) - - assert config['xml.c'] == 'C' - - def test_xml_list(self): - """ Multiple XML elements can be read as a list. """ - config = configuration.XMLConfiguration(open(os.path.join(os.environ['TEST_DATA'], 'data/ant_config_test.xml'), 'r')) - - assert config['array.value'] == 'one,two,three' \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ctc.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ctc.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ctc.py Mon Sep 13 13:11:19 2010 +0800 @@ -80,7 +80,7 @@ """close""" pass - def _ftpmkdirs(self, dir): + def _ftpmkdirs(self, dir_): """ftp make dirs""" pass @@ -100,5 +100,5 @@ result = uploader.upload() print result assert len(result) == 2 - assert result[0] == "ctc_helium/1234/mon_syms/1/MON.SYM" - assert result[1] == "ctc_helium/1234/mon_syms/2/MON.SYM" + assert result[0] == "1234/mon_syms/1/MON.SYM" + assert result[1] == "1234/mon_syms/2/MON.SYM" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_deltazip.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_deltazip.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_deltazip.py Mon Sep 13 13:11:19 2010 +0800 @@ -33,8 +33,8 @@ self.cwd_backup = os.getcwd() self.logger = logging.getLogger('test.deltazip') self.root = os.environ['TEST_DATA'] - self.output = os.path.join(tempfile.gettempdir(), 'deltazip') - self.output2 = os.path.join(tempfile.gettempdir(), 'deltazip2') + self.output = tempfile.mkdtemp() + self.output2 = tempfile.mkdtemp() logging.basicConfig(level=logging.INFO) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_docs.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_docs.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_docs.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """test docs """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import docs diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_escapeddict.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_escapeddict.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_escapeddict.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """test escaped dict """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import logging import unittest diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_freedisk.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_freedisk.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_freedisk.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ test free disk """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import logging @@ -67,7 +67,9 @@ """ Tests with drive which does not exist """ + print 'Running: ' + 'python -m freedisk -d %s: -s 10 ' % self.drive_letter output = os.system('python -m freedisk -d %s: -s 10 ' % self.drive_letter) + print 'output: ' + str(output) assert(output==-2) def test_missing_parameters(self): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_gscm.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_gscm.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_gscm.py Mon Sep 13 13:11:19 2010 +0800 @@ -21,7 +21,7 @@ """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import logging import unittest diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ido.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ido.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_ido.py Mon Sep 13 13:11:19 2010 +0800 @@ -47,7 +47,7 @@ def test_ido_sysdef_valid(self): """ Verifying get_sysdef_location method with valid sysdef""" test_sysdef_file = os.path.join(os.environ['TEST_DATA'], 'data', 'packageiad', 'layers.sysdef.xml') - location = ido.get_sysdef_location(test_sysdef_file); + location = ido.get_sysdef_location(test_sysdef_file) assert location != None def test_ido_sysdef_invalid(self): @@ -55,6 +55,6 @@ (f_d, filename) = mkstemp() os.write(f_d,'Test sysdef file') os.close(f_d) - location = ido.get_sysdef_location(filename); + location = ido.get_sysdef_location(filename) os.unlink(filename) assert location == None diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_integration_ant.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_integration_ant.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_integration_ant.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ Testing integration.ant module """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import tempfile import os @@ -31,6 +31,7 @@ class IntegrationAntTest(unittest.TestCase): """Verifying integration ant module""" + def test_check_build_duplicates_task(self): """Verifying check_build_duplicates_task method """ (fileDes, outputFilename) = tempfile.mkstemp() @@ -41,12 +42,14 @@ outputFile.close() os.unlink(outputFilename) assert len(contents) == 15 + def test_check_build_duplicates_task_invalid(self): """Verifying check_build_duplicates_task (invalid args) method""" self.assertRaises(Exception, integration.ant.check_build_duplicates_task, None, None, None, None) class _emulateTask(): """Emulate task""" + def log(self, message): """Emulate log method""" pass @@ -55,39 +58,47 @@ """Emulate attributes""" def __init__(self, outputFilename): self.outputFilename = outputFilename + def get(self, _): """Emulate get method""" return self.outputFilename class _emulateElements(): """Emulate elements""" + def get(self, _): """Emulate get method""" return _emulateFileset() class _emulateFileset(): """Emulate fileset""" + def get(self, _): """Emulate get method""" return _emulateDirScanner() + def size(self): """Emulate size method""" return 1 class _emulateDirScanner(): """Emulate dirscanner""" + def scan(self): """Emulate scan method""" pass + def getIncludedFiles(self): """Emulate getIncludedFiles method """ if os.sep == '\\': return ['test_build_compile.log'] elif os.sep == '/': return ['test_build_compile_linux.log'] + def getDirectoryScanner(self, _): """Emulate getDirectoryScanner method """ return self + def getBasedir(self): """Emulate getBasedir method """ return os.path.join(os.environ['TEST_DATA'], 'data', 'compile', 'logs') diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_log2xml.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_log2xml.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_log2xml.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ test log to XML """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import logging diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_misc.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_misc.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_misc.py Mon Sep 13 13:11:19 2010 +0800 @@ -47,7 +47,7 @@ import optparse -# pylint: disable-msg=W0613 +# pylint: disable=W0613 def testCallback(option, opt, value, parser): """test Call back""" diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_preparation.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_preparation.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_preparation.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ Testing preparation module """ -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import tempfile from shutil import rmtree @@ -34,7 +34,7 @@ _disable_is_relative = False _disable_sub_projects = False -# pylint: disable-msg=W0613 +# pylint: disable=W0613 #these methods are all mocking/emulating the real methods in other files so need the interface to be #the same and no code present hence pylint throws up warnings saying unused variables. def _get_role_for_status(status): @@ -57,7 +57,7 @@ """ Emulate ccm.UpdateResultSimple method for unit testing """ pass -def _fastMaintainWorkArea(project, dir, projectname, threads): +def _fastMaintainWorkArea(project, dir_, projectname, threads): """ Emulate ccm.extra.FastMaintainWorkArea method for unit testing """ pass @@ -366,9 +366,9 @@ class _config(): """Emulating configuration class""" - def __init__(self, type): + def __init__(self, type_): self.database = 'test' - self.type = type + self.type = type_ self.name = 'test' self.data = {'database': 'test'} self.data['dir'] = tempfile.gettempdir() @@ -435,7 +435,7 @@ """ Check if key exists. """ return self.data.has_key(key) -# pylint: disable-msg=W0613 +# pylint: disable=W0613 #need disable msg to prevent pylint warning as this is emulating the real method. def create(self, fpn): """Emulating session.create method""" @@ -446,7 +446,7 @@ """Emulating session.purposes method""" return self -# pylint: disable-msg=W0613 +# pylint: disable=W0613 #need disable msg to prevent pylint warning as this is emulating the real method. def get_workarea_info(self, path): """Emulating session.get_workarea_info method""" @@ -465,8 +465,6 @@ class _project(): """Emulating project class""" def __init__(self): - global _disable_sub_projects - global _disable_is_relative self.name = 'pyUnitTestHeliumProject' self.objectname = '1' self.data = {'status':None} @@ -506,7 +504,7 @@ """Emulating project.update method""" pass - def work_area(self, boolean1, boolean2, boolean3 = None, dir=None, projectname=None ): + def work_area(self, boolean1, boolean2, boolean3 = None, dir_=None, projectname=None ): """Emulating project.work_area method""" pass @@ -514,7 +512,7 @@ """Emulating project.conflict method""" pass -# pylint: disable-msg=W0613 +# pylint: disable=W0613 #need disable msg to prevent pylint warning as this is emulating the real method. def checkout(self, session, version, purpose): """Emulating project.checkout method""" @@ -589,7 +587,7 @@ """Emulating sub project.exists """ return True -# pylint: disable-msg=W0613 +# pylint: disable=W0613 #need disable msg to prevent pylint warning as this is emulating the real method. def checkout(self, session, version, purpose, subprojects=None): """Emulating sub project.checkout """ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_session_provider.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_session_provider.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_session_provider.py Mon Sep 13 13:11:19 2010 +0800 @@ -19,7 +19,7 @@ """ Test cases for ccm python toolkit.""" -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import unittest import ccm @@ -31,10 +31,13 @@ _logger = logging.getLogger('test.test_session_provider') logging.basicConfig(level=logging.INFO) + class MockResultSession(ccm.AbstractSession): """ Fake session used to test Result""" - def __init__(self, behave = {}, database="fakedb"): + def __init__(self, behave=None, database="fakedb"): ccm.AbstractSession.__init__(self, None, None, None, None) + if behave == None: + behave = {} self._behave = behave self._database = database self.dbpath = "/path/to/" + database @@ -56,12 +59,13 @@ result.status = -1 return result + class MockOpener(object): """ An Opener which provides a mock session """ def __init__(self): self.failOnNewOpen = False -# pylint: disable-msg=W0613 +# pylint: disable=W0613 #need disable msg to prevent pylint warning as this is emulating the real method. def __call__(self, username=None, password=None, engine=None, dbpath=None, database=None, reuse=True): assert self.failOnNewOpen == False, "This method should not be called again." @@ -70,6 +74,7 @@ return MockResultSession() # pylint: enable-msg=W0613 + class SessionProviderTest(unittest.TestCase): """ Testing Results parsers. """ def test_get_valid_db(self): @@ -84,11 +89,10 @@ try: _ = prov.get(database="invaliddb") assert False, "Should raise Exception when giving unexisting dbase.'" - except Exception, exc: + except ccm.CCMException, exc: _logger.info(exc) - class CachedSessionProviderTest(unittest.TestCase): """ Testing Results parsers. """ session_cache = os.path.join(tempfile.mkdtemp(), 'session_cache.xml') @@ -117,7 +121,7 @@ try: _ = prov.get(database="invaliddb") assert False, "Should raise Exception when giving unexisting dbase.'" - except Exception, exc: + except ccm.CCMException, exc: _logger.info(exc) def test_open_session_twice(self): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_symbian_log.py --- a/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_symbian_log.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/pythoncoretests/test_symbian_log.py Mon Sep 13 13:11:19 2010 +0800 @@ -104,10 +104,10 @@ _logger.debug(name) self.stages.append(name) - def task(self, name, cmdline, dir, output): + def task(self, name, cmdline, dir_, output): """task""" - _logger.debug("%s, %s, %s, %s" % (name, cmdline, dir, output)) - self.tasks.append({'name': name, 'cmdline': cmdline, 'dir': dir, 'output': output}) + _logger.debug("%s, %s, %s, %s" % (name, cmdline, dir_, output)) + self.tasks.append({'name': name, 'cmdline': cmdline, 'dir': dir_, 'output': output}) class TestSymbianLog(unittest.TestCase): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/rtfutils.py --- a/buildframework/helium/sf/python/pythoncore/lib/rtfutils.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/rtfutils.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,7 +18,7 @@ #=============================================================================== """ rtf utilis""" -# pylint: disable-msg=R0201 +# pylint: disable=R0201 import csv import os @@ -43,13 +43,13 @@ template = file(self.template, 'rb' ) output = file(outputfilename, 'w' ) - self._rtftable(errors, output, tagtoreplace, template) + self.rtftable_file(errors, output, tagtoreplace, template) errors.close() output.close() template.close() - def _rtftable(self, errors, output, tagtoreplace, template): + def rtftable_file(self, errors, output, tagtoreplace, template): """rtf table""" PyRTF.Elements.StandardColours.append(PyRTF.PropertySets.Colour('NokiaBlue', 153, 204, 255)) @@ -104,12 +104,12 @@ template = file(self.template, 'rb' ) output = file(outputfilename, 'w' ) - self._rtfimage(image, output, tagtoreplace, template) + self.rtfimage_file(image, output, tagtoreplace, template) output.close() template.close() - def _rtfimage(self, image, output, tagtoreplace, template): + def rtfimage_file(self, image, output, tagtoreplace, template): """rtf image""" temp_file = 'image_temp.rtf' @@ -149,12 +149,12 @@ inputfile = file( inputfilename, 'r' ) outputfile = file( outputfilename, 'w' ) - self._rtfconvert(inputfile, outputfile) + self.rtfconvert_file(inputfile, outputfile) inputfile.close() outputfile.close() - def _rtfconvert(self, inputfile, outputfile): + def rtfconvert_file(self, inputfile, outputfile): """rtf convert""" ppp = re.compile(r'(.+=)((\\\\|http|\.\\|ftp)(.+))') for line in inputfile: diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/sphinx_ext.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/lib/sphinx_ext.py Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,91 @@ +#============================================================================ +#Name : sphinx_ext.py +#Part of : Helium + +#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +#All rights reserved. +#This component and the accompanying materials are made available +#under the terms of the License "Eclipse Public License v1.0" +#which accompanies this distribution, and is available +#at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +#Initial Contributors: +#Nokia Corporation - initial contribution. +# +#Contributors: +# +#Description: +#=============================================================================== +""" aids to creating the API documentation""" +import os +import re + +from docutils import nodes, utils +from docutils.parsers.rst import directives + +import amara + +treecache = None + +def handle_hlm_role(role, rawtext, text, lineno, inliner, + options=None, content=None): + """ Process a custom Helium ReStructuredText role to link to a target, property or macro. """ + if options == None: + options = {} + if content == None: + content = [] + full_path_match = re.search(r" 0: return os.path.normpath(os.path.join(releasedir, metadatas[0])) - except Exception, exc: + except (IOError, OSError), exc: LOGGER.error(exc) return None return None + class ValidateReleaseMetadataCached(ValidateReleaseMetadata): """ Cached version of the metadata validation. """ def __init__(self, filename, cachefile=None): @@ -538,12 +540,13 @@ writer.writerows(metadatas) f_file.close() + class ValidateTicklerReleaseMetadata(ValidateReleaseMetadataCached): """ This class validate if a metadata file is stored in the correct location and if all deps exists. """ def __init__(self, filename): - ReleaseMetadata.__init__(self, filename) + ValidateReleaseMetadataCached.__init__(self, filename) self.location = os.path.dirname(filename) def is_valid(self, checkmd5=True): diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/sysdef/api.py --- a/buildframework/helium/sf/python/pythoncore/lib/sysdef/api.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/sysdef/api.py Mon Sep 13 13:11:19 2010 +0800 @@ -567,11 +567,11 @@ for (unit_name, binaries) in binaries_reader: unit_name = unit_name.lower() if self.units.has_key(unit_name): - for bin in binaries: - #if bin.find('_stolon_ekern') != -1: - _logger.debug("Merging: %s" % bin) + for bin_ in binaries: + #if bin_.find('_stolon_ekern') != -1: + _logger.debug("Merging: %s" % bin_) unit = self.units[unit_name] - unit.binaries = [Binary(bin.lower(), self) for bin in binaries] + unit.binaries = [Binary(bin_.lower(), self) for bin_ in binaries] for binary in unit.binaries: self.addElement(binary) _logger.info('Merging binary: %s' % str(binary)) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/sysdef/io.py --- a/buildframework/helium/sf/python/pythoncore/lib/sysdef/io.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/sysdef/io.py Mon Sep 13 13:11:19 2010 +0800 @@ -16,7 +16,7 @@ # #Description: #=============================================================================== -# pylint: disable-msg=W0212,W0141 +# pylint: disable=W0212,W0141 """ IO module for SystemDefinitionFile. - Allow convertion to m,a """ diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/timeout_launcher.py --- a/buildframework/helium/sf/python/pythoncore/lib/timeout_launcher.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/timeout_launcher.py Mon Sep 13 13:11:19 2010 +0800 @@ -18,6 +18,7 @@ #=============================================================================== """ Application launcher supporting timeout. """ + import os import sys import re @@ -61,12 +62,12 @@ sys.exit(-1) else: _logger.debug("Start command") + shell = True + if _windows: + shell = False if timeout != None: finish = time.time() + timeout timedout = False - shell = True - if _windows: - shell = False p_file = subprocess.Popen(' '.join(cmdline), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=shell) while (p_file.poll() == None): if time.time() > finish: @@ -84,15 +85,14 @@ except Exception, exc: print "ERROR: %s" % exc else: - # pylint: disable-msg=E1101 - os.kill(p_file.pid, 9) + os.kill(p_file.pid, 9) # pylint: disable=E1101 print "ERROR: exiting..." raise Exception("Timeout exception.") else: print p_file.communicate()[0] sys.exit(p_file.returncode) else: - p_file = subprocess.Popen(' '.join(cmdline), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) + p_file = subprocess.Popen(' '.join(cmdline), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=shell) print p_file.communicate()[0] sys.exit(p_file.returncode) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/lib/unittestadditions.py --- a/buildframework/helium/sf/python/pythoncore/lib/unittestadditions.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/lib/unittestadditions.py Mon Sep 13 13:11:19 2010 +0800 @@ -22,7 +22,7 @@ import logging _logger = logging.getLogger('unittestadditions') -# pylint: disable-msg=C0103 +# pylint: disable=C0103 class skip(object): """ Skip decorator. The decorated function will only be called diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/setup.py --- a/buildframework/helium/sf/python/pythoncore/setup.py Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/python/pythoncore/setup.py Mon Sep 13 13:11:19 2010 +0800 @@ -32,4 +32,5 @@ packages = find_packages('lib', exclude=["*tests"]), test_suite = 'nose.collector', package_data = {'': ['*.xml', '**/*.xml', '*.pl']}, + zip_safe = True, ) diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/tests/data/matti/matti_template.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/tests/data/matti/matti_template.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,154 @@ + + + + + + {% if xml_dict['diamonds_build_url'] -%} + {{ xml_dict['diamonds_build_url'] }} + Smoke + {% endif %} + {{ xml_dict['testrun_name'] }} + + + + + + + + + + {% for exe_block in xml_dict['execution_blocks'] -%} + + + + {% if exe_block['image_files'] -%} + + FlashTask + + {% set i = 1 %} + {% for img in exe_block['image_files'] -%} + + {% set i = i + 1 %} + {% endfor -%} + + + {% endif %} + + + {% if exe_block['install_files'] != [] -%} + {% for file in exe_block['install_files'] -%} + + FileUploadTask + + + + + + {% endfor -%} + {% endif %} + + {% if exe_block['matti_sis_files'] != [] -%} + {% for sisfile in exe_block['matti_sis_files'] -%} + + FileUploadTask + + + + + + {% endfor -%} + {% endif %} + + {% for sis_file in exe_block["matti_sis_files"] -%} + + InstallSisTask + + + + + + + + + + + + + + + + + + + + {%- endfor -%} + + + RebootTask + + + + CreateDirTask + + + + + + + {% for task_file in exe_block["matti_task_files"] -%} + + MATTITask + + + + + + + + + {% endfor -%} + + + + CleanupTask + + + + + + + {% endfor -%} + + + + EmailAction + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,142 @@ + + + + http://diamonds.com/1234 + Smoke + matti test run + + + + + + + + + + FlashTask + + + + + + + FileUploadTask + + + + + + + FileUploadTask + + + + + + + FileUploadTask + + + + + + + FileUploadTask + + + + + + + InstallSisTask + + + + + + + + + + + + + + + + + + + + + InstallSisTask + + + + + + + + + + + + + + + + + + + + + RebootTask + + + + CreateDirTask + + + + + + + MATTITask + + + + + + + + + + MATTITask + + + + + + + + + + + CleanupTask + + + + + + + + + EmailAction + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present_sierra_disabled.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/tests/data/matti/test_all_present_sierra_disabled.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,142 @@ + + + + http://diamonds.com/1234 + Smoke + matti test run + + + + + + + + + + FlashTask + + + + + + + FileUploadTask + + + + + + + FileUploadTask + + + + + + + FileUploadTask + + + + + + + FileUploadTask + + + + + + + InstallSisTask + + + + + + + + + + + + + + + + + + + + + InstallSisTask + + + + + + + + + + + + + + + + + + + + + RebootTask + + + + CreateDirTask + + + + + + + MATTITask + + + + + + + + + + MATTITask + + + + + + + + + + + CleanupTask + + + + + + + + + EmailAction + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/python/pythoncore/tests/data/packageiad/sysdef3_test.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/python/pythoncore/tests/data/packageiad/sysdef3_test.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/settings/ivysettings.xml --- a/buildframework/helium/sf/settings/ivysettings.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/sf/settings/ivysettings.xml Mon Sep 13 13:11:19 2010 +0800 @@ -42,5 +42,10 @@ + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/sf/settings/triggers/egg-extract.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/sf/settings/triggers/egg-extract.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/data/logs/test_helium_dev_9.1.50_targetTimesLog.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/data/logs/test_helium_dev_9.1.50_targetTimesLog.csv Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,257 @@ +preprocess-sysdef-files,2 +create-canonical-sysdef-file,5 +precompile-ec,0 +run-coverity-configure,0 +precompile,0 +run-qmake,0 +genxml,0 +postprocess-genxml,0 +get-arm-license,0 +check-env-arm-license,0 +set-arm-version,0 +compile-ebs,0 +compile-genxml-ec,0 +compile-ec-helium,0 +find-freeport,0 +compile-ebs-ant,0 +compile-sbs,137 +compile-scanlog,0 +compile-configuration,0 +do-compile-main,0 +postcompile-ec,0 +check-build-duplicates,0 +integration-build-duplicates,0 +render-build-duplicates,0 +post-coverity,0 +postcompile,0 +compile-main,0 +ido-prep-clean,0 +ido-prep-clean-dfs,0 +preprocess-sysdef-files,2 +create-canonical-sysdef-file,5 +precompile-ec,0 +run-coverity-configure,0 +precompile,0 +run-qmake,0 +genxml,0 +postprocess-genxml,0 +get-arm-license,0 +check-env-arm-license,0 +set-arm-version,0 +compile-ebs,0 +compile-genxml-ec,0 +compile-ec-helium,0 +find-freeport,0 +compile-ebs-ant,0 +compile-sbs,1232 +compile-scanlog,0 +compile-configuration,0 +do-compile-main,0 +postcompile-ec,0 +check-build-duplicates,0 +integration-build-duplicates,0 +render-build-duplicates,0 +post-coverity,0 +postcompile,0 +compile-main,0 +compile-dfs,0 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,1 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,4 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,0 +ido-validate-confml,2 +ido-validate-confml,0 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,0 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +preprocess-sysdef-files,4 +create-canonical-sysdef-file,6 +precompile-ec,0 +run-coverity-configure,0 +precompile,0 +run-qmake,0 +genxml,0 +postprocess-genxml,0 +get-arm-license,0 +check-env-arm-license,0 +set-arm-version,0 +compile-ebs,0 +compile-genxml-ec,0 +compile-ec-helium,0 +find-freeport,0 +compile-ebs-ant,0 +compile-sbs,114 +compile-scanlog,0 +compile-configuration,0 +do-compile-main,0 +postcompile-ec,0 +check-build-duplicates,0 +integration-build-duplicates,0 +render-build-duplicates,0 +post-coverity,0 +postcompile,0 +compile-main,0 +ido-prep-clean,0 +ido-prep-clean-dfs,0 +preprocess-sysdef-files,2 +create-canonical-sysdef-file,5 +precompile-ec,0 +run-coverity-configure,0 +precompile,0 +run-qmake,0 +genxml,0 +postprocess-genxml,0 +get-arm-license,0 +check-env-arm-license,0 +set-arm-version,0 +compile-ebs,0 +compile-genxml-ec,0 +compile-ec-helium,0 +find-freeport,0 +compile-ebs-ant,0 +compile-sbs,1250 +compile-scanlog,0 +compile-configuration,0 +do-compile-main,0 +postcompile-ec,0 +check-build-duplicates,0 +integration-build-duplicates,0 +render-build-duplicates,0 +post-coverity,0 +postcompile,0 +compile-main,0 +compile-dfs,0 +ido-validate-confml,4 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,2 +ido-validate-confml,0 +ido-validate-confml,0 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,0 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,2 +ido-validate-confml,2 +ido-create-ado-mapping,9 +get-sources-path,0 +ido-check-sf-source-header,2 +ido-create-ado-mapping,6 +get-sources-path,0 +ido-check-sf-source-header,3 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,2 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,1 +ido-validate-confml,0 +ido-validate-confml,1 +ido-validate-confml,5 +all,0 +ido-validate-confml,1 +validate-confml-file,1 +all,0 +ido-validate-confml,1 +validate-confml-file,3 +all,0 +ido-validate-confml,1 +validate-confml-file,2 +all,0 +ido-validate-confml,1 +ido-cenrep-generation,21 +all,0 +ido-gen-cenrep,1 +validate-confml-file,0 +ido-validate-confml,2 +validate-confml-file,0 +ido-validate-confml,2 +ido-validate-confml,0 +cone-validate,0 +cone-validate,0 +cone-validate,0 +cone-validate,3 +product-cone-validate,67 +all,0 +cone-validate,3 +product-cone-validate,66 +all,0 +cone-validate,3 +product-cone-validate,66 +all,0 +cone-validate,4 +product-cone-validate,66 +all,0 +cone-validate,3 +product-cone-validate,66 +all,0 +cone-validate,3 +product-cone-validate,66 +all,0 +cone-validate,7 +ido-validate-confml,0 +validate-confml-file,2 +all,0 +ido-validate-confml,2 +product-cone-validate,67 +all,0 +cone-validate,6 +cone-validate,0 +cone-validate,0 +product-cone-validate,69 +all,0 +cone-validate,8 +cone-validate,0 +product-cone-validate,66 +all,0 +cone-validate,8 +ido-validate-confml,0 +validate-confml-file,6 +all,0 +ido-validate-confml,3 +ido-cenrep-generation,11 +all,0 +ido-gen-cenrep,1 diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/data/logs/test_helium_dev_9.2.10_test_test_compile.log --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/data/logs/test_helium_dev_9.2.10_test_test_compile.log Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,135 @@ + + +sbs: version 2.12.1 [2010-01-29 symbian build system 4e477ddf2eed] + +SBS_HOME C:/APPS/sbs +Set-up C:/APPS/sbs/sbs_init.xml +Current working directory Y:\ +Environment /S=BHTEST001 +Environment ALLUSERSPROFILE=C:\Documents and Settings\All Users +Environment ANT_ARGS=-lib "E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\antlibs2" -lib "E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\extensions\nokia\external\antlibs" -logger com.nokia.ant.HeliumLogger -listener com.nokia.helium.internaldata.ant.listener.Listener -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener -listener com.nokia.helium.environment.ant.listener.ExecListener +Environment ANT_CMD_LINE_ARGS=-Dhelium.dir "E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium" -Dcache.dir "e:\ec_temp\helium\username" -Dbuild.drive Y: -Dbuild.system sbs -Denabled.ats true compile-test +Environment ANT_HOME=C:\APPS\ant_1.7 +Environment ANT_OPTS=-Xmx896M -Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir="e:\ec_temp\helium\username" -Dpython.path=E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\2.5\jython-2.5-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\2.6\4Suite_XML-1.0.2-py2.6-win32.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\2.6\PyXML-0.8.4-py2.6-win32.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\2.6\lxml-2.2.1-py2.6-win32.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\4Suite_XML-1.0.2.py2.6-win32.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\Jinja2-2.2.1.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\PyRTF-0.45.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\amara-1.2.0.1.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\blockspackager-1.0.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\dp-1.0.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\iadnokia-1.0.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\jython-2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\lxml-2.2.1.py2.6-win32.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\mocker-0.10.1.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\path-2.2.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\pythoncore-1.0.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\pythonnokia-1.0.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto\setuptools-0.6c5.py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\Amara-1.2.0.1-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\Jinja-1.2-py2.5-win32.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\Jinja2-2.2.1-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\Pygments-0.10-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\coverage-2.85-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\epydoc-3.0beta1-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\mocker-0.10.1-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\nose-0.11.1-py2.6.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\path-2.2-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\setuptools-0.6c5-py2.5.egg;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common\simplejson-1.9.1-py2.5-win32.egg;;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\auto;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\2.6;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\external\python\lib\common;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\tools\common\python\scripts;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\extensions\nokia\external\python\lib\2.6;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\extensions\nokia\tools\common\python\lib;C:\APPS\sbs\python +Environment APPDATA=C:\Documents and Settings\username\Application Data +Environment APR_ICONV_PATH=C:\apps\Subversion\iconv +Environment APTLMHOST=@oupelic4.emea.nsn-net.net +Environment ARMROOT=\ +Environment ARMV5VER=:ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686] +Environment CLIENTNAME=2INL05520 +Environment CLUSTERLOG=C:\ETPWIN\Cluster\cluster.log +Environment CMTHOME=C:\APPS\cmt +Environment COMMONPROGRAMFILES=C:\Program Files\Common Files +Environment COMPUTERNAME=BHWEC019 +Environment COMSPEC=C:\ETPWIN\system32\cmd.exe +Environment COPYCMD=/y +Environment CTCHOME=C:\APPS\ctc +Environment CTC_AGENT_DEBUG=* +Environment CYGWIN=nontsec nosmbntsec +Environment DERBY_HOME=C:\APPS\jdk_1.6.0_11\JavaDB +Environment EMAKEFLAGS=--emake-reg-roots=-\HKEY_CLASSES_ROOT +Environment EMAKE_CM=bhwec001 +Environment EMAKE_EMULATION=symbian +Environment EMAKE_ROOT=\;C:\apps +Environment EPOCROOT=\ +Environment FLEXLM_BATCH=1 +Environment FLEXLM_TIMEOUT=900000 +Environment FP_NO_HOST_CHECK=NO +Environment HELIUM_CACHE_DIR="e:\ec_temp\helium\username" +Environment HELIUM_HOME=E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium +Environment HOME=h:\ +Environment HOMEDRIVE=C: +Environment HOMEPATH=\Documents and Settings\username +Environment HOSTPLATFORM=win 32 +Environment HOSTPLATFORM_DIR=win32 +Environment INCLUDE=C:\APPS\MSVC6\VC98\ATL\Include\;C:\APPS\MSVC6\VC98\MFC\Include\;C:\APPS\MSVC6\VC98\Include\ +Environment INTERNAL_DATA_ANT_ARGS= -listener com.nokia.helium.internaldata.ant.listener.Listener +Environment JAVA_1_3_1_HOME=C:\apps\j2sdk_1.3.1_06 +Environment JAVA_5_HOME=C:\APPS\jdk_1.5.0_17 +Environment JAVA_6_HOME=C:\APPS\jdk_1.6.0_11 +Environment JAVA_HOME=C:\APPS\jdk_1.6.0_11 +Environment LIB=C:\APPS\MSVC6\VC98\MFC\Lib\;C:\APPS\MSVC6\VC98\Lib\ +Environment LM_LICENSE_FILE=1727@bhlic01.apac.nokia.com;C:\APPS\licenses\apac.dat;1726@tolic01.apac.nokia.com;C:\APPS\licenses\PCLint.dat;C:\APPS\licenses\apac.dat;1726@tolic01.apac.nokia.com;C:\APPS\licenses\PCLint.dat;1707@bhlic01.apac.nokia.com; +Environment LOGGING_ANT_ARGS= -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener +Environment LOGONSERVER=\\BHWDC101 +Environment MSDEVDIR=C:\APPS\MSVC6\Common\MSDev98 +Environment MWCSYM2INCLUDES=C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C\MSL_X86;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_C++\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Common\Include;C:\APPS\carbide\x86Build\Symbian_Support\MSL\MSL_Extras\MSL_Win32\Include;C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Headers\Win32 SDK +Environment MWSYM2LIBRARIES=C:\APPS\carbide\x86Build\Symbian_Support\Win32-x86 Support\Libraries\Win32 SDK;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs +Environment MWSYM2LIBRARYFILES=MSL_All_MSE_Symbian_D.lib;gdi32.lib;user32.lib;kernel32.lib; +Environment NOKIA_LICENSE_FILE=C:\APPS\licenses\apac.dat; +Environment NUMBER_OF_PROCESSORS=4 +Environment OS=Windows_NT +Environment PATH=C:\APPS\sbs\win32\mingw\bin;C:\APPS\sbs\win32\cygwin\bin;C:\APPS\sbs\win32\bin;C:\APPS\jdk_1.6.0_11\bin;C:\APPS\actpython\.;c:\apps\actperl\bin\;c:\apps\rvct22_686\bin;c:\apps\atool;\epoc32\tools;\epoc32\gcc\bin;c:\apps\ue;c:\apps\ccm65\bin;c:\apps\carbide\x86Build\Symbian_Tools\Command_Line_Tools;c:\ECloud\i686_win32\bin;C:\Program Files\HP\NCU;c:\program files\windows resource kits\tools\;C:\ETPWIN\system32;C:\ETPWIN\system32\wbem;c:\progra~1\putty;c:\apps\cmt\;c:\apps\cltools;c:\apps\symrec;c:\apps\ant_1.7.0\bin;c:\apps\understand\bin\pc-win95;c:\apps\unzip;c:\apps\msvc6\common\tools\winnt;c:\apps\msvc6\common\msdev98\bin;c:\apps\msvc6\vc98\bin;c:\eesp\system32;c:\program files\subversion\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\pclint;C:\APPS\ctc;C:\APPS\prevent\bin;C:\APPS\sbs\bin;C:\APPS\blocks\bin;C:\APPS\codescanner;C:\APPS\jdk_1.6.0_11\bin;C:\APPS\7zip;C:\APPS\romtools;C:\APPS\imaker;C:\APPS\bc;\epoc32\gcc_mingw\bin;C:\ETPWIN\system32\WindowsPowerShell\v1.0;C:\APPS\symdec;C:\APPS\ant_1.7\bin;C:\APPS\MSVC6\VC98\Bin\;C:\APPS\MSVC6\Common\Tools\;C:\APPS\MSVC6\Common\MSDev98\Bin\;C:\APPS\ant_1.7\bin;C:\apps\Subversion\bin;E:\RaghuAE\Mercurial;E:\RaghuAE\coverity\bin;C:\apps\OpenSSH\bin;;\epoc32\tools;\epoc32\gcc\bin;\epoc32\tools\build;\epoc32\rombuild;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\extensions\nokia\external\unxutils;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\extensions\nokia\external\Subversion\bin;E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\extensions\nokia\external\graphviz\bin;C:\APPS\ctc +Environment PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.PSC1 +Environment PERL=C:\APPS\actperl\bin\perl.exe +Environment PERL5LIB=E:\RaghuAE\Helium_WorkArea\Helium_Mercurial\helium-working\helium\tools\common\packages +Environment PID=4696 +Environment PROCESSOR_ARCHITECTURE=x86 +Environment PROCESSOR_IDENTIFIER=x86 Family 15 Model 65 Stepping 2, AuthenticAMD +Environment PROCESSOR_LEVEL=15 +Environment PROCESSOR_REVISION=4102 +Environment PROGRAMFILES=C:\Program Files +Environment PROMPT=$P$G +Environment PSMODULEPATH=C:\ETPWIN\system32\WindowsPowerShell\v1.0\Modules\ +Environment PYTHONPATH=C:\APPS\sbs\win32\python264 +Environment PYTHONVERSION=2.6 +Environment RVCT22BIN=C:\APPS\rvct22_686\bin +Environment RVCT22INC=C:\APPS\rvct22_686\include +Environment RVCT22LIB=C:\APPS\rvct22_686\lib +Environment RVCT22_ASMOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_CCOPT=--licretry --fastlicense --sitelicense +Environment RVCT22_LINKOPT=--licretry --fastlicense --sitelicense +Environment SBS_HOME=C:\APPS\sbs +Environment SESSIONNAME=RDP-Tcp#47 +Environment SIGNALING_ANT_ARGS= -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor +Environment SYMSEE_VERSION=11.1.1 +Environment SYSTEMDRIVE=C: +Environment SYSTEMROOT=C:\ETPWIN +Environment TARGET_TIMES_GENERATOR= -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener +Environment TEMP=e:\ec_temp +Environment TESTED_ANT=C:\APPS\ant_1.7 +Environment TESTED_JAVA=C:\APPS\jdk_1.6.0_11 +Environment TMP=e:\ec_temp +Environment TMPDIR=e:\ec_tmpdir +Environment USERNAME=username +Environment USERPROFILE=C:\Documents and Settings\username +Environment WINDIR=C:\ETPWIN +Environment _JAVACMD=C:\APPS\jdk_1.6.0_11\bin\java.exe +Environment _USE_CLASSPATH=no +Environment __CYGWIN__=C:\APPS\sbs\win32\cygwin +Environment __MINGW__=C:\APPS\sbs\win32\mingw +Environment __PYTHON__=C:\APPS\sbs\win32\python264\python.exe +Duplicate alias 'make' (the one from 'Y:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/APPS/sbs/lib/config\make.xml') +Duplicate alias 'emake' (the one from 'Y:/epoc32/sbs_config\s60_sbs_config.xml' will override the one in 'C:/APPS/sbs/lib/config\make.xml') +Buildable configuration 'armv5_urel.test' +Buildable configuration 'armv5_udeb.test' +System Definition file Y:/output/build/canonical_system_definition_test.xml +Found 38 bld.inf references in Y:/output/build/canonical_system_definition_test.xml within 22 layers: + stubs_layer, complementary_layer, os_layer, tools_layer, bldmefirst_layer, bldmelast_layer, addon_layer, clean_only_layer, bldfirst_mw_layer, api_test_layer, unit_test_layer, perf_test_layer, module_test_layer, qt_unit_test_layer, s60_stubs_layer, s60_complementary_layer, s60_app_layer, s60_mw_layer, s60_osext_layer, s60_bldmefirst_layer, s60_bldmelast_layer, mecevo_layer +Found 0 bld.inf references in layer "stubs_layer" +Found 0 bld.inf references in layer "complementary_layer" +Found 0 bld.inf references in layer "os_layer" +Found 0 bld.inf references in layer "tools_layer" +Found 0 bld.inf references in layer "bldmefirst_layer" +Found 0 bld.inf references in layer "bldmelast_layer" +Found 0 bld.inf references in layer "addon_layer" +Found 0 bld.inf references in layer "clean_only_layer" +Found 0 bld.inf references in layer "bldfirst_mw_layer" +Found 15 bld.inf references in layer "api_test_layer" +Found 23 bld.inf references in layer "unit_test_layer" +Found 0 bld.inf references in layer "perf_test_layer" +Found 0 bld.inf references in layer "module_test_layer" +Found 0 bld.inf references in layer "qt_unit_test_layer" +Found 0 bld.inf references in layer "s60_stubs_layer" +Found 0 bld.inf references in layer "s60_complementary_layer" +Found 0 bld.inf references in layer "s60_app_layer" +Found 0 bld.inf references in layer "s60_mw_layer" +Found 0 bld.inf references in layer "s60_osext_layer" +Found 0 bld.inf references in layer "s60_bldmefirst_layer" +Found 0 bld.inf references in layer "s60_bldmelast_layer" +Found 0 bld.inf references in layer "mecevo_layer" +Toolcheck cache Y:/epoc32/build/toolcheck_cache_.tmp ignored - environment changed + +no OS variant for the configuration "armv5_urel.test". +'armv5_urel.test' uses variant hrh file 'Y:/epoc32/include/feature_settings.hrh' +no OS variant for the configuration "armv5_udeb.test". diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/data/test-minibuild-sysdef3.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/data/test-minibuild-sysdef3.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/data/test-scanlog_helium_minibuild_ido_input_compile.log --- a/buildframework/helium/tests/data/test-scanlog_helium_minibuild_ido_input_compile.log Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/data/test-scanlog_helium_minibuild_ido_input_compile.log Mon Sep 13 13:11:19 2010 +0800 @@ -118,20 +118,20 @@ OS version "vtb92sf" determined from file "m:/epoc32/data/buildinfo.txt" applying the OS variant to the configuration "armv5_udeb". 'armv5_udeb' uses variant hrh file 'm:/epoc32/include/feature_settings.hrh' -Processing m:/sf/mw/HelloWorldAPI/group/bld.inf -Processing m:/sf/app/HelloWorldCons/group/bld.inf -Copied m:/sf/mw/HelloWorldAPI/inc/HelloWorldAPI.h to m:/epoc32/include/HelloWorldAPI.h -Copied m:/sf/mw/HelloWorldAPI/rom/HelloWorldAPI.iby to m:/epoc32/rom/include/core/mw/HelloWorldAPI.iby - - - +Processing m:/sf/mw/helloworldapi/group/bld.inf +Processing m:/sf/app/helloworldcons/group/bld.inf +Copied m:/sf/mw/helloworldapi/inc/helloworldapi.h to m:/epoc32/include/helloworldapi.h +Copied m:/sf/mw/helloworldapi/rom/helloworldapi.iby to m:/epoc32/rom/include/core/mw/helloworldapi.iby + + + -Copied m:/sf/app/HelloWorldCons/rom/helloworldcons.iby to m:/epoc32/rom/include/core/app/helloworldcons.iby - - +Copied m:/sf/app/helloworldcons/rom/helloworldcons.iby to m:/epoc32/rom/include/core/app/helloworldcons.iby + + -Processing m:/sf/mw/HelloWorldAPI/group/HelloWorldAPI.mmp for platform armv5_urel + armv5_udeb -Processing m:/sf/app/HelloWorldCons/group/HelloWorldCons.mmp for platform armv5_urel + armv5_udeb +Processing m:/sf/mw/helloworldapi/group/helloworldapi.mmp for platform armv5_urel + armv5_udeb +Processing m:/sf/app/helloworldcons/group/helloworldcons.mmp for platform armv5_urel + armv5_udeb Running C:/APPS/sbs/win32/bin/talonctl.exe start Making m:/output/logs/compile/minibuild_ido_sbs_0.0.10_armv5_helium_minibuild_ido_all.export Executing 'C:/APPS/sbs/win32/mingw/bin/make.exe HAVE_ORDERONLY=1 -r -f "m:/output/logs/compile/minibuild_ido_sbs_0.0.10_armv5_helium_minibuild_ido_all.export" -k TALON_DESCRAMBLE=1 2>'m:/output/logs/compile/minibuild_ido_sbs_0.0.10_armv5_helium_minibuild_ido_all.export.stderr' ' @@ -147,185 +147,185 @@ make: Nothing to_be_done for `RESOURCE'. Making m:/output/logs/compile/minibuild_ido_sbs_0.0.10_armv5_helium_minibuild_ido_all.default Executing 'C:/APPS/sbs/win32/mingw/bin/make.exe HAVE_ORDERONLY=1 -r -f "m:/output/logs/compile/minibuild_ido_sbs_0.0.10_armv5_helium_minibuild_ido_all.default" -k TALON_DESCRAMBLE=1 2>'m:/output/logs/compile/minibuild_ido_sbs_0.0.10_armv5_helium_minibuild_ido_all.default.stderr' ' - -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI.prep -m:/epoc32/release/armv5/urel/HelloWorldAPI.dll -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI{000a0000}.def -"m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI{000a0000}.dso" -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI_urel_objects.via -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI.o.d -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPIDllMain.o.d -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI.o -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPIDllMain.o -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPI.o -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/HelloWorldAPIDllMain.o + +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi.prep +m:/epoc32/release/armv5/urel/helloworldapi.dll +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi{000a0000}.def +"m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi{000a0000}.dso" +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi_urel_objects.via +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi.o.d +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapiDllMain.o.d +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi.o +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapiDllMain.o +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapi.o +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/urel/helloworldapiDllMain.o - -m:/epoc32/release/armv5/lib/HelloWorldAPI.dso -m:/epoc32/release/armv5/lib/HelloWorldAPI{000a0000}.dso -m:/epoc32/release/armv5/lib/HelloWorldAPI.lib -m:/epoc32/release/armv5/lib/HelloWorldAPI{000a0000}.lib -m:/epoc32/release/armv5/urel/HelloWorldAPI.dll -m:/epoc32/release/armv5/urel/HelloWorldAPI.dll.map -m:/epoc32/release/armv5/urel/HelloWorldAPI.dll.map + +m:/epoc32/release/armv5/lib/helloworldapi.dso +m:/epoc32/release/armv5/lib/helloworldapi{000a0000}.dso +m:/epoc32/release/armv5/lib/helloworldapi.lib +m:/epoc32/release/armv5/lib/helloworldapi{000a0000}.lib +m:/epoc32/release/armv5/urel/helloworldapi.dll +m:/epoc32/release/armv5/urel/helloworldapi.dll.map +m:/epoc32/release/armv5/urel/helloworldapi.dll.map - -m:/epoc32/release/armv5/urel/HelloWorldCons.exe -m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/HelloWorldCons{000a0000}.def -"m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/HelloWorldCons{000a0000}.dso" -m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/HelloWorldCons_urel_objects.via -m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/HelloWorldCons.o.d -m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/HelloWorldCons.o -m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/HelloWorldCons.o + +m:/epoc32/release/armv5/urel/helloworldcons.exe +m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/helloworldcons{000a0000}.def +"m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/helloworldcons{000a0000}.dso" +m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/helloworldcons_urel_objects.via +m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/helloworldcons.o.d +m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/helloworldcons.o +m:/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/urel/helloworldcons.o - -m:/epoc32/release/armv5/urel/HelloWorldCons.exe -m:/epoc32/release/armv5/urel/HelloWorldCons.exe.map -m:/epoc32/release/armv5/urel/HelloWorldCons.exe.map + +m:/epoc32/release/armv5/urel/helloworldcons.exe +m:/epoc32/release/armv5/urel/helloworldcons.exe.map +m:/epoc32/release/armv5/urel/helloworldcons.exe.map - -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI.prep -m:/epoc32/release/armv5/udeb/HelloWorldAPI.dll -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI{000a0000}.def -"m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI{000a0000}.dso" -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI_udeb_objects.via -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI.o.d -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPIDllMain.o.d -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI.o -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPIDllMain.o -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPI.o -m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/HelloWorldAPIDllMain.o + +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi.prep +m:/epoc32/release/armv5/udeb/helloworldapi.dll +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi{000a0000}.def +"m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi{000a0000}.dso" +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi_udeb_objects.via +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi.o.d +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapiDllMain.o.d +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi.o +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapiDllMain.o +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapi.o +m:/epoc32/build/helloworldapi/c_54e5c05b9f66e7e8/helloworldapi_dll/armv5/udeb/helloworldapiDllMain.o - -m:/epoc32/release/armv5/lib/HelloWorldAPI.dso -m:/epoc32/release/armv5/lib/HelloWorldAPI{000a0000}.dso -m:/epoc32/release/armv5/lib/HelloWorldAPI.lib -c:/invalid/sdk/epoc32/release/armv5/lib/HelloWorldAPI{000a0000}.lib -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldAPI.dll -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldAPI.dll.map -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldAPI.dll.map + +m:/epoc32/release/armv5/lib/helloworldapi.dso +m:/epoc32/release/armv5/lib/helloworldapi{000a0000}.dso +m:/epoc32/release/armv5/lib/helloworldapi.lib +c:/invalid/sdk/epoc32/release/armv5/lib/helloworldapi{000a0000}.lib +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldapi.dll +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldapi.dll.map +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldapi.dll.map - -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldCons.exe -c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/HelloWorldCons{000a0000}.def -"c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/HelloWorldCons{000a0000}.dso" -c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/HelloWorldCons_udeb_objects.via -c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/HelloWorldCons.o.d -c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/HelloWorldCons.o -c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/HelloWorldCons.o + +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldcons.exe +c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/helloworldcons{000a0000}.def +"c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/helloworldcons{000a0000}.dso" +c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/helloworldcons_udeb_objects.via +c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/helloworldcons.o.d +c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/helloworldcons.o +c:/invalid/sdk/epoc32/build/helloworldcons/c_7044fa8da0e80492/helloworldcons_exe/armv5/udeb/helloworldcons.o - -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldCons.exe -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldCons.exe.map -c:/invalid/sdk/epoc32/release/armv5/udeb/HelloWorldCons.exe.map + +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldcons.exe +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldcons.exe.map +c:/invalid/sdk/epoc32/release/armv5/udeb/helloworldcons.exe.map - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + execute - - + + - + @@ -124,7 +124,7 @@ - ATS3Drop\images\test_file.fpsx + ATS3Drop\images\test_file.fpsx ATS3Drop\images\test_file_3rd.fpsx ATS3Drop\images\test_file_another.fpsx ATS3Drop\sis\another_test_file_matti_install.sis diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/broom/build.xml --- a/buildframework/helium/tests/minibuilds/broom/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/broom/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,7 +22,7 @@ --> - + @@ -32,16 +32,16 @@ - + - - - - - - - - + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/compile/archive.cfg.xml --- a/buildframework/helium/tests/minibuilds/compile/archive.cfg.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/compile/archive.cfg.xml Mon Sep 13 13:11:19 2010 +0800 @@ -32,22 +32,22 @@ - - - - - - + + + + + + - + - + @@ -64,7 +64,7 @@ - + @@ -72,7 +72,7 @@ - - + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/compile/build.xml --- a/buildframework/helium/tests/minibuilds/compile/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/compile/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -1,7 +1,7 @@ - - + + - + - - + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - + + - - + + - - + + - + - - + + - + - - - - - - - - - - - + + + + + + + + + + + doc: xml(${helium.build.dir}/temp/test_minibuild.xml) database: xml(${database.file}) - - - + + + The summary of Ant code coverage: ${ant.coverage.summary} - - + + doc: xml(${helium.build.dir}/temp/test_minibuild.xml) database: xml(${database.file}) - - - + + + @@ -117,27 +117,27 @@ - - - + + + - - - - - - - + + + + + + + - - - - - - - - - + + - - - - - - - - - - - Data sent to Diamonds: + + + + + + + + + + Data sent to Diamonds: ${diamonds.log.start} - - - - - - - - - - Data returned from Diamonds: + + + + + + + + + + Data returned from Diamonds: ${diamonds.log.start.output} - ${diamonds.log.start} - - - - - - - + + + + + - + - - + + @@ -238,8 +238,8 @@ - - + + @@ -247,8 +247,8 @@ - - + + @@ -257,14 +257,14 @@ - + - + @@ -288,7 +288,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -324,7 +324,7 @@ --> - + '${arm.compiler.version}' diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/compile/common.sbsinput.ant.xml --- a/buildframework/helium/tests/minibuilds/compile/common.sbsinput.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/compile/common.sbsinput.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -51,7 +51,6 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/compile/minibuild_compile.sysdef.xml --- a/buildframework/helium/tests/minibuilds/compile/minibuild_compile.sysdef.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/compile/minibuild_compile.sysdef.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,15 +22,15 @@ --> - - - - - - - - - + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/compile/template_release_metadata.xml --- a/buildframework/helium/tests/minibuilds/compile/template_release_metadata.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/compile/template_release_metadata.xml Mon Sep 13 13:11:19 2010 +0800 @@ -31,16 +31,16 @@ - - - + + + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/diamonds/build.xml --- a/buildframework/helium/tests/minibuilds/diamonds/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/diamonds/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,10 +20,10 @@ ============================================================================ --> - + - + @@ -36,8 +36,8 @@ - - + + @@ -51,6 +51,6 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.sbsinput.ant.xml --- a/buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.sbsinput.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.sbsinput.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -60,15 +60,13 @@ - - - + - + @@ -80,7 +78,7 @@ - + @@ -88,7 +86,7 @@ - + @@ -101,7 +99,7 @@ - + @@ -109,7 +107,7 @@ - + @@ -131,7 +129,7 @@ - + @@ -139,8 +137,8 @@ - - + + @@ -152,7 +150,6 @@ - @@ -160,7 +157,6 @@ - @@ -177,7 +173,6 @@ - @@ -185,7 +180,6 @@ - @@ -202,7 +196,6 @@ - @@ -210,7 +203,6 @@ - @@ -227,7 +219,6 @@ - @@ -235,7 +226,6 @@ - @@ -243,7 +233,6 @@ - @@ -251,7 +240,6 @@ - @@ -268,7 +256,6 @@ - @@ -276,7 +263,6 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.xml --- a/buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs-coverity/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,31 +20,39 @@ ============================================================================ --> - + - - - - - - + + + + + + - + + + + + + - - + + + + + - + - - - + + + '${arm.compiler.version}' @@ -58,9 +66,9 @@ - + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs-coverity/common.sbsinput.ant.xml --- a/buildframework/helium/tests/minibuilds/ido-sbs-coverity/common.sbsinput.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs-coverity/common.sbsinput.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -51,7 +51,6 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs-coverity/delivery.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/minibuilds/ido-sbs-coverity/delivery.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs-coverity/hlm.bat --- a/buildframework/helium/tests/minibuilds/ido-sbs-coverity/hlm.bat Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs-coverity/hlm.bat Mon Sep 13 13:11:19 2010 +0800 @@ -17,10 +17,8 @@ rem setlocal -if exist "E:\APPS\sbs" ( -set SBS_HOME=E:\APPS\sbs -set PATH=%SBS_HOME%\bin;%PATH% -) + echo Using Raptor from: %SBS_HOME% ..\..\..\hlm.bat %* + endlocal diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs-sysdef3/build.xml --- a/buildframework/helium/tests/minibuilds/ido-sbs-sysdef3/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs-sysdef3/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,20 +22,20 @@ --> - - - - - - + + + + + + - + - - + + @@ -45,7 +45,7 @@ - + @@ -53,17 +53,17 @@ - + - + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs/build.xml --- a/buildframework/helium/tests/minibuilds/ido-sbs/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,10 +22,10 @@ --> - - - - + + + + @@ -36,14 +36,14 @@ - - + + - + - + @@ -53,17 +53,17 @@ - - + + '${arm.compiler.version}' - + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido-sbs/hlm.bat --- a/buildframework/helium/tests/minibuilds/ido-sbs/hlm.bat Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido-sbs/hlm.bat Mon Sep 13 13:11:19 2010 +0800 @@ -17,10 +17,8 @@ rem setlocal -if exist "E:\APPS\sbs" ( -set SBS_HOME=E:\APPS\sbs -set PATH=%SBS_HOME%\bin;%PATH% -) + echo Using Raptor from: %SBS_HOME% ..\..\..\hlm.bat %* + endlocal diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido/build.xml --- a/buildframework/helium/tests/minibuilds/ido/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,7 @@ ============================================================================ --> - + @@ -28,21 +28,20 @@ - + + + + - - - - @@ -60,8 +59,8 @@ - - + + @@ -78,7 +77,7 @@ - + @@ -88,25 +87,27 @@ - - + minibuild-check, + run-hack, + blocks-create-bundles, + final" /> - - - - - + + + + + - + @@ -129,8 +130,12 @@ - - + + @@ -163,7 +168,7 @@ - + @@ -180,7 +185,7 @@ - + '${arm.compiler.version}' @@ -207,8 +212,6 @@ - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido/config/delivery.xml --- a/buildframework/helium/tests/minibuilds/ido/config/delivery.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido/config/delivery.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,9 +26,9 @@ - - - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido/config/stages_config.ant.xml --- a/buildframework/helium/tests/minibuilds/ido/config/stages_config.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido/config/stages_config.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -29,7 +29,6 @@ - @@ -39,6 +38,4 @@ - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido/hack-test.ant.xml --- a/buildframework/helium/tests/minibuilds/ido/hack-test.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido/hack-test.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,57 +22,57 @@ --> - - - - + + + + - - - - - - - + + + + + + + - - + + - + - - - - - - - + + + + + + + - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/ido/sysdefs/minibuild_ido.sysdef.xml --- a/buildframework/helium/tests/minibuilds/ido/sysdefs/minibuild_ido.sysdef.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/ido/sysdefs/minibuild_ido.sysdef.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,11 +22,11 @@ --> - - - - - + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/imaker/build.xml --- a/buildframework/helium/tests/minibuilds/imaker/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/imaker/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -24,7 +24,7 @@ - + @@ -57,28 +57,29 @@ - + - - + minibuild-check, + final"/> - - + + - + @@ -92,33 +93,33 @@ The summary of Ant code coverage: ${ant.coverage.summary} - - - doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) + + + doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) database: xml(${database.file}) - - + + - + - - - + + + - + - + @@ -126,22 +127,22 @@ - - - - + + + + - + ${diamonds.log.start} ${diamonds.log.start.output} - + - + @@ -155,18 +156,18 @@ - + - - + + - + - - + + @@ -201,7 +202,7 @@ - + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/build.xml --- a/buildframework/helium/tests/minibuilds/linux-build/ido/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -21,186 +21,192 @@ ============================================================================ --> - - - + + + - - + + - - - - - - + + + + + + + - - - - + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + + + - - + minibuild-cleanup, + ido-build, + check-diamonds, + minibuild-check, + run-hack, + final" /> - - + + - - - - - - - + + + + + + + doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) database: xml(${database.file}) - - - + + + The summary of Ant code coverage: ${ant.coverage.summary} - - - doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) + + + doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) database: xml(${database.file}) - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - - - - - + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - '${arm.compiler.version}' - + + + + '${arm.compiler.version}' + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - - - + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/config/build.sbsinput.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/config/build.sbsinput.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,275 @@ + + + + + ido sbs input + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/config/common.sbsinput.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/config/common.sbsinput.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,184 @@ + + + + + Common sbs input config. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/config/delivery.xml --- a/buildframework/helium/tests/minibuilds/linux-build/ido/config/delivery.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/config/delivery.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,17 +26,15 @@ - - - - - - + + + - + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/config/stages_config.ant.xml --- a/buildframework/helium/tests/minibuilds/linux-build/ido/config/stages_config.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/config/stages_config.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -29,7 +29,6 @@ - @@ -39,6 +38,5 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/hack-test.ant.xml --- a/buildframework/helium/tests/minibuilds/linux-build/ido/hack-test.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/hack-test.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,57 +22,57 @@ --> - - - - + + + + - - - - - - - + + + + + + + - - + + - + - - - - - - - + + + + + + + - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/sysdefs/minibuild_ido.sysdef.xml --- a/buildframework/helium/tests/minibuilds/linux-build/ido/sysdefs/minibuild_ido.sysdef.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/sysdefs/minibuild_ido.sysdef.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,13 +20,13 @@ ============================================================================ --> - + - - - - - + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/linux-build/ido/sysdefs/sysdef_1_4_0.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tests/minibuilds/linux-build/ido/sysdefs/sysdef_1_4_0.dtd Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/prep-wa-synergy71/build.xml --- a/buildframework/helium/tests/minibuilds/prep-wa-synergy71/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/prep-wa-synergy71/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -22,10 +22,10 @@ --> - - - - + + + + @@ -34,59 +34,59 @@ - + - + - - + + - + - - - + + + - - - - - - + + + + + + doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) database: xml(${database.file}) - - - + + + The summary of Ant code coverage: ${ant.coverage.summary} - - - doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) + + + doc: xml(${helium.build.dir}/temp/test.minibuild-ido.xml) database: xml(${database.file}) - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tests/minibuilds/qt/build.xml --- a/buildframework/helium/tests/minibuilds/qt/build.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tests/minibuilds/qt/build.xml Mon Sep 13 13:11:19 2010 +0800 @@ -20,7 +20,7 @@ ============================================================================ --> - + @@ -60,20 +60,20 @@ - - + + - - + + - + @@ -95,7 +95,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -185,7 +185,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/common/common.ant.xml --- a/buildframework/helium/tools/common/common.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/common/common.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -67,7 +67,15 @@ - + + +Java properties +--------------- + + - - - - - - - - + @@ -362,26 +363,27 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -391,9 +393,9 @@ - + @@ -448,6 +450,14 @@ + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/common/common.antlib.xml --- a/buildframework/helium/tools/common/common.antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/common/common.antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -62,17 +62,18 @@ + ]]> @@ -91,47 +92,50 @@ - + confTool.execute(varSet,project); + } + catch (BuildException e) { + self.log("Error: " + e); + //self.log("Tool Argument Validation failure"); + throw e; + } +} + ]]> - + - +import com.nokia.helium.core.ant.types.VariableImpl; + +conETool = ToolsProcess.getTool("ConE"); +vars = elements.get("arg"); +for (i = 0; i < vars.size(); ++i) { + var = (VariableImpl)vars.get(i); + conETool.storeVariables(var.getName(), var.getValue()); +} +conETool.execute(project); + ]]> @@ -140,14 +144,15 @@ - + ]]> @@ -180,16 +186,17 @@ @@ -474,47 +481,36 @@ - - + database="${metadata.dbfile}" property="signal.errors.total"/> - + - - - - - - signal.log.dir = ${signal.log.dir} - - - - - - + file="@{logfile}" /> + - + + + - - - + @@ -621,4 +617,122 @@ ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/common/default_config.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/common/default_config.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,594 @@ + + + + + Default Helium configuration. + + + + + + + + + + ant: antProperties() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Using build drive ${build.drive} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reading from existing build number property file. + + Build int = ${build.int} + + + + + + + + + + + History comments: +${build.int.db.file.comments} + + + Writing incremented build int back to file. + + + + + + + +${build.int.db.file.comments} +# history: ${env.COMPUTERNAME};${env.USERNAME};${build.int.db.file.tstamp};${build.int} + + + + Build number property file not found. Creating a new one. + + + + Build number = ${build.number} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/common/docs.ant.xml --- a/buildframework/helium/tools/common/docs.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/common/docs.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -44,6 +44,13 @@ --> + + + + @@ -80,6 +87,19 @@ + + + + + + + + + + + - @@ -166,6 +186,7 @@ ant: antProperties() project: antProject() + doc: xml(${public.database.file}) @@ -282,7 +303,7 @@ - + Building docs into ${doc.build.dir}. @@ -292,6 +313,7 @@ + @@ -323,8 +345,6 @@ --> - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/common/helium_docs.ant.xml --- a/buildframework/helium/tools/common/helium_docs.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/common/helium_docs.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -42,68 +42,7 @@ - - - - - - - - - - - - - - - - - - - - - doc: xml(${doc.build.dir}/ivy/tool-dependencies-ido.xml) - - - - - - - - - - - - - - - - - - - - - - - - - Python modules path: ${epydoc.python.modules.path} - - - - - - - - - + + @@ -170,7 +110,7 @@ import helium.documentation old_db_file = urllib.urlopen(r'${last.major.release.database.url}') -writer = helium.documentation.APIDeltaWriter(old_db_file, r'${database.file}') +writer = helium.documentation.APIDeltaWriter(old_db_file.read(), open(r'${database.file}').read()) writer.write(r'${doc.build.dir}/api_changes.xml') @@ -386,7 +326,7 @@ - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -for line in open(r'${helium.build.dir}/coverage/report/line_coverage.txt'): - if 'TOTAL' in line and ' 0%' in line: - raise Exception('Coverage at 0%') - - - - - - - - - @@ -128,7 +39,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/cmaker.ant.xml --- a/buildframework/helium/tools/compile/cmaker.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/cmaker.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,6 +26,28 @@ cMaker support. + + + + + + + + + + + + + + - + + - + @@ -129,13 +160,14 @@ - + - + + - + @@ -145,13 +177,14 @@ - + - + + - + @@ -161,13 +194,14 @@ - + - + + - + @@ -196,13 +230,14 @@ - + - + + - + @@ -210,5 +245,7 @@ + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/compile.ant.xml --- a/buildframework/helium/tools/compile/compile.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/compile.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -34,7 +34,48 @@ @editable required @scope public --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,7 +157,7 @@ - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -167,6 +300,7 @@ + + + + @@ -220,7 +357,7 @@ - + @@ -302,7 +439,7 @@ - + @@ -329,7 +466,7 @@ Only generate the log.xml if we want the results to be included in the final results or get them used by the signaling mechanism. --> - + @@ -337,7 +474,7 @@ - @@ -374,70 +511,6 @@ - - - - 1 and self.component != None and attrs.get('priority', None) != None: - if attrs.get('priority') in self.components[self.component]: - self.components[self.component][attrs.get('priority')] += 1 - - def endElement(self, name): - if name == 'log': - self.scanLog = False - self.level = 0 - self.component = None - elif name == 'task': - self.level = self.level - 1 - - -parser = make_parser() -diamondsSummary = DiamondsSummary() -parser.setContentHandler(diamondsSummary) -parser.parse(open(str(project.getProperty('build.summary.file')))) - -output = '\n\n' -output += '\n' -for name in diamondsSummary.components: - xname = quoteattr(name) - output += '\n' % (xname, diamondsSummary.components[name]['error'], diamondsSummary.components[name]['critical'], diamondsSummary.components[name]['warning']) - #print name + " ==> %d" % diamondsSummary.components[name]['error'] -output += '\n' -output += '\n' % (diamondsSummary.total['error'], diamondsSummary.total['critical'], diamondsSummary.total['warning']) -output += '\n' -self.log(str("Writing %s" % str(attributes.get('output')))) -f = open(str(attributes.get('output')), 'w+') -f.write(output) - ]]> - @@ -511,4 +584,6 @@ + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/compile.antlib.xml --- a/buildframework/helium/tools/compile/compile.antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/compile.antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -46,9 +46,13 @@ - - - + + + + + + + @@ -71,20 +75,9 @@ - - - - - - - - - + Errors after compile-main: ${build.errors.total} @@ -243,75 +236,82 @@ - self.setTaskName("emake"); - // check attributes - if (attributes.get("name") == null) - throw new org.apache.tools.ant.BuildException("name attribute is not defined"); - self.log("Name: " + attributes.get("name")); - if (attributes.get("makefile") == null) - throw new org.apache.tools.ant.BuildException("makefile attribute is not defined"); - self.log("Makefile: " + attributes.get("makefile")); - String target = "all"; - String custom = ""; - String annofileDir = ""; - if (attributes.get("target") != null) - target = attributes.get("target"); - self.log("Target: " + target); - if (attributes.get("custom") != null) - custom = attributes.get("custom"); - if (attributes.get("root") != null) - root = attributes.get("root"); - else - root = ""; - - self.log("Custom: " + custom); +self.setTaskName("emake"); +// check attributes +if (attributes.get("name") == null) { + throw new org.apache.tools.ant.BuildException("name attribute is not defined"); +} +self.log("Name: " + attributes.get("name")); +if (attributes.get("makefile") == null) { + throw new org.apache.tools.ant.BuildException("makefile attribute is not defined"); +} +self.log("Makefile: " + attributes.get("makefile")); +String target = "all"; +String custom = ""; +String annofileDir = ""; +if (attributes.get("target") != null) { + target = attributes.get("target"); +} +self.log("Target: " + target); +if (attributes.get("custom") != null) { + custom = attributes.get("custom"); +} +if (attributes.get("root") != null) { + root = attributes.get("root"); +} +else { + root = ""; +} + +self.log("Custom: " + custom); - // Create and configure exec target - org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask(); - task.setProject(self.getProject()); - task.setTaskName(self.getTaskName()); - String emake = com.nokia.ant.util.Helper.getProperty(project, "ec.emake"); - task.setExecutable(emake); - if (attributes.get("failonerror") != null) { - task.setFailonerror(Boolean.parseBoolean(attributes.get("failonerror"))); - } else { - task.setFailonerror(true); - } - String buildDrive = com.nokia.ant.util.Helper.getProperty(project, "build.drive"); - task.setDir(new java.io.File(buildDrive + "/")); - if (attributes.get("log") != null) { - self.log("Log: " + attributes.get("log")); - task.setOutput(new java.io.File(attributes.get("log"))); - } - if (attributes.get("dir") != null) { - self.log("dir: " + attributes.get("dir")); - task.setDir(new java.io.File(attributes.get("dir"))); - } - String buildId = com.nokia.ant.util.Helper.getProperty(project, "build.id"); - task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name")); - String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class"); - task.createArg().setValue("--emake-class=" + eclass); - String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT"); - String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); - if (attributes.get("root") != null) { - self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root); - } - task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root); - if (attributes.get("phase") != null) { - annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase"); - } - else { - annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir"); - } - if (attributes.get("annodetail") != null) { - task.createArg().setValue("--emake-annodetail=" + attributes.get("annodetail")); - task.createArg().setValue("--emake-annofile=" + annofileDir + "/" + buildId + "-" + attributes.get("name") + ".emake.anno.xml"); - } - task.createArg().setLine(custom); - task.createArg().setLine("-f " + attributes.get("makefile")); - task.createArg().setLine(target); - // Execute. - task.execute(); +// Create and configure exec target +org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask(); +task.setProject(self.getProject()); +task.setTaskName(self.getTaskName()); +String emake = com.nokia.ant.util.Helper.getProperty(project, "ec.emake"); +task.setExecutable(emake); +if (attributes.get("failonerror") != null) { + task.setFailonerror(Boolean.parseBoolean(attributes.get("failonerror"))); +} +else { + task.setFailonerror(true); +} +String buildDrive = com.nokia.ant.util.Helper.getProperty(project, "build.drive"); +task.setDir(new java.io.File(buildDrive + "/")); +if (attributes.get("log") != null) { + self.log("Log: " + attributes.get("log")); + task.setOutput(new java.io.File(attributes.get("log"))); +} +if (attributes.get("dir") != null) { + self.log("dir: " + attributes.get("dir")); + task.setDir(new java.io.File(attributes.get("dir"))); +} +String buildId = com.nokia.ant.util.Helper.getProperty(project, "build.id"); +task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name")); +String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class"); +task.createArg().setValue("--emake-class=" + eclass); +String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT"); +String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); +if (attributes.get("root") != null) { + self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root); +} +task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root); +if (attributes.get("phase") != null) { + annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase"); +} +else { + annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir"); +} +if (attributes.get("annodetail") != null) { + task.createArg().setValue("--emake-annodetail=" + attributes.get("annodetail")); + task.createArg().setValue("--emake-annofile=" + annofileDir + "/" + buildId + "-" + attributes.get("name") + ".emake.anno.xml"); +} +task.createArg().setLine(custom); +task.createArg().setLine("-f " + attributes.get("makefile")); +task.createArg().setLine(target); + +task.execute(); @@ -325,21 +325,21 @@ - + ]]> - + ]]> diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/coverity.ant.xml --- a/buildframework/helium/tools/compile/coverity.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/coverity.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,17 +26,66 @@ - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + @@ -107,11 +169,6 @@ - - - - - @@ -147,8 +204,8 @@ - - + + @@ -157,30 +214,41 @@ - + + + + + + + + + + + + + + Coverity command errors: ${coverity.error.total} + + - - - + + - - - - + - - - - - + - - + - - + - - + - - @@ -244,7 +305,7 @@ - + @@ -278,7 +339,6 @@ - @@ -309,5 +369,44 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/ec/ec.ant.xml --- a/buildframework/helium/tools/compile/ec/ec.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/ec/ec.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -79,7 +79,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/qt/antunit/test_qt.ant.xml --- a/buildframework/helium/tools/compile/qt/antunit/test_qt.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/qt/antunit/test_qt.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -89,15 +89,17 @@ - - + + - - + + + + @@ -117,15 +119,17 @@ - - + + - - + + + + @@ -135,7 +139,7 @@ - + @@ -145,11 +149,11 @@ - - + + - - + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/qt/qt.ant.xml --- a/buildframework/helium/tools/compile/qt/qt.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/qt/qt.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -46,80 +46,102 @@ + + + + + + + - + + - + - - - - - - + - - - data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml) - ant: antProperties() - - - - - - + + + + + + + + + + + + + + + + + + + + + + data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml) + ant: antProperties() + + + + + - - - - - - data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml) - ant: antProperties() - - - - - - - - - - - - - - - - - - - - - - - - - + - Skipping qmake step, because qmake.enabled is not set to true. + + + data: xml(${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}.xml) + ant: antProperties() + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/qt/templates/run-qmake.ant.xml.ftl --- a/buildframework/helium/tools/compile/qt/templates/run-qmake.ant.xml.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/qt/templates/run-qmake.ant.xml.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -30,12 +30,13 @@ <#if unit.@proFile[0]??> <#assign prefix="" /> + <#assign bldinf="${r'$'}{build.drive}/${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')> - Running qmake for ${unit.@bldFile}/${unit['@${prefix}proFile'][0]?xml} + Running qmake for ${bldinf}/${unit['@${prefix}proFile'][0]?xml} - + - + @@ -46,8 +47,8 @@ - - + + <#if unit['@${prefix}qmakeArgs'][0]??> @@ -58,7 +59,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/qt/templates/run-qmake.mk.ftl --- a/buildframework/helium/tools/compile/qt/templates/run-qmake.mk.ftl Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/qt/templates/run-qmake.mk.ftl Mon Sep 13 13:11:19 2010 +0800 @@ -31,12 +31,14 @@ <#if unit.@proFile[0]??> <#assign prefix="" /> + <#assign bldinf="${ant['build.drive']}/${unit.@bldFile}"?replace('\\', '/')?replace('//', '/')> + ########################################################################## -/${unit.@bldFile}/bld.inf: /${unit.@bldFile}/${unit['@${prefix}proFile'][0]} - @echo cd /${unit.@bldFile} ^&^& qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']}<#if "${ant['build.system']?lower_case}" = 'sbs-ec'> -spec symbian-sbsv2 ${unit['@${prefix}proFile'][0]} - -@cd /${unit.@bldFile} && qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']} ${unit['@${prefix}proFile'][0]} +${bldinf}/bld.inf: ${bldinf}/${unit['@${prefix}proFile'][0]} + @echo cd ${bldinf} ^&^& qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']}<#if "${ant['build.system']?lower_case}" = 'sbs-ec'> -spec symbian-sbsv2 ${unit['@${prefix}proFile'][0]} + -@cd ${bldinf} && qmake -listgen <#if unit['@${prefix}qmakeArgs'][0]??>${unit['@${prefix}qmakeArgs'][0]}<#else>${ant['qt.qmake.default.args']} ${unit['@${prefix}proFile'][0]} -all:: /${unit.@bldFile}/bld.inf +all:: ${bldinf}/bld.inf diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/sbs/sbs.ant.xml --- a/buildframework/helium/tools/compile/sbs/sbs.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/sbs/sbs.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -27,23 +27,33 @@ - + + - - + This property enables Raptor compilation using ctc. - deprecated: Start using sbs.ctc.enabled property. + @type boolean + @editable required + @scope public + @deprecated since 11.0 + --> + + + + + + + @@ -63,15 +80,15 @@ - - + + - + @@ -97,226 +114,270 @@ - - - - + + + + + + + + + + + + + - - - - + - - - - - + - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - + + + - + - - + - - - - - - - - - - - - + + + + - + - - - - - - - + + + - + - - + + + + + + + + + + + + - - - - - macro: ${helium.dir}/tools/common/templates/macro - - - dbPath: ${metadata.dbfile} - logfilename: @{sbs.log.file} - ant: antProperties() - - - - - - - - - - - - - - - - - - - - - + + + macro: ${helium.dir}/tools/common/templates/macro + + + dbPath: ${metadata.dbfile} + logfilename: @{sbsLogFile} + ant: antProperties() + + + + + + + + + + + + + + + + + + + + + + + + + + + Could not find the sbs log: @{sbsLogFile}. + + + + + - - -if attributes.get("property") is None: - raise Exception("property attribute has not been set.") -if project.getProperty(attributes.get("property")) is None: - import symbian.raptor - sbs_home = symbian.raptor.getSBSHome() - if sbs_home is not None: - #self.log("Found SBS_HOME as " + sbs_home) - project.setNewProperty(attributes.get("property"), sbs_home) - + - \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/compile/sis.ant.xml --- a/buildframework/helium/tools/compile/sis.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/compile/sis.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -66,7 +66,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/localisation/localisation-50.ant.xml --- a/buildframework/helium/tools/localisation/localisation-50.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/localisation/localisation-50.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -68,7 +68,7 @@ --> - + @@ -80,7 +80,7 @@ This target launch the switch_loc_generator (for 5.0 build only). --> - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/logging/logging.ant.xml --- a/buildframework/helium/tools/logging/logging.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/logging/logging.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -23,10 +23,9 @@ - Targets related to log parsing, rendaring, upload to diamonds etc. + Targets related to log parsing, rendering, upload to diamonds etc. - - @@ -117,7 +115,6 @@ - End of filtering @{log} for passwords @@ -221,7 +218,7 @@ - + @@ -305,7 +302,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/logging/test/test_logging.ant.xml --- a/buildframework/helium/tools/logging/test/test_logging.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/logging/test/test_logging.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -97,13 +97,17 @@ - + + + - + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/logging/test/test_summary_log.ant.xml --- a/buildframework/helium/tools/logging/test/test_summary_log.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/logging/test/test_summary_log.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -45,7 +45,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/metadata/metadata.ant.xml --- a/buildframework/helium/tools/metadata/metadata.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/metadata/metadata.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -33,8 +33,10 @@ + + + outputfile="@{output-dir}/${generate.build.status.file.basename}.status.xml"> macro: ${helium.dir}/tools/common/templates/macro @@ -45,7 +47,7 @@ + outputfile="@{output-dir}/${generate.build.status.file.basename}.status.html"> macro: ${helium.dir}/tools/common/templates/macro @@ -55,8 +57,8 @@ ant: antProperties() - - + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/bom/bom.ant.xml --- a/buildframework/helium/tools/preparation/bom/bom.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/bom/bom.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -31,11 +31,26 @@ --> + + - + + + + + import os @@ -49,7 +64,7 @@ session = None try: - runccm = ant.get_property(r'${run.ccm}') + runccm = ant.get_property(r'${ccm.enabled}') database = ant.get_property(r'${ccm.database}') username = ant.get_property(r'${ccm.user.login}') password = ant.get_property(r'${ccm.user.password}') @@ -81,7 +96,7 @@ ccmproject = ccm.extra.get_toplevel_project(session, waroot) - config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml"} + config_data = {'delivery': deliveryfile, 'prep.xml': ant.get_property(r'${prep.config.file.parsed}'), 'build.id': buildid, 'ccm.database': database, 'symbian_rel_week': ant.get_property(r'${symbian.version.week}'), 'symbian_rel_ver': ant.get_property(r'${symbian.version}'), 'symbian_rel_year': ant.get_property(r'${symbian.version.year}'), 's60_version': ant.get_property(r'${s60.version}'), 's60_release': ant.get_property(r'${s60.release}'), 'currentRelease.xml': ant.get_property(r'${build.drive}') + "/currentRelease.xml", 'release_regexp': ant.get_property(r'${bom.release.regex}') } config = configuration.Configuration(config_data) # let's only support the new spec model! diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/ci.ant.xml --- a/buildframework/helium/tools/preparation/ci.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/ci.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -97,10 +97,13 @@ ctime_dict = {} root_dir = str(attributes.get('rootdir')) output_dir = str(attributes.get('outputdir')) -for dir_ in os.listdir(root_dir): - if (os.path.isdir(os.path.join(root_dir, dir_))): - dir_ctime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(os.path.getctime(os.path.join(root_dir, dir_)))) - ctime_dict[dir_ctime] = dir_ +if os.path.exists(root_dir): + for dir_ in os.listdir(root_dir): + if (os.path.isdir(os.path.join(root_dir, dir_))): + dir_ctime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(os.path.getctime(os.path.join(root_dir, dir_)))) + ctime_dict[dir_ctime] = dir_ +else: + self.log("Skipping " + root_dir + " dir because it doesn't exist.") ctime_list = ctime_dict.keys() ctime_list.sort() self.log(str("ctime_list: %s" % ctime_list)) @@ -148,11 +151,18 @@ databases = [] delivery = str(attributes.get('delivery')) sessionFile = str(attributes.get('sessionfile')) +engine = project.getProperty('ccm.engine.host') +dbpath = project.getProperty('ccm.database.path') + configBuilder = configuration.NestedConfigurationBuilder(open(delivery, 'r')) configSet = configBuilder.getConfiguration() -for config in configSet.getConfigurations(): - if config['database'] not in databases: - databases.append(config['database']) + +if dbpath: + databases.append(dbpath) +else: + for config in configSet.getConfigurations(): + if config['database'] not in databases: + databases.append(config['database']) config = configuration.PropertiesConfiguration() if os.path.exists(sessionFile): @@ -175,7 +185,7 @@ if update_session: try: self.log(str("Opening a new session for %s..." % database)) - session = nokia.nokiaccm.open_session(database=database) + session = nokia.nokiaccm.open_session(database=database, engine=engine, dbpath=dbpath) session.close_on_exit = False config[database] = session.addr() except Exception, exc: @@ -290,7 +300,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/ido-prep.ant.xml --- a/buildframework/helium/tools/preparation/ido-prep.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/ido-prep.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -65,14 +65,131 @@ --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -121,62 +238,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - confml.log.file = ${confml.log.file} - - - - - - - - confml.file = @{confml.file} - - - - - - - - - - - - - - - - - - - - - - + + + + + dbPath: ${metadata.dbfile} + ant: antProperties() + os: eval('System.getProperty("os.name")') + + + @@ -194,20 +266,55 @@ - + ConE error: ${cone.error.total} - + - + + + + + + + + dbPath: ${metadata.dbfile} + ant: antProperties() + os: eval('System.getProperty("os.name")') + + + + + + + + + + + + + + + + + + + + + + + ConE error: ${confml.validate.error.total} + + + + + + - @@ -216,7 +323,7 @@ It relies on the fact that layer_real_source_path entity is declared in each ADO configuration. By default it deletes the previous content. If you want to backup what was previoulsy used please - defined '''ido.keep.old''' property. + defined '''keep.old.source.enabled''' property. --> @@ -268,31 +375,21 @@ - + - - + + - - - - - - - - - - + + - + + @@ -375,7 +473,8 @@ the file scanner looking for CMT summary information which it extracts and writes to an XML file in the diamonds folder. --> - + + @@ -450,37 +549,37 @@ - + + + + + + - - - + + + + + + + + + + - + - - + + Location of the new S60 release:${s60.getenv.path} @@ -617,24 +737,27 @@ - if (attributes.get("ini") == null) - throw new org.apache.tools.ant.BuildException("ini is not defined"); - if (attributes.get("pathid") == null) - throw new org.apache.tools.ant.BuildException("pathid is not defined"); - try { - java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini")); - java.util.Properties props = new java.util.Properties(); - props.load(pin); - org.apache.tools.ant.types.Path path = project.createDataType("path"); - for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { - org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement(); - pe.setPath(i.next()); - } - self.log("Creating reference: " + attributes.get("pathid")); - project.addReference(attributes.get("pathid"), path); - } catch (java.io.IOException e) { - throw new org.apache.tools.ant.BuildException(e); - } +if (attributes.get("ini") == null) { + throw new org.apache.tools.ant.BuildException("ini is not defined"); +} +if (attributes.get("pathid") == null) { + throw new org.apache.tools.ant.BuildException("pathid is not defined"); +} +try { + java.io.FileInputStream pin = new java.io.FileInputStream(attributes.get("ini")); + java.util.Properties props = new java.util.Properties(); + props.load(pin); + org.apache.tools.ant.types.Path path = project.createDataType("path"); + for (java.util.Iterator i = props.stringPropertyNames().iterator(); i.hasNext() ; ) { + org.apache.tools.ant.types.Path.PathElement pe = (org.apache.tools.ant.types.Path.PathElement)path.createPathElement(); + pe.setPath(i.next()); + } + self.log("Creating reference: " + attributes.get("pathid")); + project.addReference(attributes.get("pathid"), path); +} +catch (java.io.IOException e) { + throw new org.apache.tools.ant.BuildException(e); +} diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/ivy/dependencies.ant.xml --- a/buildframework/helium/tools/preparation/ivy/dependencies.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/ivy/dependencies.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -31,16 +31,8 @@ - - - - - - - @@ -51,7 +43,6 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/password.ant.xml --- a/buildframework/helium/tools/preparation/password.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/password.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -106,13 +106,13 @@ - + - + @@ -124,96 +124,84 @@ - ccm.user.password it requires ccm.database to be set to the wanted database and ccm.enabled to set to 'true'. --> - + + - + + + + + + - - - - - - - - + + - - - - Error: Unable to read synergy username and password from .netrc file. - - - - - - - - - - - - - - - - - - - - + Error: Unable to read synergy username and password from .netrc file. + + - - + + - - + + + + - - - + + + + + + + + - + + + ccm.session.created = ${ccm.session.created} - + - - ccm.session.created = ${ccm.session.created} - - - - - - - - - - - - + + + + + + + - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/preparation.ant.xml --- a/buildframework/helium/tools/preparation/preparation.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/preparation.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -36,6 +36,79 @@ @type string --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -46,10 +119,7 @@ - + @@ -310,6 +380,7 @@ + @@ -352,7 +423,10 @@ - + + + + @@ -440,18 +514,24 @@ - + + + + + + + + + + + - - + @@ -467,22 +547,6 @@ - - - - - - - - - - - - + - + @@ -538,7 +603,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/preparation.antlib.xml --- a/buildframework/helium/tools/preparation/preparation.antlib.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/preparation.antlib.xml Mon Sep 13 13:11:19 2010 +0800 @@ -28,7 +28,7 @@ the output directory. 'threads' defines how many copy you would like in parallel, and verbose defines if you want the copying to be logged. --> - + @@ -56,11 +56,12 @@ } } if (attributes.get("verbose") != null) { - verbose = attributes.get("verbose"); + verbose = attributes.get("verbose"); } if (attributes.get("overwrite") != null) { - overwrite = attributes.get("overwrite"); + overwrite = attributes.get("overwrite"); } + // Creating the output dir Mkdir mkdir = new Mkdir(); mkdir.setProject(project); @@ -86,13 +87,13 @@ copy.setVerbose(new Boolean(verbose).booleanValue()); copy.setOverwrite(new Boolean(overwrite).booleanValue()); pt.addTask(copy); - } + } } } self.log("Starting parallel copying..."); pt.execute(); self.log("Copying completed."); -]]> + ]]> - + @@ -110,7 +110,7 @@ This target will cleanup all snapshoted/checkout project from the disk. Checked out project will also be deleted from the synergy database. --> - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/test/test_preparation.ant.xml --- a/buildframework/helium/tools/preparation/test/test_preparation.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/test/test_preparation.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -154,7 +154,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/test/test_synergy.ant.xml --- a/buildframework/helium/tools/preparation/test/test_synergy.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/test/test_synergy.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -93,7 +93,7 @@ - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/preparation/test/test_synergyjavataks.ant.xml --- a/buildframework/helium/tools/preparation/test/test_synergyjavataks.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/preparation/test/test_synergyjavataks.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -47,7 +47,6 @@ - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/publish/nwiki.ant.xml --- a/buildframework/helium/tools/publish/nwiki.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/publish/nwiki.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -90,7 +90,8 @@ - nwiki.domain is typically nwiki.nokia.com - location could be, MBPVancouver for example --> - + + @@ -109,7 +110,8 @@ - nwiki.domain is typically nwiki.nokia.com - location could be, MBPVancouver for example --> - + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/publish/publish.ant.xml --- a/buildframework/helium/tools/publish/publish.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/publish/publish.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,6 +26,23 @@ Zipping, delta zipping and copying targets + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -135,6 +248,7 @@ + - + @@ -249,6 +370,7 @@ + @@ -391,48 +516,42 @@ - - - - - - - - - - - - - - - - - - - emake.root.to.append=${emake.root.to.append} - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + emake.root.to.append=${emake.root.to.append} + + + + + + + + + + + + + + + + + + import archive import configuration @@ -441,22 +560,10 @@ configs = configSet.getConfigurations(r'${zips.@{type}.spec.name}') prebuilder = archive.ArchivePreBuilder(configuration.ConfigurationSet(configs), r'${zips.@{type}.spec.name}') prebuilder.cleanupSubstDrives() - - - - - - - ERROR: ${exception} - - - - - - - - - + + + + @@ -497,6 +604,7 @@ + - + - + - + - + - + + - + - + - + - + @@ -630,7 +739,7 @@ - + @@ -643,34 +752,6 @@ - - - - - - - - -import sys, smtplib, string - -fromaddr = r'${email.from}' -toaddrs = r'${diamonds.mail}' -smtpserver = r'${email.smtp.server}' -subject = "[DIAMONDS_DATA] ${build.id}>>>${diamonds.host}>>>${diamonds.path}" -file = open(r'${diamonds.log.file}', 'r') -msg = file.read() -body = string.join(("From: %s" %fromaddr, "To: %s" %toaddrs, "Subject: %s" %subject, "", msg), "\r\n") -try: - server = smtplib.SMTP(smtpserver) - server.sendmail(fromaddr, toaddrs, body) - server.quit() - print "Mail sent to " , toaddrs -except Exception: - print "SMTP server " + smtpserver + " unavailable!! Unable to send log to " , toaddrs - - - - @@ -755,6 +836,7 @@ + @@ -829,7 +911,6 @@ - @@ -885,17 +966,19 @@ + - + + @@ -909,12 +992,14 @@ + + @@ -928,6 +1013,19 @@ + + + + + + + + + + + @@ -939,13 +1037,16 @@ + + - + + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/publish/synergy.ant.xml --- a/buildframework/helium/tools/publish/synergy.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/publish/synergy.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -25,28 +25,90 @@ Synergy publishing related targets - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + - - - - - macro: ${helium.dir}/tools/common/templates/macro - - - bom: xml(${build.log.dir}/${build.id}_bom.xml) - ant: antProperties() - - - - + + + + + + + + macro: ${helium.dir}/tools/common/templates/macro + + + bom: xml(${build.log.dir}/${build.id}_bom.xml) + ant: antProperties() + + + + + + + Skipped because file ${build.log.dir}/${build.id}_bom.xml not available. + + + + + - + @@ -69,6 +139,7 @@ + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/compatibility_analyser/ca_config_template.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/quality/compatibility_analyser/ca_config_template.txt Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,164 @@ +# +# Copyright (c) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: End-user Interface for Core Tools execution +# + +########## GUIDELINES +# +# - If any paths contain spaces, place them in "Quotes" +# - If some parameter is not to be used, it can be empty or completely removed +# from the config file + + +########## MANDATORY COMMON PARAMETERS +# +# Name for baseline file set +BASELINE_NAME='SDK 3rd Edition' + +# Root directory for files in baseline directory. It's a mandatory parameter. +BASELINE_SDK_DIR=C:\Symbian\9.2\S60_3rd_FP1_2 + +# S60 version of baseline set.It can be any of the following +# 3.0, 3.1, 3.2, 5.0, 9.1, 9.2,,10.1, S^1, S^2,S^3,S^4 (S^1, S^2,S^3,S^4 are for symbian 1,2,3,4 SDk versions respectively). +BASELINE_SDK_S60_VERSION=3.0 + +# Name for current file set +CURRENT_NAME=RnD SDK wk26 + +# Root directory for files in current directory. It's a mandatory parameter. +CURRENT_SDK_DIR=Y:\ + +# S60 version of current set.It can be any of the following +# 3.0, 3.1, 3.2, 5.0, 9.1, 9.2,,10.1, S^1, S^2,S^3,S^4 (S^1, S^2,S^3,S^4 are for symbian 1,2,3,4 SDk versions respectively). +CURRENT_SDK_S60_VERSION=3.1 + + +########## OPTIONAL COMMON PARAMETERS +# +# Defines the path for intermediate temporary files +# Uses system defined paths if empty +TEMP= + + +########## OPTIONAL HEADER ANALYSIS SPECIFIC PARAMETERS + +# Mark as 'true', if Public vs Rnd sdk or small no of headers ( count < 3000) analysis will be done. +# defaults to 'false' if not defined. Analysis time will be increased. +# When analysing large no of headers, multiple Thread logic needs to be disabled to avoid issues due to high memory consumption . +USE_THREAD= + +# Analyse any header directory, other than \epoc32\include. This will override +# the default SDK paths. Multiple names separated by ‘;’ can be input. If they +# are relative paths, BASELINE_SDK_DIR\epoc32\include and +# CURRENT_SDK_DIR\epoc32\include will be inserted at the begining. +BASELINE_HEADERS= +CURRENT_HEADERS= + +# Specifies the dependant header directories. Multiple names separated by ‘;’ +# can be input. If defined or not, default system defined inputs will be taken +# along with these always. If they are relative paths, +# BASELINE_SDK_DIR\epoc32\include and CURRENT_SDK_DIR\epoc32\include will be +# inserted at the begining. +BASELINE_SYSTEMINCLUDEDIR= +CURRENT_SYSTEMINCLUDEDIR= + +# Additional headers that have to be included for successful compilation of the +# header files. Multiple names separated by ‘;’ can be input. +BASELINE_FORCED_HEADERS= +CURRENT_FORCED_HEADERS= + +# Usage of platform data to resolve compile time dependency information, +# defaults to 'true' if not defined +USE_PLATFORM_DATA= + +# Recurse the directory hierarchy while scanning for files under verification, +# defaults to 'true' if not defined +RECURSIVE_HEADERS= + +# If the recursive scan is enabled, optionally exclude some subdirectories, +# defaults to be none if not defined. Multiple names separated by ‘;’ can +# be input. +EXCLUDE_DIR_HEADERS= + +# File pairs to be compared, if names change between base & current releases, +# Format, OLD:NEW, each such set is separated by ‘;’, defaults to none +REPLACE_HEADERS= + +# Report file for header analysis, report file created under reports directory +# with a default file name if not specified +REPORT_FILE_HEADERS=Y:/output/logs/BC/headers_report.xml + +# Similar as above, but this is the path of the filtered report file, otherwise +# the same file name is used +FILTER_FILE_HEADERS= + + +########## OPTIONAL LIBRARY ANALYSIS SPECIFIC PARAMETERS +# +# Type of the tool chain (GCC/GGCE/RVCT) which is used fetch information from the +# import libraries under analysis, defaults to GCCE if not specified +TOOLCHAIN= + +# Path to the tool chain mentioned above, path found automatically if not specified +TOOLCHAIN_PATH= + +# Target build directories of the import libraries (eg ARMV5/ARMV6). Defaults to +# ARMV5. Please note that WINSCW is not supported. Multiple names separated by +# ‘;’ can be input. +BASELINE_BUILDTARGET= +CURRENT_BUILDTARGET= + +# Analyse any other import library directory than from under \epoc32\release. +# This will override target builds mentioned above. Multiple names separated +# by ‘;’ can be input. If they are relative paths, +# BASELINE_SDK_DIR\epoc32\release and CURRENT_SDK_DIR\epoc32\release will be +# inserted at the begining. If any of these param is mentioned, corresponding +# dll path also needs to be mentioned. +BASELINE_IMPORTLIBRARIES= +CURRENT_IMPORTLIBRARIES= + +# Analyse any other dll directory than from under \epoc32\release. This will +# override target builds mentioned above. Multiple names separated by ‘;’ can +# be input. If they are relative paths, BASELINE_SDK_DIR\epoc32\release and +# CURRENT_SDK_DIR\epoc32\release will be inserted at the begining. If any of +# these param is mentioned,corresponding lib path is also needs to be mentioned. +BASELINE_IMPORTDLLS= +CURRENT_IMPORTDLLS= + +# Report file for library analysis, report file created under reports directory +# with a default file name if not specified +REPORT_FILE_LIBRARIES=Y:/output/logs/BC/libraries_report.xml + +# Similar as above, but this is the path of the filtered report file, otherwise +# the same file name is used +FILTER_FILE_LIBRARIES= + + +########## OPTIONAL REPORT FILTERING SPECIFIC PARAMETERS +# +# Report files to be filtered, multiple reports can be mentioned here separated +# by ';'. In addition, peport paths mentioned in headers, libraries section are +# also filtered +REPORT_FILE_FILTER= + +# Same as above, but specifies paths for filtered report files. There is a +# correspondance between report file above and the output file. If a report +# file does not have a corresponding Output file mentioned then it is filtered +# in-place. +OUTPUT_FILE_FILTER= + +# Defines paths for knownissues files separated by ';' which can be either local +# directory or a server path. Defaults to the default knownissues file +# delivered by the tool +ISSUES_FILE= diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/compatibility_analyser/compatibility.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/quality/compatibility_analyser/compatibility.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,194 @@ + + + + + Compatibility Analyser - BC (Binary Comparison) needs the property ca.enabled to + be set to true in order to run the targets bc-check and ca-generate-diamond-summary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/cone-validate.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/quality/cone-validate.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,95 @@ + + + + + + To validate confml configuration files. + + + + + + + + + + + + + + + + + + + + + + + ant: antProperties() + os: eval('System.getProperty("os.name")') + + + + + + + + + + + + + + + + + + + + + + + + ConE error: ${cone.validate.error.total} + + + + + + + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/conflict-checker.ant.xml --- a/buildframework/helium/tools/quality/conflict-checker.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/quality/conflict-checker.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -31,6 +31,16 @@ @scope private --> + + + + + + + + + + - - - - - - - - - + - + @@ -82,7 +80,7 @@ - + macro: ${helium.dir}/tools/common/templates/macro diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/lint.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/quality/lint.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/quality.ant.xml --- a/buildframework/helium/tools/quality/quality.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/quality/quality.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -25,9 +25,12 @@ Quality + + + \ No newline at end of file diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/quality/validate-policy.ant.xml --- a/buildframework/helium/tools/quality/validate-policy.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/quality/validate-policy.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -40,10 +40,35 @@ @type string --> - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -69,7 +130,7 @@
           
    +          ignoreroot="${internal.validate.policy.ignoreroot.enabled}">
               
           
         
    @@ -142,7 +203,7 @@ @@ -151,41 +212,31 @@ - +
    - - - - - - - - macro: ${helium.dir}/tools/common/templates/macro - - - doc: xml(${validate.policy.log}) - ant: antProperties() - - - - - macro: ${helium.dir}/tools/common/templates/macro - - - doc: xml(${validate.policy.log}) - ant: antProperties() - - - - - - - + + + macro: ${helium.dir}/tools/common/templates/macro + + + doc: xml(${validate.policy.log}) + ant: antProperties() + + + + + macro: ${helium.dir}/tools/common/templates/macro + + + doc: xml(${validate.policy.log}) + ant: antProperties() + + @@ -197,21 +248,12 @@
    - - - - - - - - - + + - + diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/release/release.ant.xml --- a/buildframework/helium/tools/release/release.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/release/release.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -69,6 +69,39 @@ @editable required @scope public --> + + + + + + + + + + + + + + + + + @@ -101,12 +134,15 @@ @editable required @scope public --> - - - + + + - + + import traceback import ant import logging @@ -230,9 +236,7 @@ traceback.print_exc() if session: session.close() - - -
    +
    - + - - - - + import amara @@ -314,17 +315,12 @@ - - - - - + + import ccm #check for ccm session leaks assert (len(ccm.running_sessions()) == 0) - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + @@ -154,10 +149,10 @@ - + - + @@ -178,13 +173,6 @@ - - - dbPath: ${metadata.dbfile} - ant: antProperties() - - diff -r 0e65f93be3cb -r ac0bbc1e5d79 buildframework/helium/tools/testing/ats/ats.ant.xml --- a/buildframework/helium/tools/testing/ats/ats.ant.xml Mon Sep 06 09:57:24 2010 +0100 +++ b/buildframework/helium/tools/testing/ats/ats.ant.xml Mon Sep 13 13:11:19 2010 +0800 @@ -26,18 +26,62 @@ ATS testing targets. - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -95,7 +336,10 @@ @scope public --> - + + + + @@ -107,11 +351,7 @@ --> - - - - - + - + + - + @@ -136,15 +377,7 @@ - - - - - - - - - + Error: ${toString:exception} @@ -154,12 +387,13 @@ - + - + + @@ -169,12 +403,13 @@ - + - + + @@ -184,11 +419,11 @@ - + - + @@ -204,78 +439,74 @@ - - - - - - - - + + + + + + version = r'${java.version}' if '1.6.0' in version: assert int(version.split('_')[1]) > 6, 'Java 6 u7 required' - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - + + + - + - ats.ctc.monsyms: ${ats.ctc.monsyms} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + ats.ctc.monsyms: ${ats.ctc.monsyms} - + - + @@ -702,7 +923,7 @@ - +