From patchwork Tue Jan 17 15:46:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 6270 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 6FA2C23E13 for ; Tue, 17 Jan 2012 15:46:15 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 538A8A18174 for ; Tue, 17 Jan 2012 15:46:15 +0000 (UTC) Received: by bkbzt4 with SMTP id zt4so1847463bkb.11 for ; Tue, 17 Jan 2012 07:46:15 -0800 (PST) Received: by 10.204.41.143 with SMTP id o15mr7004068bke.63.1326815175021; Tue, 17 Jan 2012 07:46:15 -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.205.82.144 with SMTP id ac16cs122472bkc; Tue, 17 Jan 2012 07:46:14 -0800 (PST) Received: by 10.180.87.100 with SMTP id w4mr3098468wiz.13.1326815173590; Tue, 17 Jan 2012 07:46:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id gt6si12502151wib.37.2012.01.17.07.46.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jan 2012 07:46:13 -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 1RnBEj-0001Pp-Cj for ; Tue, 17 Jan 2012 15:46:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 5261BE143E for ; Tue, 17 Jan 2012 15:46:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 188 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 188: Main: If benchmark list contains only option-setting descriptions, add the default benchmarks. Message-Id: <20120117154613.4137.60598.launchpad@ackee.canonical.com> Date: Tue, 17 Jan 2012 15:46:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14676"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 5dec0569a06fce4feb33b5f4aa3cf8e30810d28c ------------------------------------------------------------ revno: 188 committer: Alexandros Frantzis branch nick: trunk timestamp: Tue 2012-01-17 17:44:04 +0200 message: Main: If benchmark list contains only option-setting descriptions, add the default benchmarks. This allows easy access to the default benchmarks, while changing some option for all of them e.g. 'glmark2 -b :duration=3.0' modified: src/main.cpp --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === modified file 'src/main.cpp' --- src/main.cpp 2011-12-13 14:27:23 +0000 +++ src/main.cpp 2012-01-17 15:44:04 +0000 @@ -116,6 +116,21 @@ } } +static bool +benchmarks_contain_normal_scenes(vector &benchmarks) +{ + for (vector::const_iterator bench_iter = benchmarks.begin(); + bench_iter != benchmarks.end(); + bench_iter++) + { + const Benchmark *bench = *bench_iter; + if (!bench->scene().name().empty()) + return true; + } + + return false; +} + static void list_scenes() { @@ -300,7 +315,8 @@ add_custom_benchmarks(benchmarks); else if (!Options::benchmark_files.empty()) add_custom_benchmarks_from_files(benchmarks); - else + + if (!benchmarks_contain_normal_scenes(benchmarks)) add_default_benchmarks(benchmarks); Log::info("=======================================================\n");