From patchwork Wed Apr 4 14:01:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 7616 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 5F5EC23E4D for ; Wed, 4 Apr 2012 14:01:15 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id F1E20A18711 for ; Wed, 4 Apr 2012 14:01:14 +0000 (UTC) Received: by iage36 with SMTP id e36so478537iag.11 for ; Wed, 04 Apr 2012 07:01:14 -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=MeOqOIklTcf1I2mGYiNPMcMVVn90RIUOje/iL/AM25g=; b=SLSGsqn5DaaDc9WVuUch838WpPONMbYTuLe168wVun1XqnyDpgJFFpSm60772qmqoQ RZ5dP3rf3ZdPNfXuvxk6zsoiyQrWQ4wzcUJ71BwyKlYs0ov+mLQ5LKKEaNMCz878zxer AVb1AdOn+lO2h1bBC3BYVXbRRlK7uvGi8UX8dqHgZVRMu+i5hq+czr+Lz8hjPdHT5Bny RMUTxPT4e02iXUKiPdrzCu2geIQgUWB9EOQOdeZAFU/e67BfXqxkOHow4nH3d/K1XP4T t0AaaZooXBgpXyiwv9Co4IdoLsZ2RIG2RMkEGbWQgyIeBhenbIKE2pZiXRpGf6Yav4mX ydZQ== Received: by 10.50.156.229 with SMTP id wh5mr1673023igb.28.1333548074389; Wed, 04 Apr 2012 07:01:14 -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.164.217 with SMTP id f25csp41083iby; Wed, 4 Apr 2012 07:01:13 -0700 (PDT) Received: by 10.180.89.9 with SMTP id bk9mr5605895wib.11.1333548072896; Wed, 04 Apr 2012 07:01:12 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id x65si840547weq.85.2012.04.04.07.01.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Apr 2012 07:01:12 -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 1SFQlr-0002pg-J7 for ; Wed, 04 Apr 2012 14:01:11 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 8260CE0496 for ; Wed, 4 Apr 2012 14:01:11 +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: 141 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-test/trunk] Rev 141: Added Snowball LTP test cases Message-Id: <20120404140111.20346.63220.launchpad@ackee.canonical.com> Date: Wed, 04 Apr 2012 14:01:11 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15055"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 50743abb05f1a6d94a4a02fa520cd6ac4b11dff8 X-Gm-Message-State: ALoCoQlc3qLRJWBO0YnPtCaT9v6nVRcUv+e5TbhZopxQc619AlLPkCrRgYU9yDETf2LImgoUZHCz Merge authors: Le Chi Thu le.chi.thu@linaro.org Related merge proposals: https://code.launchpad.net/~le-chi-thu/lava-test/add-ltp-snowball-tests/+merge/100766 proposed by: Le Chi Thu (le-chi-thu) review: Approve - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 141 [merge] committer: Zygmunt Krynicki branch nick: trunk timestamp: Wed 2012-04-04 15:59:45 +0200 message: Added Snowball LTP test cases added: lava_test/test_definitions/ltp-snowball-tests.py modified: doc/tests.rst lava_test/core/providers.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 'doc/tests.rst' --- doc/tests.rst 2012-03-22 13:45:31 +0000 +++ doc/tests.rst 2012-04-04 08:36:39 +0000 @@ -17,6 +17,7 @@ * `insanity`_ * `leb-basic-graphics`_ * `ltp`_ + * `ltp-snowball-tests`_ * `lttng`_ * `peacekeeper`_ * `perf`_ @@ -74,6 +75,10 @@ +++ .. automodule:: lava_test.test_definitions.ltp +ltp-snowball-tests ++++ +.. automodule:: lava_test.test_definitions.ltp-snowball-tests + lttng +++++ .. automodule:: lava_test.test_definitions.lttng === modified file 'lava_test/core/providers.py' --- lava_test/core/providers.py 2012-03-22 13:45:31 +0000 +++ lava_test/core/providers.py 2012-04-04 08:36:39 +0000 @@ -38,6 +38,7 @@ 'gtkperf', 'leb_basic_graphics', 'ltp', + 'ltp-snowball-tests', 'lttng', 'peacekeeper', 'perf', === added file 'lava_test/test_definitions/ltp-snowball-tests.py' --- lava_test/test_definitions/ltp-snowball-tests.py 1970-01-01 00:00:00 +0000 +++ lava_test/test_definitions/ltp-snowball-tests.py 2012-04-04 10:19:07 +0000 @@ -0,0 +1,80 @@ +# Copyright (c) 2010-2012 Linaro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +""" +Snowball specific kernel tests using LTP test framework. + +**URL:** http://www.igloocommunity.org/gitweb/?p=testing/snowball-ltp-tests.git;a=summary + +**Default options:** dma +""" + +import re + +from lava_test.core.installers import TestInstaller +from lava_test.core.parsers import TestParser +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 tests; make install'] + +DEPS = ['git-core', 'make', 'build-essential'] + +RUNSTEPS = ['cd snowball-ltp-tests/build/opt/ltp && sudo ./runltp -q -p -f $(OPTIONS)'] + +DEFAULT_OPTIONS = "dma" + +PATTERN = ( + "^(?P\S+)" + "\s*(?P\d+)" + "\s*(?P\w+)" + "\s*:\s*(?P.+)") +FIXUPS = { + "TBROK": "fail", + "TCONF": "skip", + "TFAIL": "fail", + "TINFO": "unknown", + "TPASS": "pass", + "TWARN": "unknown"} + +class LTPParser(TestParser): + + def parse(self, artifacts): + filename = artifacts.stdout_pathname + pat = re.compile(self.pattern) + with open(filename, 'r') as fd: + for line in fd.readlines(): + match = pat.search(line) + if match: + results = match.groupdict() + subid = results.pop('subid') + #The .0 results in ltp are all TINFO, filtering them + #should help eliminate meaningless, duplicate results + if subid == '0': + continue + results['test_case_id'] += "." + subid + self.results['test_results'].append( + self.analyze_test_result(results)) + +installer = TestInstaller(INSTALLSTEPS, deps=DEPS) +runner = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) +parser = LTPParser(PATTERN, fixupdict=FIXUPS) + +testobj = Test( + test_id="ltp-snowball-tests", + installer=installer, + runner=runner, + parser=parser)