From patchwork Mon Dec 3 19:58:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 13347 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 59F712424F for ; Mon, 3 Dec 2012 19:58:17 +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 C33ECA186F2 for ; Mon, 3 Dec 2012 19:58:16 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so4628606ieb.11 for ; Mon, 03 Dec 2012 11:58:16 -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=/9IxB+9yY4zcyG3jEjmm9xURYhx8rVcajtq4akk+W5g=; b=l/RTNRXDqAyzcIIsLWZyT1ho0bvlrUbZutnC3O7S9SAi94JMxjVa8AUpVfIh56nCFJ sltG3vfYClxp0Xk9fILgrjBGoH6Awl8j36T9P3rLsGcRp2woudWfqlCZFwnOFAF1u8zi wrHf2TRvDq+uH9Jbz9GXsGkzme7F1LgoYe0UGw2xh5bfndcqiGECZ34J4GRN8uFTd1RG DD7B1UpZdkiMgDp+EoK97Sc1kLrhPLcY47rgeU4DnoUvroMWoMrUq6bLJuOO3nQ6mx3M O34YiS3KX9aRBugJoCMSGQOJX+fcNaxDkFx6t+YAgsseMOya8tyqky4wIDNZaAqcA2wd Bb0w== Received: by 10.43.46.2 with SMTP id um2mr8884157icb.18.1354564696083; Mon, 03 Dec 2012 11:58: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.50.67.148 with SMTP id n20csp210827igt; Mon, 3 Dec 2012 11:58:15 -0800 (PST) Received: by 10.216.28.199 with SMTP id g49mr3563889wea.177.1354564694032; Mon, 03 Dec 2012 11:58:14 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id c3si8890456wej.89.2012.12.03.11.58.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 11:58: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 1Tfc9d-0007iT-BK for ; Mon, 03 Dec 2012 19:58:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 48D1AE0151 for ; Mon, 3 Dec 2012 19:58: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: 478 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 478: a few fixes for problems found trying to use signals in the real world Message-Id: <20121203195813.17810.67927.launchpad@ackee.canonical.com> Date: Mon, 03 Dec 2012 19: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="16335"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: b099c988bd900fa3e40998ea3d3c37a99cc8e629 X-Gm-Message-State: ALoCoQk1GUKQugrHAHIQKTfWgREdSCSqUfVlGxy7EEV66wakY5HhOAq2gVKb8sVoNVYFCXJBTT/c Merge authors: Michael Hudson-Doyle (mwhudson) Related merge proposals: https://code.launchpad.net/~mwhudson/lava-dispatcher/signal-fixes/+merge/137671 proposed by: Michael Hudson-Doyle (mwhudson) ------------------------------------------------------------ revno: 478 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Tue 2012-12-04 08:57:52 +1300 message: a few fixes for problems found trying to use signals in the real world modified: lava_dispatcher/actions/lava_test_shell.py lava_dispatcher/lava_test_shell.py lava_test_shell/lava-test-case lava_test_shell/lava-test-runner-android 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 2012-11-23 01:41:43 +0000 +++ lava_dispatcher/actions/lava_test_shell.py 2012-12-03 19:38:41 +0000 @@ -441,9 +441,8 @@ self._sw_sources.append(info) def copy_test(self, hostdir, targetdir): + shutil.copytree(self.repo, hostdir, symlinks=True) URLTestDefinition.copy_test(self, hostdir, targetdir) - for filepath in glob(os.path.join(self.repo, '*')): - shutil.copy2(filepath, hostdir) logging.info('copied all test files') @@ -544,6 +543,7 @@ def _mk_runner_dirs(self, mntdir): utils.ensure_directory('%s/bin' % mntdir) utils.ensure_directory_empty('%s/tests' % mntdir) + utils.ensure_directory_empty('%s/results' % mntdir) def _configure_target(self, target, testdef_urls, testdef_repos): ldir = target.deployment_data['lava_test_dir'] === modified file 'lava_dispatcher/lava_test_shell.py' --- lava_dispatcher/lava_test_shell.py 2012-11-22 23:34:43 +0000 +++ lava_dispatcher/lava_test_shell.py 2012-12-03 19:41:16 +0000 @@ -125,7 +125,7 @@ for filename, filepath in _directory_names_and_paths(dir, ignore_missing=True): if filename.endswith('.mimetype'): continue - mime_type = _read_content(filepath + '.mimetype', ignore_missing=True) + mime_type = _read_content(filepath + '.mimetype', ignore_missing=True).strip() if not mime_type: mime_type = mimetypes.guess_type(filepath)[0] if mime_type is None: === modified file 'lava_test_shell/lava-test-case' --- lava_test_shell/lava-test-case 2012-11-21 01:33:01 +0000 +++ lava_test_shell/lava-test-case 2012-12-03 19:39:15 +0000 @@ -17,11 +17,11 @@ fi if [ "$1" = "--shell" ]; then shift - echo "" + echo "" > /dev/console read -t 600 < $ACK_FIFO $* rc=$? - echo "" + echo "" > /dev/console read -t 600 < $ACK_FIFO if [ $rc -eq 0 ]; then RESULT=pass @@ -71,4 +71,5 @@ if [ -n "${MEASUREMENT+x}" ]; then echo $MEASUREMENT > $result_dir/measurement -fi \ No newline at end of file +fi +[ -n "${rc+x}" ] && exit $rc === modified file 'lava_test_shell/lava-test-runner-android' --- lava_test_shell/lava-test-runner-android 2012-11-22 22:47:53 +0000 +++ lava_test_shell/lava-test-runner-android 2012-12-03 19:46:40 +0000 @@ -101,7 +101,11 @@ cp ${line}/testdef.yaml ${odir}/ cp ${line}/uuid ${odir}/analyzer_assigned_uuid cp ${line}/run.sh ${odir}/attachments/ - [ -f ${line}/install.sh ] && cp ${line}/install.sh ${odir}/attachments/ + echo 'text/plain' > ${odir}/attachments/run.sh.mimetype + if [ -f ${line}/install.sh ]; then + cp ${line}/install.sh ${odir}/attachments/ + echo 'text/plain' > ${odir}/attachments/install.sh.mimetype + fi lava-test-shell --output_dir ${odir} /system/bin/sh -e "${line}/run.sh" echo "${PREFIX} ${test} exited with: `cat ${odir}/return_code`" done < ${WORKFILE} === modified file 'lava_test_shell/lava-test-runner-ubuntu' --- lava_test_shell/lava-test-runner-ubuntu 2012-11-22 01:43:14 +0000 +++ lava_test_shell/lava-test-runner-ubuntu 2012-12-03 19:40:49 +0000 @@ -84,7 +84,11 @@ cp ${line}/uuid ${odir}/analyzer_assigned_uuid cp ${line}/testdef.yaml ${odir}/ cp ${line}/run.sh ${odir}/attachments/ - [ -f ${line}/install.sh ] && cp ${line}/install.sh ${odir}/attachments/ + echo 'text/plain' > ${odir}/attachments/run.sh.mimetype + if [ -f ${line}/install.sh ]; then + cp ${line}/install.sh ${odir}/attachments/ + echo 'text/plain' > ${odir}/attachments/install.sh.mimetype + fi # run.sh includes a "read -t " which isn't supported by dash # so be sure to use bash lava-test-shell --output_dir ${odir} /bin/bash -e "${line}/run.sh"