diff -r be27ed110b50 -r d8ac696cc51f buildframework/helium/tools/testing/ats/ats.ant.xml --- a/buildframework/helium/tools/testing/ats/ats.ant.xml Wed Oct 28 14:39:48 2009 +0000 +++ b/buildframework/helium/tools/testing/ats/ats.ant.xml Wed Dec 23 19:29:07 2009 +0200 @@ -21,7 +21,6 @@ ============================================================================ --> - ATS testing targets. @@ -35,96 +34,156 @@ - + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - + + - + - + - + - + + - + - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +version = r'${java.version}' +if '1.6.0' in version: + assert int(version.split('_')[1]) > 6, 'Java 6 u7 required' + + + + + + + + + + + + + + + + + + + + + + + + - - + + + @@ -137,19 +196,13 @@ + - - + - - - - - - - + @@ -160,12 +213,11 @@ - - + + - - - + + @@ -176,11 +228,7 @@ - - - - - + @@ -202,79 +250,27 @@ --> - - + +import traceback import os -import re -import sysdef.api -import pathaddition.match -import traceback -## using create-canonical-sysdef-file target, it works and gets tsrc paths - -if project.getProperty('canonical.sysdef.file') == None : - raise Exception("'canonical.sysdef.file' property is not defined") +import atsant +from com.nokia.ant.util import Helper -try: - sdf = sysdef.api.SystemDefinition(str(project.getProperty('canonical.sysdef.file'))) - - modules = {} - paths_list = [] - for la in sdf.layers: - if re.match(r".*_test_layer$", la): - try: - if re.search(r"\b%s\b" % la, project.getProperty('exclude.test.layers')): - continue - except TypeError, exp: - pass +canonicalsysdeffile = Helper.getProperty(project, 'canonical.sysdef.file') +modules = atsant.files_to_test(canonicalsysdeffile, project.getProperty('exclude.test.layers'), project.getProperty('ido.build.filter'), project.getProperty('build.drive')) - layer = sdf.layers[la] - for mod in layer.modules: - if mod.name not in modules: - modules[mod.name] = [] - for unit in mod.units: - include_unit = True - if project.getProperty('ido.build.filter') != None: - if project.getProperty('ido.build.filter') != "": - include_unit = False - if hasattr(unit, 'filters'): - if len(unit.filters) > 0: - for filter in unit.filters: - if re.search(r"\b%s\b" % filter, project.getProperty('ido.build.filter')): - include_unit = True - else: - include_unit = False - elif len(unit.filters) == 0: - include_unit = True - else: - include_unit = False - else: - include_unit = False - if hasattr(unit, 'filters'): - if len(unit.filters) == 0: - include_unit = True - if include_unit: - #if pathaddition.match.ant_match(unit.path, "**/tsrc/**", False): - modules[mod.name].append(os.path.join(project.getProperty('build.drive') + os.sep, unit.path)) - #else: - # project.log('tcrc not found in ' + str(unit.path)) - - #substituting paths in the modules dictionary from path list using keys - for name in modules.keys(): - if not modules[name] == []: - project.setProperty(str("%s.%s" % (attributes.get('prefix'), name)), str(" ".join(modules[name]))) - else: - del modules[name] - - project.setProperty(str(attributes.get('property')), str(",".join(modules.keys()))) - -except Exception, e: - traceback.print_exc() - project.log("ERROR: could not generate tsrc path list. %s" % e) +for name in modules.keys(): + if modules[name] == []: + del modules[name] + else: + project.setProperty("%s.%s" % (attributes.get('prefix'), name), " ".join(modules[name])) + +project.setProperty(attributes.get('property'), ",".join(modules.keys())) +project.setProperty('ats.drops.count', str(len(modules))) - - - + + @@ -290,48 +286,24 @@ } } else { self.log("Error: module.list not defined."); - self.setValue(true); + self.setValue(true); } ]]> - - - - - - - - - ${ats.drop.file} - + @@ -346,10 +318,11 @@ - + + @@ -364,55 +337,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - data: xml(${canonical.sysdef.file}) - ant: antProperties() - - - - - ats.ctc.monsyms: ${ats.ctc.monsyms} + + ats.ctc.monsyms: ${ats.ctc.monsyms} + + - - - + - + - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + +import delta_zip +delta_zip.evalidAdomapping(r'${build.drive}', r'@{dir}', r'${ado.mapping.file}') + + + + + + + + + + +