Пример #1
0
 def accumulate(self):
     try:
         for root, dirnames, filenames in os.walk(self.report_dir_pathname):
             for filename in filenames:
                 if re.match(self.report_filename_pattern, filename):
                     report_pathname = os.path.join(root, filename)
                     print ProductVerifier.get_current_time(), "accumulating report", report_pathname
                     report = ProductVerifier.load_report(report_pathname)
                     for k, v in report.iteritems():
                         self.accumulate_entry(k, v)
                     self.accumulate_entry("summary_report.count", 1)
     finally:
         ProductVerifier.dump_report(self.summary_report, self.summary_report_pathname)
 def accumulate(self):
     try:
         for root, dirnames, filenames in os.walk(self.report_dir_pathname):
             for filename in filenames:
                 if re.match(self.report_filename_pattern, filename):
                     report_pathname = os.path.join(root, filename)
                     print ProductVerifier.get_current_time(
                     ), 'accumulating report', report_pathname
                     report = ProductVerifier.load_report(report_pathname)
                     for k, v in report.iteritems():
                         self.accumulate_entry(k, v)
                     self.accumulate_entry('summary_report.count', 1)
     finally:
         ProductVerifier.dump_report(self.summary_report,
                                     self.summary_report_pathname)
Пример #3
0
    def run(self):
        source_pathnames = self.glob_source_pathnames()

        print ProductVerifier.get_current_time(), \
            "found " + str(len(source_pathnames)) + " source files in '" + self.source_dirpath + "'"

        for source_pathname in source_pathnames:
            print ProductVerifier.get_current_time(), "source pathname:", source_pathname
            report_filename = path.basename(source_pathname) + ".json"
            report_pathname = path.join(self.report_dirpath, report_filename)
            print ProductVerifier.get_current_time(), "report pathname:", report_pathname
            verifier = ProductVerifier(source_pathname, report_pathname)
            verifier.verify()
Пример #4
0
    def run(self):
        source_pathnames = self.glob_source_pathnames()

        print ProductVerifier.get_current_time(), \
            "found " + str(len(source_pathnames)) + " source files in '" + self.source_dirpath + "'"

        for source_pathname in source_pathnames:
            print ProductVerifier.get_current_time(
            ), "source pathname:", source_pathname
            report_filename = path.basename(source_pathname) + ".json"
            report_pathname = path.join(self.report_dirpath, report_filename)
            print ProductVerifier.get_current_time(
            ), "report pathname:", report_pathname
            verifier = ProductVerifier(source_pathname, report_pathname)
            verifier.verify()