From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D6A010E3CE for ; Tue, 24 Oct 2023 14:19:03 +0000 (UTC) Received: from linux.intel.com (maurocar-mobl2.ger.corp.intel.com [10.252.1.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id A1BE1580E5B for ; Tue, 24 Oct 2023 07:19:00 -0700 (PDT) Received: from maurocar by linux.intel.com with local (Exim 4.96.1) (envelope-from ) id 1qvIFF-000fqh-3D for igt-dev@lists.freedesktop.org; Tue, 24 Oct 2023 16:18:57 +0200 From: Mauro Carvalho Chehab To: igt-dev@lists.freedesktop.org Date: Tue, 24 Oct 2023 16:11:04 +0200 Message-ID: <20231024141855.160633-2-mauro.chehab@linux.intel.com> In-Reply-To: <20231024141855.160633-1-mauro.chehab@linux.intel.com> References: <20231024141855.160633-1-mauro.chehab@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t 1/7] runner: Normalize testlist entries that don't list subtests List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Petri Latvala As the syntax for "all subtests" and "test that doesn't have subtests" is the same, check the subtest listing when building the execution plan. Doing that makes it possible to still have "all subtests" in testlists (albeit not originally designed to support that) and enables blocklisting particular subtests. Signed-off-by: Petri Latvala Reviewed-by: Mauro Carvalho Chehab Cc: Arkadiusz Hiler Cc: Kamil Konieczny Cc: Juha-Pekka Heikkila Cc: Bhanuprakash Modem Cc: Ashutosh Dixit Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/149 --- runner/job_list.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/runner/job_list.c b/runner/job_list.c index e6ea836310fd..27cbb10bce56 100644 --- a/runner/job_list.c +++ b/runner/job_list.c @@ -230,8 +230,28 @@ static bool job_list_from_test_list(struct job_list *job_list, continue; if (sscanf(line, "igt@%ms", &binary) == 1) { - if ((delim = strchr(binary, '@')) != NULL) + if ((delim = strchr(binary, '@')) != NULL) { *delim++ = '\0'; + } else { + /* + * No subtests specified. Check + * whether the user means "all + * subtests" or if the test doesn't + * have any. + */ + if (entry.binary) { + /* First flush the entry we're building for multiple-mode */ + add_job_list_entry(job_list, entry.binary, entry.subtests, entry.subtest_count); + memset(&entry, 0, sizeof(entry)); + any = true; + } + + add_subtests(job_list, settings, binary, + &settings->include_regexes, + &settings->exclude_regexes); + any = true; + continue; + } if (!settings->multiple_mode) { char **subtests = NULL; -- 2.41.0