From patchwork Mon Nov 12 03:44:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Doan X-Patchwork-Id: 12804 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 2FBE523F56 for ; Mon, 12 Nov 2012 03:44:14 +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 AC2E9A189BF for ; Mon, 12 Nov 2012 03:44:13 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so8061641iej.11 for ; Sun, 11 Nov 2012 19:44:13 -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=YtryqY7Pl5j4X7vFiFN1EcgIXZMegcKKyD8mENxySiA=; b=BPm25GUlgjzRuIa9Z0IQbZUKTWr9kGBnD5+Ne2Cowik/Y/sdiMF1pTqC2XjuZ1J2Gm twFRERC6G5xk3GMdir0aiA599C35pX0nf/gE3YOc5zWVG5KIDwg2KAlxjkwY/mTjlPGp BORbZ9zWLmkgxA6lB9FK1kLk7EOyCdZkVp2wTCYK7luht0ptCOdHh9n/nPpGl/HW8qdW DURUar2jHxQ8qiKTcWV4nF8HewEvWL5gyNIZVJb861JNwD33I24ZnxytwN35uHIYPDNf xzMc4koDZlffLasxN6hmv4bPQ1s8oF4EfSW6nLSiFMLaFmNPCMDh0mzkujrp9DwFyViO fxwA== Received: by 10.50.213.34 with SMTP id np2mr6783320igc.57.1352691853121; Sun, 11 Nov 2012 19:44:13 -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 n20csp310032igt; Sun, 11 Nov 2012 19:44:12 -0800 (PST) Received: by 10.181.12.79 with SMTP id eo15mr4039401wid.14.1352691851761; Sun, 11 Nov 2012 19:44:11 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id o52si2839582wee.89.2012.11.11.19.44.11 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Nov 2012 19:44:11 -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 1TXkwV-0003yu-25 for ; Mon, 12 Nov 2012 03:44:11 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id EE44CE0288 for ; Mon, 12 Nov 2012 03:44: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: 443 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 443: update lava_test_shell docs for new YAML format Message-Id: <20121112034410.8116.89107.launchpad@ackee.canonical.com> Date: Mon, 12 Nov 2012 03:44: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="16251"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 008b7ef0a5f9d0b6fdb8a4b94ccde353322e0bbe X-Gm-Message-State: ALoCoQlWCXpI8mV58C8jobxuG+qAkXOov3XR4Lxtsh29kBPhwwK0q+mMZaJ80W+kNk58QGu5GkyS ------------------------------------------------------------ revno: 443 committer: Andy Doan branch nick: lava-dispatcher timestamp: Fri 2012-11-09 10:36:56 -0600 message: update lava_test_shell docs for new YAML format modified: doc/lava_test_shell.rst --- 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/lava_test_shell.rst' --- doc/lava_test_shell.rst 2012-10-10 19:29:04 +0000 +++ doc/lava_test_shell.rst 2012-11-09 16:36:56 +0000 @@ -10,15 +10,16 @@ :: - { - "format": "Lava-Test Test Definition 1.0", - "test_id": "pass_fail" - "run": { - "steps": ["echo test-1: pass", "echo test-2: fail"] - "parse": { - "pattern": "(?P.*-*):\\s+(?P(pass|fail))" - } - } + metadata: + format: Lava-Test Test Definition 1.0 + name: passfail + + run: + steps: + - echo "test-1: pass" + - echo "test-2: fail" + + pattern: "(?P.*-*):\\s+(?P(pass|fail))" The main thing to note is that the parse pattern requires regex expressions like \\s to be escaped, so it must be \\\\s @@ -29,9 +30,10 @@ If your test requires some packages to be installed before its run it can express that in the ``install`` section with:: - "install": { - "deps": ["linux-libc-dev", "build-essential"] - }, + install: + deps: + - linux-libc-dev + - build-essential Adding Git/BZR Repositories =========================== @@ -39,13 +41,16 @@ If your test needs code from a shared repository, the action can clone this data on your behalf with:: - "install": { - "bzr-repos": ["lp:lava-test"], - "git-repos": ["git://git.linaro.org/people/davelong/lt_ti_lava.git"] - }, - "run": { - "steps": ["cd lt_ti_lava", "echo now in the git cloned directory"] - } + install: + bzr-repos: + - lp:lava-test + git-repos: + - git://git.linaro.org/people/davelong/lt_ti_lava.git + + run: + steps: + - cd lt_ti_lava + - echo "now in the git cloned directory" This repository information will also be added to resulting bundle's software context when the results are submitted to the LAVA dashboard. @@ -57,10 +62,13 @@ work if needed. For example if you needed to build some code from a git repo you could do:: - "install": { - "git-repos": ["git://git.linaro.org/people/davelong/lt_ti_lava.git"], - "steps": ["cd lt_ti_lava", "make"] - }, + install: + git-repos: + - git://git.linaro.org/people/davelong/lt_ti_lava.git + + steps: + - cd lt_ti_lava + - make **NOTE:** The repo steps are done in the dispatcher itself. The install steps are run directly on the target. @@ -72,10 +80,8 @@ in the required pass/fail/skip/unknown format required by LAVA. The parse section has a fixup mechanism that can help:: - "parse": { - "pattern": "(?P.*-*)\\s+:\\s+(?P(PASS|FAIL))", - "fixupdict": { - "PASS": "pass", - "FAIL": "fail" - } - } + parse: + pattern: "(?P.*-*)\\s+:\\s+(?P(PASS|FAIL))" + fixupdict: + PASS: pass + FAIL: fail