From patchwork Tue Aug 15 13:13:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130336 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64F2643070; Tue, 15 Aug 2023 15:13:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61A3443262; Tue, 15 Aug 2023 15:13:35 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 7EBA540F17; Tue, 15 Aug 2023 15:13:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692105212; x=1723641212; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xdo0l5GXS19yPeG8kdUUcbUABk11qat6WN2U/QjeZMI=; b=Uvn2rvSP5s89tmakAFOUAAqTLd1o6kh/rzc6rV8LjAhGrM4YxTu4LLwC tXyreT4wvCGrfQvX6x3NvM4uQZmfvFDhqX8yIruy/M3nhmB1X8OgA3bAx 42k8feYmhS2qu8weM66SGMWYV/V9qUy5397sEKbpREFIAfibYVyaGaADe SydslleFgib7XKmfhmYPgcld2AT5MOGwcMJX6cF3Tfyls8XEdvU7JBkom jWrVJFxhXhgHhbJCpNvWOZPRvgLY5CTQSJVK15c2EMEiYGaMgFRtK8h3+ YE9EXj7UwtjIORKCA5DGrFklNeGc+ZKqsay6V6KpOWTqW00389wIqbZHk Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="458623156" X-IronPort-AV: E=Sophos;i="6.01,174,1684825200"; d="scan'208";a="458623156" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2023 06:13:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="799189803" X-IronPort-AV: E=Sophos;i="6.01,174,1684825200"; d="scan'208";a="799189803" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by fmsmga008.fm.intel.com with ESMTP; 15 Aug 2023 06:13:29 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ci@dpdk.org, Bruce Richardson Subject: [PATCH v4 1/8] app/test: add new macros for various test types Date: Tue, 15 Aug 2023 14:13:13 +0100 Message-Id: <20230815131320.375088-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230815131320.375088-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230815131320.375088-1-bruce.richardson@intel.com> MIME-Version: 1.0 X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type. Signed-off-by: Bruce Richardson --- app/test/test.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/test/test.h b/app/test/test.h index 85f57efbc6..a91ded76af 100644 --- a/app/test/test.h +++ b/app/test/test.h @@ -190,7 +190,7 @@ struct test_command { void add_test_command(struct test_command *t); -/* Register a test function with its command string */ +/* Register a test function with its command string. Should not be used directly */ #define REGISTER_TEST_COMMAND(cmd, func) \ static struct test_command test_struct_##cmd = { \ .command = RTE_STR(cmd), \ @@ -201,4 +201,11 @@ void add_test_command(struct test_command *t); add_test_command(&test_struct_##cmd); \ } +/* Register a test function as a particular type. + * These can be used to build up test suites automatically + */ +#define REGISTER_FAST_TEST(cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) +#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND +#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND + #endif