From patchwork Mon Jan 14 21:01:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 14032 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 4DCD323E1F for ; Mon, 14 Jan 2013 21:01:16 +0000 (UTC) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by fiordland.canonical.com (Postfix) with ESMTP id DDA2DA1914C for ; Mon, 14 Jan 2013 21:01:15 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id fo13so3984257vcb.35 for ; Mon, 14 Jan 2013 13:01:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :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=7IcSpm2xgExkJozUgNwk+MID9+l9y/P7mshGa0E/0f0=; b=UL0VqNbCfKQZKY2KWEF5e5JqGBYonGgaMzu/lylpLgqX/+FG0xo9qclqozy2D/rfS7 MAPUy3gXCbpqU+be2sKe58PJHqerxgYwe1y2mFLudnOdK6ezH+iofxaxAgtPJFT7+VCr VxoKqyp2RTOyn0QxlPtFcBkjYOQJX1m5I35nzcZoIBH8+Pwz5cXHcohWwenN4KYOieTy zFChgEC4d5zBeAtfAUnFHIkcF+7yVQ/5CJqDXV7AziudQqkGUBW5DlltaZCyl+smTjy9 1z1WFtSEMCR1hu6YfnC7pzCfqvu9OBSgaja2KzqHF8T3WVLy/EBosFi07Ilyqq/dkwkU nByg== X-Received: by 10.58.181.42 with SMTP id dt10mr22080390vec.34.1358197275394; Mon, 14 Jan 2013 13:01: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.58.145.101 with SMTP id st5csp79565veb; Mon, 14 Jan 2013 13:01:14 -0800 (PST) X-Received: by 10.180.97.68 with SMTP id dy4mr14784851wib.7.1358197274315; Mon, 14 Jan 2013 13:01:14 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id kt7si24483472wjb.31.2013.01.14.13.01.13 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 13:01:14 -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 1Tur9d-0006RB-NF for ; Mon, 14 Jan 2013 21:01:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 9EACAE012D for ; Mon, 14 Jan 2013 21:01: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: 529 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 529: fill out log_lineno for lava-test-shell results so that the dashboard can link to the line in the... Message-Id: <20130114210113.26777.31327.launchpad@ackee.canonical.com> Date: Mon, 14 Jan 2013 21:01: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="16420"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 0d5442f307f34bd8f226bf01afe4bb0caf6d4814 X-Gm-Message-State: ALoCoQkW996WnTLxGfxBSgxI14cVl4+tw3wIJ3PS5sUi9uzFyDPv2f4TnIHsAAmTTGrRslppgQhV Merge authors: Michael Hudson-Doyle (mwhudson) Related merge proposals: https://code.launchpad.net/~mwhudson/lava-dispatcher/lava-test-shell-log-lineno/+merge/143059 proposed by: Michael Hudson-Doyle (mwhudson) review: Approve - Andy Doan (doanac) ------------------------------------------------------------ revno: 529 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Tue 2013-01-15 10:00:36 +1300 message: fill out log_lineno for lava-test-shell results so that the dashboard can link to the line in the log modified: lava_dispatcher/actions/lava_test_shell.py 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/actions/lava_test_shell.py' --- lava_dispatcher/actions/lava_test_shell.py 2013-01-14 16:29:38 +0000 +++ lava_dispatcher/actions/lava_test_shell.py 2013-01-14 20:59:03 +0000 @@ -125,6 +125,7 @@ from lava_dispatcher import utils from lava_dispatcher.actions import BaseAction +from lava_dispatcher.client.base import wait_for_prompt from lava_dispatcher.device.target import Target from lava_dispatcher.downloader import download_image @@ -455,7 +456,8 @@ with target.runner() as runner: runner.wait_for_prompt(timeout) - runner._connection.sendline("%s/bin/lava-test-runner" % target.deployment_data['lava_test_dir']) + runner._connection.sendline( + "%s/bin/lava-test-runner" % target.deployment_data['lava_test_dir']) start = time.time() if timeout == -1: timeout = runner._connection.timeout === modified file 'lava_dispatcher/lava_test_shell.py' --- lava_dispatcher/lava_test_shell.py 2012-12-20 03:35:44 +0000 +++ lava_dispatcher/lava_test_shell.py 2013-01-14 03:08:36 +0000 @@ -227,7 +227,7 @@ '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'): + for lineno, line in enumerate(stdout.split('\n'), 1): match = pattern.match(line.strip()) if match: res = match.groupdict() @@ -237,7 +237,8 @@ if res['result'] not in ('pass', 'fail', 'skip', 'unknown'): logging.error('bad test result line: %s' % line.strip()) continue - + res['log_lineno'] = lineno + res['log_filename'] = 'stdout.log' results_from_log_file.append(res) results_from_directories = []