diff -r 044383f39525 -r be27ed110b50 buildframework/helium/tools/quality/validate-policy.ant.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildframework/helium/tools/quality/validate-policy.ant.xml Wed Oct 28 14:39:48 2009 +0000 @@ -0,0 +1,184 @@ + + + + + Policy file validation. + + + + + + + + + + + + + + + + + + + + + \n\n") +components_per_file = {} + +pattern = ['distribution.policy.s60'] +if attributes.get('pattern') != None: + pattern = str(attributes.get('pattern')).split(',') + +validator = integration.quality.PolicyValidator(pattern, ignoreroot=ignoreroot) + +if attributes.get('ids') is not None: + self.log("Loading policy ids from: %s" % str(attributes.get('ids'))) + if not os.path.exists(str(attributes.get('ids'))): + self.log("ERROR: Could not find: %s" % str(attributes.get('ids')), project.MSG_ERR) + else: + for result in validator.load_policy_ids(str(attributes.get('ids'))): + self.log(str("%s: - %s - %s" % (result[0], result[1], result[2])), project.MSG_ERR) + if output is not None: + output.write(" \n" % (result[0], result[1], result[2])) + +for eid in range(elements.get("path").size()): + iterator = elements.get("path").get(int(eid)).iterator() + while iterator.hasNext(): + path = str(iterator.next()) + self.log("Scanning " + path) + for result in validator.validate(path): + self.log("%s: %s" % (result[0], result[1]), project.MSG_ERR) + if output is not None: + output.write(" \n" % (result[0], result[1], result[2])) + +if output is not None: + output.write("\n") + output.close() + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + 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() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +