From patchwork Mon Aug 14 18:20:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 130291 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 167D743064; Mon, 14 Aug 2023 20:21:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FC11432B6; Mon, 14 Aug 2023 20:21:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 6F7ED40A8A; Mon, 14 Aug 2023 20:21:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692037275; x=1723573275; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xdo0l5GXS19yPeG8kdUUcbUABk11qat6WN2U/QjeZMI=; b=jdwwtulnHfir6qd/hpRuTleo5+WnBsf0Ejc6UEga8/w7Y0hdPNlKSzyr rlk1idHa91N6w9iUXgtYLggRK7RljeoqAYFna3g+ThQHB52vBxr1mjZUO /KeOahtxTSQJRcVrY8Puo8CbmjeFhu4Kg1+Q0DKnPGGSD+5W+BrI0f+F5 7v7vMyN8aoPnto5DvJzJsUSujUEsWjJGYcvJYzbiatU95f8vVqbcFIQAU 9RT6HJjmRDQS2ST0kR+qcBVervi7UFy1BA8sbAbYPmqU+IuCs/vC1thWi NMqq+DgKZPhbTOGS8mCZBDdrHU2uYbASdRly7SdY1Yk5GK+tpJrWN/htp A==; X-IronPort-AV: E=McAfee;i="6600,9927,10802"; a="375831099" X-IronPort-AV: E=Sophos;i="6.01,173,1684825200"; d="scan'208";a="375831099" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2023 11:21:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10802"; a="733545445" X-IronPort-AV: E=Sophos;i="6.01,173,1684825200"; d="scan'208";a="733545445" Received: from silpixa00401385.ir.intel.com ([10.237.214.14]) by orsmga002.jf.intel.com with ESMTP; 14 Aug 2023 11:21:13 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: ci@dpdk.org, Bruce Richardson Subject: [PATCH v3 1/8] app/test: add new macros for various test types Date: Mon, 14 Aug 2023 19:20:57 +0100 Message-Id: <20230814182104.470270-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230814182104.470270-1-bruce.richardson@intel.com> References: <20230721115125.55137-1-bruce.richardson@intel.com> <20230814182104.470270-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