From patchwork Thu Sep 20 05:51:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 11522 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 2568024112 for ; Thu, 20 Sep 2012 05:51: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 DD4ACA183E5 for ; Thu, 20 Sep 2012 05:51:15 +0000 (UTC) Received: by ieje10 with SMTP id e10so2338565iej.11 for ; Wed, 19 Sep 2012 22:51:15 -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=IC9Ze6WnFDNugYuQR7DQ0++0o3rAEJCdV0Woc2Hu3gc=; b=K+LcVeVWdQNDRdyVF5+Bd3rYWL3zvEqYFIJB/IBV08biT/q6YicGUR0MdsftTukmyv 9y4fJCB7AqTj9yZe8/rnNkT1d97aedvk7RIC12eJ0QhukPPFYWZTALUWI8UVWX1s0tQ1 o25c7Q29I8h6E6A0b72GcJ/d1LGIvetkJsCoswuEIveNHhN5panNDGRAb8X0IcJTmA+R YWP6uij3gHn0qzeHQoiTX2unsKWZosSZjjYb+oM0NFlNVKMPToUAl7T5BPqecxjzV+so qZvDvTGF1ssl7U6FExNhhtjqkGyYATeZjYJeFsSkMOMHTHa5zKpi3PTWnMYgIyVhdM9I os9Q== Received: by 10.42.109.194 with SMTP id m2mr553993icp.48.1348120275323; Wed, 19 Sep 2012 22:51:15 -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.50.184.232 with SMTP id ex8csp59352igc; Wed, 19 Sep 2012 22:51:14 -0700 (PDT) Received: by 10.180.95.193 with SMTP id dm1mr3441212wib.10.1348120273198; Wed, 19 Sep 2012 22:51:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id u10si46083013wix.1.2012.09.19.22.51.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Sep 2012 22:51:13 -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 1TEZfM-0000TW-C8 for ; Thu, 20 Sep 2012 05:51:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 49199E22AB for ; Thu, 20 Sep 2012 05:51:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-test X-Launchpad-Branch: ~linaro-validation/lava-test/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 174 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-test/trunk] Rev 174: Allow tests to pass VCS information into the software context Message-Id: <20120920055112.7976.68684.launchpad@ackee.canonical.com> Date: Thu, 20 Sep 2012 05:51:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15985"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 7842471329af2fa2d0b5a8aaa8bcb4d180a88cf2 X-Gm-Message-State: ALoCoQkt0IG4Qs7J33cz39uBHZf/0LGRlmwdaWSAtOUn8Bcwn2P7OUNvC/HaNojWoCOG6EB7to8L Merge authors: Andy Doan (doanac) Related merge proposals: https://code.launchpad.net/~doanac/lava-test/software.sources-support-II/+merge/125282 proposed by: Andy Doan (doanac) review: Approve - Fathi Boudra (fboudra) review: Approve - Michael Hudson-Doyle (mwhudson) ------------------------------------------------------------ revno: 174 [merge] committer: Fathi Boudra branch nick: lava-test timestamp: Thu 2012-09-20 08:48:58 +0300 message: Allow tests to pass VCS information into the software context Add software sources support for BZR repos modified: lava_test/commands.py lava_test/core/artifacts.py lava_test/core/installers.py lava_test/core/swprofile.py lava_test/test_definitions/bluetooth_enablement.py lava_test/test_definitions/bootchart.py lava_test/test_definitions/e2eaudiotest.py lava_test/test_definitions/firefox.py lava_test/test_definitions/leb_basic_graphics.py lava_test/test_definitions/lt_ti_lava.py lava_test/test_definitions/ltp-snowball-tests.py lava_test/test_definitions/lttng.py lava_test/test_definitions/perf.py lava_test/test_definitions/pwrmgmt.py lava_test/test_definitions/tjbench.py lava_test/test_definitions/wifi_enablement.py lava_test/test_definitions/xrestop.py --- lp:lava-test https://code.launchpad.net/~linaro-validation/lava-test/trunk You are subscribed to branch lp:lava-test. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-test/trunk/+edit-subscription === modified file 'lava_test/commands.py' --- lava_test/commands.py 2012-03-19 19:24:05 +0000 +++ lava_test/commands.py 2012-09-19 04:40:25 +0000 @@ -289,7 +289,8 @@ self.args.skip_software_context, self.args.skip_hardware_context, self.args.trusted_time, - self.args.analyzer_assigned_uuid) + self.args.analyzer_assigned_uuid, + test) except ImportError as exc: msg_template = ( "Unable to probe for software context. Install the '%s'" === modified file 'lava_test/core/artifacts.py' --- lava_test/core/artifacts.py 2012-05-08 17:45:30 +0000 +++ lava_test/core/artifacts.py 2012-09-19 04:40:25 +0000 @@ -138,7 +138,8 @@ skip_software_context=False, skip_hardware_context=False, time_check_performed=False, - analyzer_assigned_uuid=None): + analyzer_assigned_uuid=None, + test=None): """ Create the bundle object. @@ -166,7 +167,8 @@ } # Store hardware and software context if requested if not skip_software_context: - test_run['software_context'] = swprofile.get_software_context() + test_run['software_context'] = swprofile.get_software_context( + test=test) if not skip_hardware_context: test_run['hardware_context'] = hwprofile.get_hardware_context() # Create the bundle object === modified file 'lava_test/core/installers.py' --- lava_test/core/installers.py 2012-05-22 01:21:13 +0000 +++ lava_test/core/installers.py 2012-09-19 17:11:20 +0000 @@ -15,10 +15,11 @@ import hashlib import os +import subprocess from lava_test.api.delegates import ITestInstaller from lava_test.extcmd import ExternalCommandWithDelegate -from lava_test.utils import geturl +from lava_test.utils import changed_directory, geturl class TestInstaller(ITestInstaller): @@ -40,12 +41,25 @@ :ivar md5: The md5sum to check the integrety of the download + + :ivar git_repos: + A list of git urls to clone for the test definition. These will be + cloned befre the install steps are executed for the test definition. + The repo information will then be included in the bundle's source data + + :ivar bzr_repos: + A list of git urls to clone for the test definition. These will be + cloned befre the install steps are executed for the test definition. + The repo information will then be included in the bundle's source data """ - def __init__(self, steps=None, deps=None, url=None, md5=None, **kwargs): + def __init__(self, steps=None, deps=None, url=None, md5=None, + git_repos=None, bzr_repos=None, **kwargs): self.steps = steps or [] self.deps = deps or [] self.url = url self.md5 = md5 + self.git_repos = git_repos + self.bzr_repos = bzr_repos def __repr__(self): return "<%s steps=%r deps=%r url=%r md5=%r>" % ( @@ -101,6 +115,110 @@ filename, checkmd5.hexdigest(), self.md5)) return filename + def _git_local(self, repo): + """ + convert git url into the local name, it git://foo.com/blah.git to blah + """ + return os.path.splitext(os.path.basename(repo))[0] + + def _git_clone(self, observer): + if not self.git_repos: + return + + for repo in self.git_repos: + if observer: + observer.about_to_download_file(repo) + + self._run_shell_cmd("git clone %s" % repo, observer) + + if not os.path.exists(self._git_local(repo)): + raise RuntimeError("Failed to clone %s" % repo) + if observer: + observer.did_download_file(repo) + + @staticmethod + def _git_source(testdir, dirname): + with changed_directory('%s/%s' % (testdir, dirname)): + commit_id = subprocess.check_output( + ['git', 'log', '-1', '--pretty=%H']).strip() + url = subprocess.check_output( + ['git', 'config', '--get', 'remote.origin.url']).strip() + return { + 'project_name': url.rsplit('/')[-1], + 'branch_vcs': 'git', + 'branch_revision': commit_id, + 'branch_url': url, + } + + def _git_sources(self, testdir): + """ + Pulls git information from the given local repositories and formats + them as needed by the software_context's "sources" attribute + """ + sources = [] + for d in self.git_repos: + d = self._git_local(d) + sources.append(self._git_source(testdir, d)) + return sources + + def _bzr_local(self, repo): + """ + convert bzr url into the local name, it lp:lava-test to lava-test + """ + repo = repo.replace('lp:', '') + return repo.split('/')[-1] + + @staticmethod + def _bzr_source(testdir, dirname): + with changed_directory('%s/%s' % (testdir, dirname)): + revno = subprocess.check_output( + ['bzr', 'log', '-r', '-1', '--log-format=line']).split(':')[0] + info = subprocess.check_output(['bzr', 'info']) + for line in info.split('\n'): + line = line.strip() + if line.startswith('parent branch:'): + url = line.split(':', 1)[-1] + return { + 'project_name': dirname, + 'branch_vcs': 'bzr', + 'branch_revision': revno, + 'branch_url': url, + } + + def _bzr_sources(self, testdir): + """ + Pulls bzr information from the given local repositories and formats + them as needed by the software_context's "sources" attribute + """ + sources = [] + for d in self.bzr_repos: + d = self._bzr_local(d) + sources.append(self._bzr_source(testdir, d)) + return sources + + def _bzr_branch(self, observer): + if not self.bzr_repos: + return + + for repo in self.bzr_repos: + if observer: + observer.about_to_download_file(repo) + + self._run_shell_cmd("bzr branch %s" % repo, observer) + + if not os.path.exists(self._bzr_local(repo)): + raise RuntimeError("Failed to clone %s" % repo) + if observer: + observer.did_download_file(repo) + + def get_software_sources(self, testdir): + sources = [] + if self.git_repos: + sources.extend(self._git_sources(testdir)) + if self.bzr_repos: + sources.extend(self._bzr_sources(testdir)) + return sources + def _runsteps(self, observer): for cmd in self.steps: self._run_shell_cmd(cmd, observer) @@ -108,4 +226,6 @@ def install(self, observer=None): self._installdeps(observer) self._download(observer) + self._git_clone(observer) + self._bzr_branch(observer) self._runsteps(observer) === modified file 'lava_test/core/swprofile.py' --- lava_test/core/swprofile.py 2012-03-08 18:28:18 +0000 +++ lava_test/core/swprofile.py 2012-09-19 04:40:25 +0000 @@ -38,7 +38,7 @@ return packages -def get_software_context(apt_cache=None, lsb_information=None): +def get_software_context(apt_cache=None, lsb_information=None, test=None): """ Return dict used for storing software_context information test_id - Unique identifier for this test @@ -50,6 +50,10 @@ software_context = {} software_context['image'] = get_image(lsb_information) software_context['packages'] = get_packages(apt_cache) + if test and test.installer: + sources = test.installer.get_software_sources(test.install_dir) + if sources: + software_context['sources'] = sources return software_context @@ -69,3 +73,4 @@ lsb_information = lsb_release.get_distro_information() name = lsb_information['DESCRIPTION'] return {"name": name} + === modified file 'lava_test/test_definitions/bluetooth_enablement.py' --- lava_test/test_definitions/bluetooth_enablement.py 2012-03-17 11:02:42 +0000 +++ lava_test/test_definitions/bluetooth_enablement.py 2012-09-19 17:11:20 +0000 @@ -31,18 +31,17 @@ from lava_test.core.tests import Test DEFAULT_OPTIONS = "" -INSTALLSTEPS = [( - "bzr branch lp:~linaro-foundations/linaro-ubuntu/lava-test-bt-enablement" - " bluetooth-enablement")] +BZR_REPOS = ["lp:~linaro-foundations/linaro-ubuntu/lava-test-bt-enablement"] +INSTALLSTEPS = [] DEPS = ["bzr", "bluez"] -RUNSTEPS = ["cd bluetooth-enablement; sudo bash -x ./run-test.sh"] +RUNSTEPS = ["cd lava-test-bt-enablement; sudo bash -x ./run-test.sh"] PATTERN = "(?P[a-zA-Z0-9_-]+):\s(?P\w+)" FIXUPS = { "PASS": "pass", "FAIL": "fail" } -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, fixupdict=FIXUPS) === modified file 'lava_test/test_definitions/bootchart.py' --- lava_test/test_definitions/bootchart.py 2012-03-08 19:22:09 +0000 +++ lava_test/test_definitions/bootchart.py 2012-09-19 17:11:20 +0000 @@ -29,12 +29,13 @@ from lava_test.core.tests import Test DEFAULT_OPTIONS = "" -INSTALLSTEPS = ['bzr branch lp:~linaro-foundations/lava-test/bootchartscript'] +BZR_REPOS = ['lp:~linaro-foundations/lava-test/bootchartscript'] +INSTALLSTEPS = [] DEPS = ['bootchart', 'pybootchartgui', 'bzr'] RUNSTEPS = ['./bootchartscript/bootchartscript.sh $(OPTIONS)'] PATTERN = "^(?P\w+):\W+(?P\d+\.\d+)" -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, appendall={'units': 'sec', 'result': 'pass'}) === modified file 'lava_test/test_definitions/e2eaudiotest.py' --- lava_test/test_definitions/e2eaudiotest.py 2012-02-24 18:39:28 +0000 +++ lava_test/test_definitions/e2eaudiotest.py 2012-09-19 04:40:25 +0000 @@ -20,13 +20,15 @@ **Default options:** None """ -INSTALLSTEPS = ['git clone git://git.linaro.org/people/kurt-r-taylor/e2eaudiotest.git'] +GIT_REPOS = ['git://git.linaro.org/people/kurt-r-taylor/e2eaudiotest.git'] + +INSTALLSTEPS = ['cd e2eaudiotest; gcc testfreq.c utils_alsa.c -lasound -lfftw3 -o testfreq '] DEPS = ['git-core', 'libasound2-dev', 'libfftw3-dev', 'gcc'] DEFAULT_OPTIONS = "" -RUNSTEPS = ['cd e2eaudiotest; gcc testfreq.c utils_alsa.c -lasound -lfftw3 -o testfreq ; ./e2eaudiotest.sh'] +RUNSTEPS = ['cd e2eaudiotest; ./e2eaudiotest.sh'] PATTERN = "^(?P\w+):\W+(?P\w+)\W+(?P\d+)\W+sinewave" -e2einst = TestInstaller(INSTALLSTEPS, deps=DEPS) +e2einst = TestInstaller(INSTALLSTEPS, deps=DEPS, git_repos=GIT_REPOS) e2erun = TestRunner(RUNSTEPS,default_options=DEFAULT_OPTIONS) e2eparser = TestParser(PATTERN, appendall={'units':'Hz'}) === modified file 'lava_test/test_definitions/firefox.py' --- lava_test/test_definitions/firefox.py 2012-03-08 19:22:11 +0000 +++ lava_test/test_definitions/firefox.py 2012-09-19 04:40:25 +0000 @@ -27,14 +27,16 @@ from lava_test.core.tests import Test DEFAULT_OPTIONS = "" -INSTALLSTEPS = ['git clone git://github.com/janimo/firefox-startup-timing.git'] + +GIT_REPOS = ['git://github.com/janimo/firefox-startup-timing.git'] +INSTALLSTEPS = [] DEPS = ['firefox', 'git-core', 'gcalctool'] RUNSTEPS = [( 'cd firefox-startup-timing;' ' ./firefox_startup_timing.sh $(OPTIONS)')] PATTERN = "^(?P\w+):(?P\d+)" -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, git_repos=GIT_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, appendall={'units': 'ms', 'result': 'pass'}) === modified file 'lava_test/test_definitions/leb_basic_graphics.py' --- lava_test/test_definitions/leb_basic_graphics.py 2012-03-17 11:02:42 +0000 +++ lava_test/test_definitions/leb_basic_graphics.py 2012-09-19 17:11:20 +0000 @@ -30,19 +30,17 @@ from lava_test.core.tests import Test DEFAULT_OPTIONS = "" -INSTALLSTEPS = [ - ("bzr branch" - " lp:~linaro-foundations/linaro-ubuntu/lava-test-basic-graphics" - " leb-basic-graphics")] +BZR_REPOS = ["lp:~linaro-foundations/linaro-ubuntu/lava-test-basic-graphics"] +INSTALLSTEPS = [] DEPS = ["bzr", "mesa-utils-extra", "ubuntu-desktop"] -RUNSTEPS = ["cd leb-basic-graphics; sudo bash -x ./run-test.sh"] +RUNSTEPS = ["cd lava-test-basic-graphics; sudo bash -x ./run-test.sh"] PATTERN = "(?P[a-zA-Z0-9_-]+):\s(?P\w+)" FIXUPS = { "PASS": "pass", "FAIL": "fail" } -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, fixupdict=FIXUPS) === modified file 'lava_test/test_definitions/lt_ti_lava.py' --- lava_test/test_definitions/lt_ti_lava.py 2012-09-11 14:50:43 +0000 +++ lava_test/test_definitions/lt_ti_lava.py 2012-09-19 04:40:25 +0000 @@ -29,8 +29,9 @@ # Continue the test run in case of failures DEFAULT_OPTIONS = "-k" -INSTALLSTEPS = ['git clone git://git.linaro.org/people/davelong/lt_ti_lava.git', - 'cd lt_ti_lava && make -C utils'] +GIT_REPOS = ['git://git.linaro.org/people/davelong/lt_ti_lava.git'] + +INSTALLSTEPS = ['cd lt_ti_lava && make -C utils'] RUNSTEPS = ['cd lt_ti_lava && make $(OPTIONS) check'] DEPS = ['git-core', 'linux-libc-dev', 'build-essential'] @@ -51,7 +52,7 @@ "\.\.\.\s+" "(?P\w+)") -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, git_repos=GIT_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN) === modified file 'lava_test/test_definitions/ltp-snowball-tests.py' --- lava_test/test_definitions/ltp-snowball-tests.py 2012-05-31 07:27:20 +0000 +++ lava_test/test_definitions/ltp-snowball-tests.py 2012-09-19 04:40:25 +0000 @@ -28,8 +28,8 @@ from lava_test.core.runners import TestRunner from lava_test.core.tests import Test -INSTALLSTEPS = ['git clone git://igloocommunity.org/git/testing/snowball-ltp-tests.git', - 'cd snowball-ltp-tests; make config; make tests; make install'] +GIT_REPOS = ['git://igloocommunity.org/git/testing/snowball-ltp-tests.git'] +INSTALLSTEPS = ['cd snowball-ltp-tests; make config; make tests; make install'] DEPS = ['git-core', 'make', 'build-essential'] @@ -69,7 +69,7 @@ self.results['test_results'].append( self.analyze_test_result(results)) -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, git_repos=GIT_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = LTPParser(PATTERN, fixupdict=FIXUPS) === modified file 'lava_test/test_definitions/lttng.py' --- lava_test/test_definitions/lttng.py 2012-03-08 19:22:23 +0000 +++ lava_test/test_definitions/lttng.py 2012-09-19 17:11:20 +0000 @@ -28,14 +28,13 @@ DEFAULT_OPTIONS = "" -INSTALLSTEPS = [ - "apt-get build-dep lttng-tools --yes", - "bzr branch lp:~linaro-foundations/linaro-ubuntu/lava-test-lttng"] +BZR_REPOS=["lp:~linaro-foundations/linaro-ubuntu/lava-test-lttng"] +INSTALLSTEPS = ["apt-get build-dep lttng-tools --yes"] DEPS = ["bzr", "linux-headers-$(uname -r)", "lttng-modules-dkms"] RUNSTEPS = ["cd lava-test-lttng; sudo bash -x ./run-test.sh"] PATTERN = "^(?P[\w:()]+)\s+\-\s+(?P\w+$)" -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN) === modified file 'lava_test/test_definitions/perf.py' --- lava_test/test_definitions/perf.py 2012-06-26 08:28:32 +0000 +++ lava_test/test_definitions/perf.py 2012-09-19 17:11:20 +0000 @@ -29,7 +29,8 @@ DEFAULT_OPTIONS = "" DEPS = ["bzr", "linux-tools", "stress-dbgsym"] -INSTALLSTEPS = ["bzr branch lp:~linaro-maintainers/lava-test/lava-test-perf"] +BZR_REPOS = ["lp:~linaro-maintainers/lava-test/lava-test-perf"] +INSTALLSTEPS = [] RUNSTEPS = ["./lava-test-perf/run-perf-test.sh"] PATTERN = "^(?Pperf[\w\s-]+)\s+:\s+(?P\w+)" FIXUPS = { @@ -37,7 +38,7 @@ "FAIL": "fail" } -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, fixupdict=FIXUPS) === modified file 'lava_test/test_definitions/pwrmgmt.py' --- lava_test/test_definitions/pwrmgmt.py 2012-06-24 02:01:37 +0000 +++ lava_test/test_definitions/pwrmgmt.py 2012-09-19 04:40:25 +0000 @@ -29,8 +29,8 @@ # Continue the test run in case of failures DEFAULT_OPTIONS = "-k" -INSTALLSTEPS = ['git clone git://git.linaro.org/tools/pm-qa.git', - 'cd pm-qa && make -C utils'] +GIT_REPOS = ['git://git.linaro.org/tools/pm-qa.git'] +INSTALLSTEPS = ['cd pm-qa && make -C utils'] RUNSTEPS = ['cd pm-qa && make $(OPTIONS) check'] DEPS = ['git-core', 'linux-libc-dev', 'build-essential'] @@ -55,7 +55,7 @@ "\.\.\.\s+" "(?P\w+)") -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, git_repos=GIT_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, appendall={'result': 'pass'}) === modified file 'lava_test/test_definitions/tjbench.py' --- lava_test/test_definitions/tjbench.py 2012-04-06 15:05:11 +0000 +++ lava_test/test_definitions/tjbench.py 2012-09-19 17:11:20 +0000 @@ -22,11 +22,12 @@ ppm="nightshot_iso_100.ppm" URL_ppm="http://people.linaro.org/~qzhang/streams/nightshot_iso_100.ppm" +BZR_REPOS = ['lp:~qzhang/libjpeg-turbo/tjbench'] + # For the url is from wiki, its name will be saved as with some extra characters # so it doesn't pass as parameter but use a separate install step. -INSTALLSTEPS = ['wget --no-check-certificate -q "%s" -O %s' % (URL_ppm, ppm), - 'bzr branch lp:~qzhang/libjpeg-turbo/tjbench'] -DEPS = ['libjpeg-turbo-progs', 'libjpeg-turbo62', 'wget'] +INSTALLSTEPS = ['wget --no-check-certificate -q "%s" -O %s' % (URL_ppm, ppm)] +DEPS = ['bzr', 'libjpeg-turbo-progs', 'libjpeg-turbo62', 'wget'] DEFAULT_OPTIONS ="" RUNSTEPS = ['./tjbench/tjbench.sh %s' % ppm] @@ -71,7 +72,7 @@ #RGB TD 4:2:0 95 3136 2352 19.45 15.53 23.30 PATTERN = "^(?P\S+)\s+(?P\w+)\s+(?P[:\w]+)\s+(?P\d+)\s+\d+\s+\d+\s+(?P\d+\.\d+)\s+(?P\d+\.\d+)\s+(?P\d+\.\d+)" -tjbench_inst = TestInstaller(INSTALLSTEPS, deps=DEPS, url=None) +tjbench_inst = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) tjbench_run = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) tjbench_parser = TjbenchParser(PATTERN, appendall={'result':'pass'}) testobj = Test(test_id="tjbench", === modified file 'lava_test/test_definitions/wifi_enablement.py' --- lava_test/test_definitions/wifi_enablement.py 2012-03-17 11:02:42 +0000 +++ lava_test/test_definitions/wifi_enablement.py 2012-09-19 17:11:20 +0000 @@ -31,24 +31,22 @@ from lava_test.core.tests import Test DEFAULT_OPTIONS = "" -INSTALLSTEPS = [( - "bzr branch" - " lp:~linaro-foundations/linaro-ubuntu/lava-test-wifi-enablement" - " wifi-enablement")] +BZR_REPOS = ["lp:~linaro-foundations/linaro-ubuntu/lava-test-wifi-enablement"] +INSTALLSTEPS = [] DEPS = [ "bzr", "wpasupplicant", "isc-dhcp-client", "wireless-tools", "net-tools"] -RUNSTEPS = ["cd wifi-enablement; sudo bash -x ./run-test.sh"] +RUNSTEPS = ["cd lava-test-wifi-enablement; sudo bash -x ./run-test.sh"] PATTERN = "(?P[a-zA-Z0-9_-]+):\s(?P\w+)" FIXUPS = { "PASS": "pass", "FAIL": "fail" } -installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +installer = TestInstaller(INSTALLSTEPS, deps=DEPS, bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, fixupdict=FIXUPS) === modified file 'lava_test/test_definitions/xrestop.py' --- lava_test/test_definitions/xrestop.py 2012-03-17 11:02:42 +0000 +++ lava_test/test_definitions/xrestop.py 2012-09-19 17:11:20 +0000 @@ -16,7 +16,7 @@ """ xrestop - test for X11 server resource usage monitor -**URL:** None +**URL:** http://code.launchpad.net/~linaro-foundations/lava-test/xrestopscript **Default options:** None """ @@ -26,12 +26,13 @@ from lava_test.core.runners import TestRunner from lava_test.core.tests import Test -INSTALLSTEPS = ['bzr branch lp:~linaro-foundations/lava-test/xrestopscript'] +BZR_REPOS = ['lp:~linaro-foundations/lava-test/xrestopscript'] +INSTALLSTEPS = [] RUNSTEPS = ["./xrestopscript/xrestop.sh $(OPTIONS)"] PATTERN = "^(?P\w+):\W+(?P\d+)" DEFAULT_OPTIONS = "" -installer = TestInstaller(INSTALLSTEPS, deps=["xrestop"]) +installer = TestInstaller(INSTALLSTEPS, deps=["xrestop"], bzr_repos=BZR_REPOS) runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) parser = TestParser(PATTERN, appendall={'units': 'KB', 'result': 'pass'})