From patchwork Thu Dec 20 16:31:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 13677 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 5CD8323E02 for ; Thu, 20 Dec 2012 16:31:23 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by fiordland.canonical.com (Postfix) with ESMTP id B8600A19188 for ; Thu, 20 Dec 2012 16:31:22 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id 13so4825461iea.21 for ; Thu, 20 Dec 2012 08:31:22 -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=dNXgDzXuIGGB1rD2W638+tyvf8tswGkbay1Wl6fXe48=; b=nqaZoF5WaVyLuPhiL6A1VxkDAWg7+Vn6XUBw1jbreD1Y3D34zqOji420MUcZIh24JF 483kqCgGslSI6ZtaZ61ftx1O3k5YLmfS1Vim+IJNvk5yU1toiVZMmxsNwZdHCaYYuEDR XD+JkZBzIJJh/yeBq79IhlObWyfkmSLiy3rlcwl8ZOkV5Y9GIXeFxLxe6i7O8aOhlojl 6Yl7SVf18oucrfza4WJOVc34OTOE+1mBUdefymXSyywKqDWtUVAcEKvil05KuUTc2k3X FOu6KE5jg3+O5rDyFHEGM+gR8fKOYRimNhyr8Damox7j5zPpGlbmGlHaAbES1fvrdHsQ xyNg== X-Received: by 10.50.195.135 with SMTP id ie7mr10660409igc.8.1356021082145; Thu, 20 Dec 2012 08:31:22 -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.115 with SMTP id m19csp40890igt; Thu, 20 Dec 2012 08:31:21 -0800 (PST) X-Received: by 10.180.72.232 with SMTP id g8mr18603264wiv.0.1356021080604; Thu, 20 Dec 2012 08:31:20 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id p10si744715wjz.25.2012.12.20.08.31.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Dec 2012 08:31:20 -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 1Tlj1i-00016b-5X for ; Thu, 20 Dec 2012 16:31:18 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 00BEBE161B for ; Thu, 20 Dec 2012 16:31:18 +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: 511 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 511: fix aep and shell hooks signal hander post-processing logic Message-Id: <20121220163117.11478.85270.launchpad@ackee.canonical.com> Date: Thu, 20 Dec 2012 16:31:17 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16378"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 2dfe6209fc09449499f533f63156d46e7168ad06 X-Gm-Message-State: ALoCoQmDkJc/c7gRy0ID1r7Eb3B6aeVpbmajTtCMRoWyEF/CL4LzYbhkyirLaUUFYXaIfHG5ai8f ------------------------------------------------------------ revno: 511 committer: Andy Doan branch nick: trunk timestamp: Wed 2012-12-19 21:35:44 -0600 message: fix aep and shell hooks signal hander post-processing logic revno 507 left out the part of shellhooks logic that ensured the test case id would be preserved. This does the same thing w/o requiring the extra call to os.mkdir modified: lava_dispatcher/lava_test_shell.py lava_dispatcher/signals/__init__.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-12-04 22:20:34 +0000 +++ lava_dispatcher/lava_test_shell.py 2012-12-20 03:35:44 +0000 @@ -169,9 +169,11 @@ w(path, attrvalue) -def _result_from_dir(dir): +def _result_from_dir(dir, test_case_id=None): + if not test_case_id: + test_case_id = os.path.basename(dir) result = { - 'test_case_id': os.path.basename(dir), + 'test_case_id': test_case_id } for fname in 'result', 'measurement', 'units', 'message', 'timestamp', 'duration': === modified file 'lava_dispatcher/signals/__init__.py' --- lava_dispatcher/signals/__init__.py 2012-12-19 04:27:40 +0000 +++ lava_dispatcher/signals/__init__.py 2012-12-20 03:35:44 +0000 @@ -105,10 +105,11 @@ scratch_dir = self.testdef_obj.context.client.target_device.scratch_dir rdir = tempfile.mkdtemp(dir=scratch_dir) try: + tcid = test_result['test_case_id'] _result_to_dir(test_result, rdir) yield rdir test_result.clear() - test_result.update(_result_from_dir(rdir)) + test_result.update(_result_from_dir(rdir, tcid)) finally: rmtree(rdir)