From patchwork Wed Sep 16 14:26:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 7195801 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 4FF5E9F32B for ; Wed, 16 Sep 2015 14:35:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B7B320445 for ; Wed, 16 Sep 2015 14:35:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0703620443 for ; Wed, 16 Sep 2015 14:35:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 441926EB56; Wed, 16 Sep 2015 07:35:50 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id E20196EB56 for ; Wed, 16 Sep 2015 07:35:48 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 16 Sep 2015 07:35:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,539,1437462000"; d="scan'208";a="806446828" Received: from otc-vmt1.isw.intel.com ([10.237.224.80]) by fmsmga002.fm.intel.com with ESMTP; 16 Sep 2015 07:35:47 -0700 From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Sep 2015 15:26:24 +0100 Message-Id: <1442413584-4845-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.1 Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Subject: [Intel-gfx] [PATCH i-g-t] lib: allow wildcard matching when specifying 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, T_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 This allows multiple subtests to be specified using standard wildcard characters when using the --run-subtest command line option. Signed-off-by: Thomas Wood --- lib/igt_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 129476c..59127ca 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -56,6 +56,7 @@ #include #include #include +#include #include "drmtest.h" #include "intel_chipset.h" @@ -771,7 +772,7 @@ bool __igt_run_subtest(const char *subtest_name) } if (run_single_subtest) { - if (strcmp(subtest_name, run_single_subtest) != 0) + if (fnmatch(run_single_subtest, subtest_name, 0) != 0) return false; else run_single_subtest_found = true;