From patchwork Wed May 9 02:01:10 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: 8481 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 3A3C223E49 for ; Wed, 9 May 2012 02:01:14 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id DD24FA184BA for ; Wed, 9 May 2012 02:01:13 +0000 (UTC) Received: by yenq6 with SMTP id q6so1366865yen.11 for ; Tue, 08 May 2012 19:01: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=NpO83NythUC+FfQdKXKOVduBCx/vAwWIBJ05c4FAtB8=; b=RJZEyUfS48Wke68tgL44/PUgrHu7I3NsjWBAyOH03Acwje9/+wDl/rkSTnudhzj4XS C0wtUPV43FAaF3FDQ7EGsLbs1tymftqO2QkHJVDUOdcF2kfLFR1zT5DkqDp8w09K/a6O yHwlCkQUp6A5LAU74Idw7guT52xM4M6On1ywOWwAkPdXDglADe92/vc68mTVB+eB1yIW WJVHBIzgAm3NYRHkEdT5ptc+nmY8kV63yBkkVn75BwOFXN/roKLcX73Ju+O8SwBtIGjE dF0Hbq6pVVCdr/PK9bvt1JjmQkdskXVdWqd2+UUyeJLZ9d2ZjlObwvnYy+MdgdGARy5f wRhQ== Received: by 10.50.220.136 with SMTP id pw8mr12269275igc.1.1336528873035; Tue, 08 May 2012 19:01:13 -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.73.147 with SMTP id q19csp240797ibj; Tue, 8 May 2012 19:01:11 -0700 (PDT) Received: by 10.180.90.233 with SMTP id bz9mr11674494wib.21.1336528871225; Tue, 08 May 2012 19:01:11 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id d62si1324796wem.41.2012.05.08.19.01.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 May 2012 19:01:11 -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 1SRwDG-0007pL-Hd for ; Wed, 09 May 2012 02:01:10 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 75FB0E0520 for ; Wed, 9 May 2012 02:01: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: 283 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 283: tags support in the dispatcher (Rafael Martins) Message-Id: <20120509020110.22018.90595.launchpad@ackee.canonical.com> Date: Wed, 09 May 2012 02:01: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="15213"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 7ca808592bd374e7e0acd1a006089f462cd71880 X-Gm-Message-State: ALoCoQnKnCuQLLZEXbVCNySmkW+EU06g6/I5qbd1Phm4McrPoF64WnzjFjV0ZVRi3avyRbS3Gz7x Merge authors: Rafael Martins (rafaelmartins) Related merge proposals: https://code.launchpad.net/~rafaelmartins/lava-dispatcher/lava-dispatcher/+merge/105108 proposed by: Rafael Martins (rafaelmartins) review: Needs Fixing - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 283 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Wed 2012-05-09 13:59:35 +1200 message: tags support in the dispatcher (Rafael Martins) modified: lava_dispatcher/actions/launch_control.py lava_dispatcher/job.py lava_dispatcher/test_data.py setup.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/actions/launch_control.py' --- lava_dispatcher/actions/launch_control.py 2012-03-08 22:29:23 +0000 +++ lava_dispatcher/actions/launch_control.py 2012-05-08 18:05:52 +0000 @@ -159,7 +159,7 @@ if not all_bundles: main_bundle = { "test_runs": [], - "format": "Dashboard Bundle Format 1.2" + "format": "Dashboard Bundle Format 1.3" } else: main_bundle = all_bundles.pop(0) === modified file 'lava_dispatcher/job.py' --- lava_dispatcher/job.py 2012-03-15 23:16:06 +0000 +++ lava_dispatcher/job.py 2012-05-08 22:03:24 +0000 @@ -79,7 +79,13 @@ 'enum': ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"], 'optional': True, }, - }, + 'tags': { + 'type': 'array', + 'uniqueItems': True, + 'items': {'type': 'string'}, + 'optional': True, + }, + }, } @@ -110,6 +116,10 @@ return self.job_data['target'] @property + def tags(self): + return self.job_data.get('tags', []) + + @property def logging_level(self): try: return self.job_data['logging_level'] @@ -133,6 +143,8 @@ if 'device_type' in self.job_data: metadata['target.device_type'] = self.job_data['device_type'] self.context.test_data.add_metadata(metadata) + + self.context.test_data.add_tags(self.tags) try: for cmd in self.job_data['actions']: === modified file 'lava_dispatcher/test_data.py' --- lava_dispatcher/test_data.py 2011-11-11 14:47:22 +0000 +++ lava_dispatcher/test_data.py 2012-05-08 18:05:52 +0000 @@ -26,7 +26,7 @@ def __init__(self, test_id='lava'): self.job_status = 'pass' self.metadata = {} - self._test_run = { 'test_results':[], 'attachments':[] } + self._test_run = { 'test_results':[], 'attachments':[], 'tags':[] } self._test_run['test_id'] = test_id self._assign_date() self._assign_uuid() @@ -51,6 +51,13 @@ def add_attachment(self, attachment): self._test_run['attachments'].append(attachment) + def add_tag(self, tag): + self._test_run['tags'].append(tag) + + def add_tags(self, tags): + for tag in tags: + self.add_tag(tag) + def add_metadata(self, metadata): self.metadata.update(metadata) === modified file 'setup.py' --- setup.py 2012-03-22 18:22:14 +0000 +++ setup.py 2012-05-08 22:06:32 +0000 @@ -26,7 +26,7 @@ ], }, install_requires=[ - "json-schema-validator", + "json-schema-validator >= 2.3", "lava-tool >= 0.4", "lava-utils-interface", "pexpect >= 2.3",