From patchwork Thu May 24 01:58:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongqin Liu X-Patchwork-Id: 8938 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 BE2D019D1BC for ; Thu, 24 May 2012 01:58:13 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 734A0A181CA for ; Thu, 24 May 2012 01:58:13 +0000 (UTC) Received: by yhpp61 with SMTP id p61so8888168yhp.11 for ; Wed, 23 May 2012 18:58:13 -0700 (PDT) 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=zpRs4wtT6IGR19Ezu6/h7CuWz51Puao4S7g96x6lI7s=; b=OokixJ/GNe88Ml6vQdqOy4not/dVLuqaThlWWRPAuxr6cysZbAN33FqIxN8bVfW1o+ OH6NtiSmN6UBP/VYYMUnOqknI1gRRC7sER/T3p4DJANFTQG0S8F5vqKwtUqRsVlzY3sq Ma+xRBlcm6BvxjYQl+deC6YRYeSM/Z3sAJO6GLCWKly97/cQZj+beryFn9Z+xdub1Kmv HuonSlL++UAD6xeD0GZEFiKaOh65utMJiXnaR9eRGmDh5cvA/6vkhXB4ed57QsPnDyS2 H4Zmb/FumFeY+1+qBmkNSqM24oZ7/mNqnzt51aSWGh6NAvdzoTONUCHTg5fZtE6iQ+l/ I/fQ== Received: by 10.50.46.232 with SMTP id y8mr14640903igm.57.1337824692686; Wed, 23 May 2012 18:58:12 -0700 (PDT) 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.231.35.72 with SMTP id o8csp2136ibd; Wed, 23 May 2012 18:58:11 -0700 (PDT) Received: by 10.180.80.228 with SMTP id u4mr49458038wix.5.1337824690959; Wed, 23 May 2012 18:58:10 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id y43si11086902wel.92.2012.05.23.18.58.10 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 May 2012 18:58:10 -0700 (PDT) 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 1SXNJa-0008Ex-BT for ; Thu, 24 May 2012 01:58:10 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 4810DE049E for ; Thu, 24 May 2012 01:58:10 +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: 299 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 299: merge the monkeyrunner support branch Message-Id: <20120524015810.16830.50100.launchpad@ackee.canonical.com> Date: Thu, 24 May 2012 01:58:10 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15288"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 7458878338f3db677dd0dfa855a79069daeafdf0 X-Gm-Message-State: ALoCoQm1b0fqPncg/e9pCrncyHZh09AKY+cKLSCq3kQC5MUMxzuPDSoAA6sg8/6Iqacu48290Aum Merge authors: Yongqin Liu (liuyq0307) Related merge proposals: https://code.launchpad.net/~liuyq0307/lava-dispatcher/monkeyrunner/+merge/106959 proposed by: Yongqin Liu (liuyq0307) review: Approve - Yongqin Liu (liuyq0307) ------------------------------------------------------------ revno: 299 [merge] committer: Yongqin Liu branch nick: lava-dispatcher timestamp: Thu 2012-05-24 09:53:30 +0800 message: merge the monkeyrunner support branch modified: doc/examples/jobs/lava-android-test.json lava_dispatcher/actions/lava-android-test.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 'doc/examples/jobs/lava-android-test.json' --- doc/examples/jobs/lava-android-test.json 2012-03-15 09:16:09 +0000 +++ doc/examples/jobs/lava-android-test.json 2012-04-19 11:38:00 +0000 @@ -65,6 +65,13 @@ } }, { + "command": "lava_android_test_run_monkeyrunner", + "parameters": + { + "url": "git://android.git.linaro.org/test/linaro/android/system.git" + } + }, + { "command": "submit_results_on_host", "parameters": { === modified file 'lava_dispatcher/actions/lava-android-test.py' --- lava_dispatcher/actions/lava-android-test.py 2012-03-19 06:52:06 +0000 +++ lava_dispatcher/actions/lava-android-test.py 2012-04-26 07:44:18 +0000 @@ -22,7 +22,6 @@ import os import subprocess import logging -from datetime import datetime from lava_dispatcher.actions import BaseAction from lava_dispatcher.client.base import OperationFailed from lava_dispatcher.utils import generate_bundle_file_name @@ -126,6 +125,45 @@ session.dev_name, rc)) +class cmd_lava_android_test_run_monkeyrunner(AndroidTestAction): + ''' + This action is added to make doing the monkeyrunner script test more easily + from android build page. With this action, we only need to specify the url + of the repository where the monkeyrunner script are stored. + Then lava-android-test will run all the monkeyrunner scripts in that + repository, and help to gather all the png files genereated when run + ''' + parameters_schema = { + 'type': 'object', + 'properties': { + 'url': {'type': 'string'}, + 'timeout': {'type': 'integer', 'optional': True}, + }, + 'additionalProperties': False, + } + + def test_name(self, url=None, timeout=-1): + return '%s (url=[%s])' % ( + super(cmd_lava_android_test_run_monkeyrunner, self).test_name(), + url) + + def run(self, url=None, timeout=-1): + #Make sure in test image now + self.check_lava_android_test_installed() + with self.client.android_tester_session() as session: + bundle_name = generate_bundle_file_name('monkeyrunner') + cmds = ["lava-android-test", 'run-monkeyrunner', url] + cmds.extend(['-s', session.dev_name, '-o', + '%s/%s.bundle' % (self.context.host_result_dir, + bundle_name)]) + logging.info("Execute command on host: %s" % (' '.join(cmds))) + rc = subprocess.call(cmds) + if rc != 0: + raise OperationFailed( + "Failed to run monkeyrunner test url[%s] on device(%s)" + " with return value: %s" % (url, session.dev_name, rc)) + + class cmd_lava_android_test_install(AndroidTestAction): """ lava-test deployment to test image rootfs by chroot