From patchwork Mon Nov 19 13:44:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumaran X-Patchwork-Id: 12938 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 8A93323DFE for ; Mon, 19 Nov 2012 13:44:16 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 12C18A18F53 for ; Mon, 19 Nov 2012 13:44:15 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so6428623iej.11 for ; Mon, 19 Nov 2012 05:44:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=6wHvW1Otyo41AiJxbO4lo+CMCjhzjp+bVa+S5FrI5qU=; b=nyc/dDnaw7lv+7rWzUJYkxkHKt7B3ondmCtV/+Jh1+aDFOTYxKydOm89tLIh4WLxE3 ABsy8Fgi2WGl4DuGCLOjX07GQR0mJbJNMj37CP2pCI1h9BKxfmz7wP9zGq+cxS709eu1 M5TnqAQ1wV2lBNhb7PxoQca5t65kD7enwyuPzNG8ABam1OAMsVOdGKtaXUCTI7C+tCdd /ZCiwC1jHVFhwC7XOtnkJ/19MNKRyLPLg/hrCfj2A3yrliwjg9SaZTaFCuB9Yia0m5x2 ctDeWqs77Fce654YRJyZ8isG4xM8VUu4dJmn4FUr9DzHFvsowcdlQX6x8R4Y9Jc7HKbT sXKQ== Received: by 10.50.187.197 with SMTP id fu5mr6452754igc.70.1353332655470; Mon, 19 Nov 2012 05:44:15 -0800 (PST) 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.50.67.148 with SMTP id n20csp159522igt; Mon, 19 Nov 2012 05:44:14 -0800 (PST) Received: by 10.180.86.233 with SMTP id s9mr9032363wiz.22.1353332653953; Mon, 19 Nov 2012 05:44:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id n17si5133691wen.38.2012.11.19.05.44.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 05:44:13 -0800 (PST) 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 1TaRe1-0000A1-BB for ; Mon, 19 Nov 2012 13:44:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 42CBAE0106 for ; Mon, 19 Nov 2012 13:44:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 453 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 453: [Bug #1079642] Fix for test definitions which does not have a parse pattern. Message-Id: <20121119134413.23478.18111.launchpad@ackee.canonical.com> Date: Mon, 19 Nov 2012 13:44: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="16278"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 9a87cd20c8cc1082c7aba35b1ba4c910d23d961d X-Gm-Message-State: ALoCoQn7CXIHnuRQcDHVgjRilgQmINJh499964EiddHevPEuA2kIiBMaskZudhSuFIqRjqqglzpK Merge authors: Senthil Kumaran S (stylesen) Related merge proposals: https://code.launchpad.net/~stylesen/lava-dispatcher/fix-empty-parse-pattern/+merge/134646 proposed by: Senthil Kumaran S (stylesen) review: Approve - Andy Doan (doanac) ------------------------------------------------------------ revno: 453 [merge] committer: Senthil Kumaran branch nick: trunk timestamp: Mon 2012-11-19 19:12:37 +0530 message: [Bug #1079642] Fix for test definitions which does not have a parse pattern. modified: lava_dispatcher/lava_test_shell.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/lava_test_shell.py' --- lava_dispatcher/lava_test_shell.py 2012-11-15 22:11:54 +0000 +++ lava_dispatcher/lava_test_shell.py 2012-11-19 13:38:33 +0000 @@ -117,12 +117,19 @@ def _get_test_results(testdef, stdout): results = [] - - pattern = re.compile(testdef['parse']['pattern']) - fixupdict = {} - if 'fixupdict' in testdef['parse']: - fixupdict = testdef['parse']['fixupdict'] + + if 'parse' in testdef: + if 'fixupdict' in testdef['parse']: + fixupdict = testdef['parse']['fixupdict'] + if 'pattern' in testdef['parse']: + pattern = re.compile(testdef['parse']['pattern']) + else: + defpat = "(?P.*-*)\\s+:\\s+(?P(PASS|pass|FAIL|fail|SKIP|skip|UNKNOWN|unknown))" + pattern = re.compile(defpat) + fixupdict = {'PASS': 'pass', 'FAIL': 'fail', 'SKIP': 'skip', + 'UNKNOWN': 'unknown'} + logging.warning("""Using a default pattern to parse the test result. This may lead to empty test result in certain cases.""") for line in stdout.split('\n'): match = pattern.match(line.strip())