From patchwork Fri Feb 19 10:31:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Morton X-Patchwork-Id: 8359301 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CEB6D9F38B for ; Fri, 19 Feb 2016 10:31:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04BC8203AB for ; Fri, 19 Feb 2016 10:31:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0FFCC2034F for ; Fri, 19 Feb 2016 10:31:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5942E6EEAC; Fri, 19 Feb 2016 10:31:41 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 41FC06EEAC for ; Fri, 19 Feb 2016 10:31:40 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 19 Feb 2016 02:31:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,470,1449561600"; d="scan'208";a="906725200" Received: from djmorton-linux2.isw.intel.com ([10.102.226.90]) by fmsmga001.fm.intel.com with ESMTP; 19 Feb 2016 02:31:38 -0800 From: Derek Morton To: intel-gfx@lists.freedesktop.org Date: Fri, 19 Feb 2016 10:31:31 +0000 Message-Id: <1455877891-25291-1-git-send-email-derek.j.morton@intel.com> X-Mailer: git-send-email 1.9.1 Cc: daniel.vetter@ffwll.ch Subject: [Intel-gfx] [PATCH i-g-t] lib/igt_core.c: Add partial match functionality to run-subtests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the ability to specify a substring of the subtest using --run-subtests. This allows 'string' to be used as an abbreviation of the wildcard expression '*string*' when defining which subtests should run. Signed-off-by: Derek Morton --- lib/igt_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 8e0bd2e..1e31a25 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -215,7 +215,7 @@ * description of allowed wildcard expressions. * Some examples of allowed wildcard expressions are: * - * - '*basic*' match any subtest containing basic + * - '*basic*' match any subtest containing basic. This expression may be abbreviated to just 'basic'. * - 'basic-???' match any subtest named basic- with 3 characters after - * - 'basic-[0-9]' match any subtest named basic- with a single number after - * - 'basic-[^0-9]' match any subtest named basic- with a single non numerical character after - @@ -827,7 +827,8 @@ bool __igt_run_subtest(const char *subtest_name) } if (run_single_subtest) { - if (uwildmat(subtest_name, run_single_subtest) == 0) + if ((uwildmat(subtest_name, run_single_subtest) == 0) && + (NULL == strstr(subtest_name, run_single_subtest))) return false; else run_single_subtest_found = true;