From patchwork Fri Jan 11 12:44:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Terceiro X-Patchwork-Id: 13973 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 34E7023E2E for ; Fri, 11 Jan 2013 12:44:17 +0000 (UTC) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by fiordland.canonical.com (Postfix) with ESMTP id C6947A184AE for ; Fri, 11 Jan 2013 12:44:16 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id b13so1351055vby.19 for ; Fri, 11 Jan 2013 04:44:16 -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=wwv4o/kVgbZOeKVYOoqeQyX8DYXE+2ZNwlNeSFFtiPY=; b=NyFn6LjMh5wyspXBGIJAnXfaL6HFafVk7y6HR4Yd7XFdN/CjFmLXWHIaFaRSW7SG3k AvSnTbQDJ1zoacQVokF+BpoYJ8/RCHEWa0qfxKr1ONLbeWGOdrTFHAo7GKcGGyQCJdr1 hp93dZwNkPmHFElGig2p2msZZFq5TdMrKGI1TaOQZaUjbWIJaUmeL/rOS2r4yL6DmTnp uCZts0wTjGQfzc4PxI0rzxVNjCAxl/8ucdT1nuEVNAYlvhsGj8ebAE8dPwk79+8DMDgg AqEdNdRU+9wBQ2RIX6S5vfJhXPnrdH53WcVzQfkd3a+Hz3fxHZ4FPDHEwUVLjN30HqST jMxw== X-Received: by 10.52.70.205 with SMTP id o13mr81824426vdu.75.1357908256305; Fri, 11 Jan 2013 04:44:16 -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 st5csp109992veb; Fri, 11 Jan 2013 04:44:15 -0800 (PST) X-Received: by 10.180.93.41 with SMTP id cr9mr14523087wib.19.1357908255225; Fri, 11 Jan 2013 04:44:15 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fu4si8526795wib.20.2013.01.11.04.44.14 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 11 Jan 2013 04:44:15 -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 1Ttdy2-0003Do-Io for ; Fri, 11 Jan 2013 12:44:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 7DC6CE0013 for ; Fri, 11 Jan 2013 12:44:14 +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: 525 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 525: lava-test-shell: keep a copy of the results directory + consistency fix in lava-test-runner for U... Message-Id: <20130111124414.4951.51003.launchpad@ackee.canonical.com> Date: Fri, 11 Jan 2013 12:44:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16418"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: da6ce354a67821f97660e0cfdfae40d38264856a X-Gm-Message-State: ALoCoQm/AeCBZjZFuUuYZriDfhOUYTJjuzGqevuk1PCF/Is6+JFdeGjpJ/aUe83mfmselrrSSK0S Merge authors: Antonio Terceiro (terceiro) Related merge proposals: https://code.launchpad.net/~terceiro/lava-dispatcher/lava-test-shell-fixes/+merge/142391 proposed by: Antonio Terceiro (terceiro) ------------------------------------------------------------ revno: 525 [merge] committer: Antonio Terceiro branch nick: trunk timestamp: Fri 2013-01-11 09:42:30 -0300 message: lava-test-shell: keep a copy of the results directory + consistency fix in lava-test-runner for Ubuntu modified: lava_dispatcher/actions/lava_test_shell.py lava_test_shell/lava-test-runner-ubuntu --- 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-04 13:09:27 +0000 +++ lava_dispatcher/actions/lava_test_shell.py 2013-01-09 20:57:25 +0000 @@ -103,6 +103,7 @@ # After the test run has completed, the /lava/results directory is pulled over # to the host and turned into a bundle for submission to the dashboard. +from datetime import datetime import glob import logging import os @@ -563,9 +564,14 @@ results_part = getattr(target.config, results_part) rdir = self.context.host_result_dir - with target.file_system(results_part, 'lava/results') as d: - bundle = lava_test_shell.get_bundle(d, testdefs_by_uuid) - utils.ensure_directory_empty(d) + with target.file_system(results_part, 'lava') as d: + results_dir = os.path.join(d, 'results') + bundle = lava_test_shell.get_bundle(results_dir, testdefs_by_uuid) + # lava/results must be empty, but we keep a copy named + # lava/results-XXXXXXXXXX for post-mortem analysis + timestamp = datetime.now().strftime("%s") + os.rename(results_dir, results_dir + '-' + timestamp) + os.mkdir(results_dir) signal_director.postprocess_bundle(bundle) === modified file 'lava_test_shell/lava-test-runner-ubuntu' --- lava_test_shell/lava-test-runner-ubuntu 2012-12-19 20:54:43 +0000 +++ lava_test_shell/lava-test-runner-ubuntu 2013-01-07 20:39:13 +0000 @@ -49,7 +49,7 @@ WORKFILE=${WORKFILE}-${TS} echo "${PREFIX} looking for installation work in ${WORKFILE}" -while read line ; do +for line in $(cat ${WORKFILE}); do test=`basename $line` if [ -f ${line}/install.sh ] ; then echo "${PREFIX} running ${test} installer ..." @@ -61,7 +61,7 @@ exit 1 fi fi -done < ${WORKFILE} +done echo "${PREFIX} save hardware/software context info..." hwcontext