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 35DA343BB1; Fri, 1 Mar 2024 11:55:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E91F143381; Fri, 1 Mar 2024 11:55:25 +0100 (CET) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mails.dpdk.org (Postfix) with ESMTP id 86846400D5 for ; Fri, 1 Mar 2024 11:55:24 +0100 (CET) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-563c403719cso2937400a12.2 for ; Fri, 01 Mar 2024 02:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1709290524; x=1709895324; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yLZMXaCjxshwb1+7NBZ9jMqpZF7+M9W58O5WkUFMlhg=; b=eLTTbGOZ8tEPntzR3yJArTotiicfZTkbbASObUglQMFE51EYOMJXmCYYK1s9sNl+kI TA42B12dAF4TGaz7/vb4xkFW3JH2VEvgenChylhpv1l+QEi2jNyuF05W7ILEwrv7yUgo 9cTvmAv77fexuBff1it8b3QbzX8blvLKZA4AST6BZInhFROkyQCMeeu+KJfOh7MQ/4Ij 41WbVcR1E+96HgWr2HKKzVxjw9yxwDvmkOHiUsbN8R1QePnxxv/6O5qa4+vgN2bIf01I 1iD3M4ReB4jW0VR9om5FmImXP1/8khsIEuvLW7rLWmG/f5ej8oNbIiaononrQhxpMGQZ nMrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709290524; x=1709895324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yLZMXaCjxshwb1+7NBZ9jMqpZF7+M9W58O5WkUFMlhg=; b=JfSGeUuLDPrBnyTsT38pO35xFkP69uhwwBQrsE11kBm3bDdo72v1T4ERgztrx8OwwD /GOEbqm6YlaBV6w+lDXB9PWXbFAAOgftHgoSevEbrwbfuOx2L6lSPeb7fzQtqmWYyGD0 /jZVuSxaxI/QVQGN3chTABfRRwPpu5V4Q9ai+ggfFDh3fZ5AYw7f+yewyRS03m4llMxy LSpIy0j0Q9H3Qi0kk08JWa1phVQMQ3RUG7vDaDL5azROxS6p/VfKh1rORA+ED8iYqAkM w7x8GD271abaNR5cc3NF45nbTGqyZGZTVXzzLqM1syanMdI8bcrN/Uj7mNxD/connMIb tDog== X-Gm-Message-State: AOJu0YwVGho/+ALjTEhtxpja3TsFACubqx3I1D3vhI4E5u/P5w44s8E7 +1031zfPW5qptymn7ErcjZLeWmo5hCR3p+tgQCvLQg+Wa8PsXjo3QxnHwKRjUzc= X-Google-Smtp-Source: AGHT+IFQKE435cyBtihWeiNfF5wOlj5gVuNqCkhKc5h3YRCMHo2ICl3zAoPJ2GIQ8vh2W48MCaAUGA== X-Received: by 2002:a05:6402:1a29:b0:565:b456:4357 with SMTP id be9-20020a0564021a2900b00565b4564357mr1096140edb.20.1709290524134; Fri, 01 Mar 2024 02:55:24 -0800 (PST) Received: from jlinkes-PT-Latitude-5530.pantheon.local ([84.245.120.62]) by smtp.gmail.com with ESMTPSA id f12-20020a056402194c00b0056661ec3f24sm1461734edz.81.2024.03.01.02.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 02:55:23 -0800 (PST) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH v4 0/7] test case blocking and logging Date: Fri, 1 Mar 2024 11:55:15 +0100 Message-Id: <20240301105522.79870-1-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231220103331.60888-1-juraj.linkes@pantheon.tech> References: <20231220103331.60888-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 We currently don't record test case results that couldn't be executed because of a previous failure, such as when a test suite setup failed, resulting in no executed test cases. In order to record the test cases that couldn't be executed, we must know the lists of test suites and test cases ahead of the actual test suite execution, as an error could occur before we even start executing test suites. In addition, the patch series contains two refactors and one improvement. The first refactor is closely related. The dts.py was renamed to runner.py and given a clear purpose - running the test suites and all other orchestration needed to run test suites. The logic for this was not all in the original dts.py module and it was brought there. The runner is also responsible for recording results, which is the blocked test cases are recorded. The other refactor, logging, is related to the first refactor. The logging module was simplified while extending capabilities. Each test suite logs into its own log file in addition to the main log file which the runner must handle (as it knows when we start executing particular test suites). The runner also handles the switching between execution stages for the purposes of logging. The one aforementioned improvement is in unifying how we specify test cases in the conf.yaml file and in the environment variable/command line argument. v2: Rebase and update of the whole patch. There are changes in all parts of the code, mainly improving the design and logic. Also added the last patch which improves test suite specification on the cmdline. v3: Improved variables in _get_test_suite_class along with docstring. Fixed smoke test suite not being added into the list of test suites to be executed. v4: Added the checking of CamelCase convention when discovering test cases. Also added additional test stages. The stages were split into setup and teardown. Juraj Linkeš (7): dts: convert dts.py methods to class dts: move test suite execution logic to DTSRunner dts: filter test suites in executions dts: reorganize test result dts: block all test cases when earlier setup fails dts: refactor logging configuration dts: improve test suite and case filtering doc/guides/tools/dts.rst | 14 +- dts/framework/config/__init__.py | 36 +- dts/framework/config/conf_yaml_schema.json | 2 +- dts/framework/dts.py | 338 --------- dts/framework/logger.py | 246 +++--- dts/framework/remote_session/__init__.py | 6 +- .../interactive_remote_session.py | 6 +- .../remote_session/interactive_shell.py | 6 +- .../remote_session/remote_session.py | 8 +- dts/framework/runner.py | 711 ++++++++++++++++++ dts/framework/settings.py | 188 +++-- dts/framework/test_result.py | 565 ++++++++------ dts/framework/test_suite.py | 239 +----- dts/framework/testbed_model/node.py | 11 +- dts/framework/testbed_model/os_session.py | 7 +- .../traffic_generator/traffic_generator.py | 6 +- dts/main.py | 9 +- dts/pyproject.toml | 3 + dts/tests/TestSuite_os_udp.py | 2 +- dts/tests/TestSuite_smoke_tests.py | 2 +- 20 files changed, 1375 insertions(+), 1030 deletions(-) delete mode 100644 dts/framework/dts.py create mode 100644 dts/framework/runner.py -- 2.34.1