From patchwork Fri Sep 23 08:58:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 4297 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0B05D23EF5 for ; Fri, 23 Sep 2011 08:58:16 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id C2B6DA18C08 for ; Fri, 23 Sep 2011 08:58:15 +0000 (UTC) Received: by fxe23 with SMTP id 23so5037418fxe.11 for ; Fri, 23 Sep 2011 01:58:15 -0700 (PDT) Received: by 10.223.63.8 with SMTP id z8mr4675131fah.84.1316768295558; Fri, 23 Sep 2011 01:58:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.18.198 with SMTP id y6cs203830lad; Fri, 23 Sep 2011 01:58:15 -0700 (PDT) Received: by 10.216.133.69 with SMTP id p47mr3382898wei.53.1316768294302; Fri, 23 Sep 2011 01:58:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id p40si9499472weq.18.2011.09.23.01.58.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Sep 2011 01:58:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R71aH-00058v-Q9 for ; Fri, 23 Sep 2011 08:58:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id B7C8FE15FE for ; Fri, 23 Sep 2011 08:58:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-test X-Launchpad-Branch: ~linaro-validation/lava-test/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 96 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-test/trunk] Rev 96: fix some tests that were not parsing correctly Message-Id: <20110923085813.17987.17553.launchpad@ackee.canonical.com> Date: Fri, 23 Sep 2011 08:58:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14012"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: fb4b5787e1c6e3f83ac294b4f0068a316f668223 ------------------------------------------------------------ revno: 96 fixes bug: https://launchpad.net/bugs/857156 committer: Paul Larson branch nick: lava-test timestamp: Fri 2011-09-23 03:56:22 -0500 message: fix some tests that were not parsing correctly modified: lava_test/test_definitions/gtkperf.py lava_test/test_definitions/posixtestsuite.py --- lp:lava-test https://code.launchpad.net/~linaro-validation/lava-test/trunk You are subscribed to branch lp:lava-test. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-test/trunk/+edit-subscription === modified file 'lava_test/test_definitions/gtkperf.py' --- lava_test/test_definitions/gtkperf.py 2011-09-12 09:19:10 +0000 +++ lava_test/test_definitions/gtkperf.py 2011-09-23 08:56:22 +0000 @@ -27,14 +27,14 @@ RUNSTEPS = ["LANG=C gtkperf %s" % gtkperf_options] class GtkTestParser(TestParser): - def parse(self): + def parse(self, artifacts): PAT1 = "^(?P\w+) - (?P\w*\W*\w*) - time:\W+(?P\d+\.\d+)" PAT2 = "^(?P\w+) - time:\W+(?P\d+\.\d+)" filename = "testoutput.log" pat1 = re.compile(PAT1) pat2 = re.compile(PAT2) with open(filename) as fd: - for line in fd: + for lineno, line in enumerate(fd, 1): match = pat1.search(line) if match: d = match.groupdict() @@ -42,15 +42,21 @@ d['subtest']) d.pop('subtest') d['test_case_id'] = d['test_case_id'].replace(" ", "_") - self.results['test_results'].append(d) + d["log_filename"] = filename + d["log_lineno"] = lineno + self.results['test_results'].append( + self.analyze_test_result(d)) else: match = pat2.search(line) if match: - self.results['test_results'].append(match.groupdict()) - self.appendtoall({'units':'seconds', 'result':'pass'}) - self.fixmeasurements() - -parse = GtkTestParser() + d = match.groupdict() + d["log_filename"] = filename + d["log_lineno"] = lineno + self.results['test_results'].append( + self.analyze_test_result(d)) + + +parse = GtkTestParser(appendall={'units':'seconds', 'result':'pass'}) inst = TestInstaller(deps=["gtkperf"]) run = TestRunner(RUNSTEPS) === modified file 'lava_test/test_definitions/posixtestsuite.py' --- lava_test/test_definitions/posixtestsuite.py 2011-09-12 09:19:10 +0000 +++ lava_test/test_definitions/posixtestsuite.py 2011-09-23 08:56:22 +0000 @@ -51,19 +51,21 @@ class PosixParser(TestParser): - def parse(self): + def parse(self, artifacts): filename = "testoutput.log" pat = re.compile(self.pattern) with open(filename) as fd: - for line in fd: + for lineno, line in enumerate(fd, 1): match = pat.match(line) - if match: - results = match.groupdict() - test_case_id = results['test_case_id'] - results['test_case_id'] = test_case_id.replace("/", ".") - self.results['test_results'].append(results) - if self.fixupdict: - self.fixresults(self.fixupdict) + if not match: + continue + results = match.groupdict() + test_case_id = results['test_case_id'] + results['test_case_id'] = test_case_id.replace("/", ".") + results["log_filename"] = "testoutput.log" + results["log_lineno"] = lineno + self.results['test_results'].append( + self.analyze_test_result(results)) posix_inst = TestInstaller(INSTALLSTEPS, deps=DEPS, url=URL, md5=MD5)