From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C84FB46121; Fri, 24 Jan 2025 12:40:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D42D4278D; Fri, 24 Jan 2025 12:39:30 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 8CFAC41611 for ; Fri, 24 Jan 2025 12:39:25 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0BBBE497; Fri, 24 Jan 2025 03:39:53 -0800 (PST) Received: from localhost.localdomain (unknown [10.57.77.230]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4B8FF3F694; Fri, 24 Jan 2025 03:39:24 -0800 (PST) From: Luca Vizzarro To: dev@dpdk.org Cc: Luca Vizzarro , Paul Szczepanek , Dean Marx , Patrick Robb Subject: [PATCH v4 7/7] dts: run all test suites by default Date: Fri, 24 Jan 2025 11:39:09 +0000 Message-ID: <20250124113909.137128-8-luca.vizzarro@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250124113909.137128-1-luca.vizzarro@arm.com> References: <20240613201831.9748-3-npratte@iol.unh.edu> <20250124113909.137128-1-luca.vizzarro@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The configuration requires the user to explicitly set the requested test suites in the files. Sometimes we want to run all the test suites and don't want to manually specify all of them. It is therefore reasonable to change the default behaviour to automatically run all the available test suites if none are specified. Bugzilla ID: 1360 Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek Reviewed-by: Dean Marx --- dts/framework/config/test_run.py | 16 +++++++++++++++- dts/test_runs.example.yaml | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dts/framework/config/test_run.py b/dts/framework/config/test_run.py index dc0e46047d..006410b467 100644 --- a/dts/framework/config/test_run.py +++ b/dts/framework/config/test_run.py @@ -259,6 +259,20 @@ def validate_names(self) -> Self: return self +def fetch_all_test_suites() -> list[TestSuiteConfig]: + """Returns all the available test suites as configuration objects. + + This function does not include the smoke tests. + """ + from framework.test_suite import AVAILABLE_TEST_SUITES + + return [ + TestSuiteConfig(test_suite=test_suite.name) + for test_suite in AVAILABLE_TEST_SUITES + if test_suite.name != "smoke_tests" + ] + + class TestRunConfiguration(FrozenModel): """The configuration of a test run. @@ -275,7 +289,7 @@ class TestRunConfiguration(FrozenModel): #: Whether to skip smoke tests. skip_smoke_tests: bool = False #: The names of test suites and/or test cases to execute. - test_suites: list[TestSuiteConfig] = Field(min_length=1) + test_suites: list[TestSuiteConfig] = Field(default_factory=fetch_all_test_suites) #: The SUT node name to use in this test run. system_under_test_node: str #: The TG node name to use in this test run. diff --git a/dts/test_runs.example.yaml b/dts/test_runs.example.yaml index 5b6afb153e..5cc167ebe1 100644 --- a/dts/test_runs.example.yaml +++ b/dts/test_runs.example.yaml @@ -23,6 +23,7 @@ perf: false # disable performance testing func: true # enable functional testing skip_smoke_tests: false # optional + # by removing the `test_suites` field, this test run will run every test suite available test_suites: # the following test suites will be run in their entirety - hello_world vdevs: # optional; if removed, vdevs won't be used in the execution @@ -30,4 +31,4 @@ # The machine running the DPDK test executable system_under_test_node: "SUT 1" # Traffic generator node to use for this execution environment - traffic_generator_node: "TG 1" \ No newline at end of file + traffic_generator_node: "TG 1" -- 2.43.0