From patchwork Wed Apr 11 02:00:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spring Zhang X-Patchwork-Id: 7732 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 4CB2523E20 for ; Wed, 11 Apr 2012 02:00:20 +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 CA1EBA18152 for ; Wed, 11 Apr 2012 02:00:19 +0000 (UTC) Received: by iage36 with SMTP id e36so860914iag.11 for ; Tue, 10 Apr 2012 19:00:19 -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=VVZQ9N2SAklbgoiR+nG/FG6/o2MrGAHWFyuw6QNQDhs=; b=CM/759ktOVaoSUcpW/CDI4JPjDhlyT04Ox/e4VkvQ4aSMUXccHD2mP5+rm1RE3PCuE xaLRtn6SbCNx9wVQ13BidEH0V1K0wGZ+g02ouHQ+w7E4XNKEv17DvfoaiMoChozlQW9X WX2cbTvrUhlak3wi86HOcWeuw70NzaWzalKc2e2LJbhwOzO+qZcrgZ5noFfS0YLnizC1 3a+WSHL2VlkBjQaiwBr4e2jBkft6rEd2J4kNYXZywbFLup7VNEyF3B2ai/su32rZIvtv +VWa+N1sXC9FoR/1K9mw9KEQkX7D+b6Vi5kOrgNb4FM9puP4ImnnSv12u0TEZ5qZiVOY 0WYg== Received: by 10.50.156.229 with SMTP id wh5mr665857igb.28.1334109619158; Tue, 10 Apr 2012 19:00:19 -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 f25csp41497iby; Tue, 10 Apr 2012 19:00:18 -0700 (PDT) Received: by 10.180.89.130 with SMTP id bo2mr11881387wib.17.1334109617329; Tue, 10 Apr 2012 19:00:17 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id u18si1053441weq.5.2012.04.10.19.00.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 19:00:17 -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 1SHmr2-00017p-Lp for ; Wed, 11 Apr 2012 02:00:16 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 94EAEE025F for ; Wed, 11 Apr 2012 02:00:16 +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: 142 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-test/trunk] Rev 142: Add tjbench test cases Message-Id: <20120411020016.32224.13423.launchpad@ackee.canonical.com> Date: Wed, 11 Apr 2012 02:00:16 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="15070"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 27f0fdaf65856447851c58f86eb73e2fca4b59a2 X-Gm-Message-State: ALoCoQlyzb+vfuqCYCRcZqDHvq5/QGJu1n7dvOU7QaLLGSzwI71I/GOZqxTkSbPEPmSvosu1+3AV Merge authors: Spring Zhang (qzhang) Related merge proposals: https://code.launchpad.net/~qzhang/lava-test/add-libjpeg-turbo/+merge/81205 proposed by: Spring Zhang (qzhang) review: Approve - Spring Zhang (qzhang) review: Needs Fixing - Paul Larson (pwlars) ------------------------------------------------------------ revno: 142 [merge] committer: Spring Zhang branch nick: lava-test timestamp: Wed 2012-04-11 09:57:50 +0800 message: Add tjbench test cases added: lava_test/test_definitions/tjbench.py modified: 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 'lava_test/core/providers.py' --- lava_test/core/providers.py 2012-04-04 08:36:39 +0000 +++ lava_test/core/providers.py 2012-04-11 01:57:50 +0000 @@ -48,6 +48,7 @@ 'smem', 'stream', 'tiobench', + 'tjbench', 'x11perf', 'xrestop', 'wifi_enablement', === added file 'lava_test/test_definitions/tjbench.py' --- lava_test/test_definitions/tjbench.py 1970-01-01 00:00:00 +0000 +++ lava_test/test_definitions/tjbench.py 2012-04-06 15:05:11 +0000 @@ -0,0 +1,78 @@ +# Copyright (c) 2010, 2011 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 . +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 + +ppm="nightshot_iso_100.ppm" +URL_ppm="http://people.linaro.org/~qzhang/streams/nightshot_iso_100.ppm" + +# 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'] +DEFAULT_OPTIONS ="" +RUNSTEPS = ['./tjbench/tjbench.sh %s' % ppm] + +class TjbenchParser(TestParser): + def parse(self, artifacts): + filename = artifacts.stdout_pathname + pat = re.compile(self.pattern) + tc_id = None + # Add scale_half prefix or not, the first cmd is half scale, but it's + # somewhat hard coded + scale_half = {} + with open(filename, 'r') as fd: + for line in fd.readlines(): + match = pat.search(line) + if match: + match_results = match.groupdict() + format = match_results.pop('format') + bitorder = match_results.pop('bitorder') + subsamp = match_results.pop('subsamp') + qual = match_results.pop('qual') + + test_case_id_prefix = '%s_%s_%s_%s' % (format, bitorder, + subsamp, qual) + if not scale_half.get(test_case_id_prefix): + scale_half[test_case_id_prefix] = True + test_case_id_prefix = "%s_%s" % ( + test_case_id_prefix, "scale_half") + + for perf in ['comp_perf', 'comp_ratio', 'dcomp_perf']: + results = { } + results["log_filename"] = filename + results['test_case_id'] = '%s-%s' % ( + test_case_id_prefix, perf) + results['measurement'] = match_results.pop(perf) + if perf == 'comp_ratio': + results['units'] = '%' + else: + results['units'] = 'Mpixels/s' + self.results['test_results'].append( + self.analyze_test_result(results)) + +#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_run = TestRunner(RUNSTEPS, default_options=DEFAULT_OPTIONS) +tjbench_parser = TjbenchParser(PATTERN, appendall={'result':'pass'}) +testobj = Test(test_id="tjbench", + installer=tjbench_inst, runner=tjbench_run, parser=tjbench_parser)