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 B2A4042995; Thu, 20 Apr 2023 11:51:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D89D542D20; Thu, 20 Apr 2023 11:51:13 +0200 (CEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id EEE4342D0C for ; Thu, 20 Apr 2023 11:51:10 +0200 (CEST) Received: by mail-ej1-f45.google.com with SMTP id b16so5071345ejz.3 for ; Thu, 20 Apr 2023 02:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon-tech.20221208.gappssmtp.com; s=20221208; t=1681984270; x=1684576270; 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=D4Lrv1vUwvnAgnztEFHIt45B2ITEsQJxVRI7Wx0YypU=; b=mxnY7SXgM/rvaX07KcVBuZqOkXCtMao17ftNnY8MhN7tn5OHM2S7LBxs9TCUnrRejZ H2s5s40u5WwVbJezjFmIEF64af8JFUwVAU3/NGexrKzSPejpPFev9iveE+D/PV14WuJo hOQBhcichVJ3X7kpT+FnKh2EqqCnQy4UB1K2Ri5xNUFFgx60MiQseDsQi0+C6DfG4xEi yM1gB2p1Xfo4KCbN63/m4/31UgLQNLdUu42i6SKNkp2ZyewjR4wuqya5hH4ORAhnOsOl 2YHa7XfNvCPn46RXs31WCOHekLbX2Mz+bF6KpnbmI2KruM46k+ViVHt0McK09NwPbuGI bnzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681984270; x=1684576270; 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=D4Lrv1vUwvnAgnztEFHIt45B2ITEsQJxVRI7Wx0YypU=; b=UVhYYT42R75ZZjNRSLyqvYTNKkeaXTEOVkwJdW0NXnxjukREORKBsKZZcb6Vabg5dx +7D1QR+nyfuWLpmQT7Y0UlWANirJQaEph237A9PkAC0RtYNTGz6Q2EphIZtYp0KJ+UlW iz/oG9rBCxRieS4HLbHB3T704a0PCMGESg9Q9lxco3BlWcWBjEAkNVHOkh19CNTIsGRC yKtzjg29qi+81nn6G4pDykOD8quKsljp6za/V6QjaW8SdyC+hFdPCyETDCgjmgvIHAp6 jA1wVB/izi+/XSIdIvoWRJiBQiXg2LiIH8TqhOfhhba+eCLhx9Q0dUuBgX8ezNTVvKoz y6qw== X-Gm-Message-State: AAQBX9e33HfNAzTqirtb/UJ8wXRiW3wfROL/xaT5XWqFBaTQ59oCHs0Q Xh1M9YdXi3D7qbfbfjfZR3CKYaOLcF9u0stTJH5dmy6Tly40aYhabpmKA286o8woiQeeITKH0g= = X-Google-Smtp-Source: AKy350Z1IY1JWkErrLflQ8mob41xneNJvK3itCVfNNGhSjGcvfn7oN9DmeOz2/fbnor/H1fEbgliVw== X-Received: by 2002:a17:907:5c5:b0:94f:62a2:d1ab with SMTP id wg5-20020a17090705c500b0094f62a2d1abmr1253760ejb.63.1681984270551; Thu, 20 Apr 2023 02:51:10 -0700 (PDT) Received: from jlinkes.pantheon.local (81.89.53.154.host.vnet.sk. [81.89.53.154]) by smtp.gmail.com with ESMTPSA id v2-20020aa7d802000000b004ad601533a3sm580801edq.55.2023.04.20.02.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 02:51:10 -0700 (PDT) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, lijuan.tu@intel.com, wathsala.vithanage@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [RFC PATCH v1 5/5] dts: add traffic generator node to dts runner Date: Thu, 20 Apr 2023 11:31:09 +0200 Message-Id: <20230420093109.594704-6-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230420093109.594704-1-juraj.linkes@pantheon.tech> References: <20230420093109.594704-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 Initialize the TG node and do basic verification. Signed-off-by: Juraj Linkeš --- dts/framework/dts.py | 42 ++++++++++++++++--------- dts/framework/testbed_model/__init__.py | 1 + 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/dts/framework/dts.py b/dts/framework/dts.py index 0502284580..9c82bfe1f4 100644 --- a/dts/framework/dts.py +++ b/dts/framework/dts.py @@ -9,7 +9,7 @@ from .logger import DTSLOG, getLogger from .test_result import BuildTargetResult, DTSResult, ExecutionResult, Result from .test_suite import get_test_suites -from .testbed_model import SutNode +from .testbed_model import SutNode, TGNode, Node from .utils import check_dts_python_version dts_logger: DTSLOG = getLogger("DTSRunner") @@ -27,28 +27,40 @@ def run_all() -> None: # check the python version of the server that run dts check_dts_python_version() - nodes: dict[str, SutNode] = {} + nodes: dict[str, Node] = {} try: # for all Execution sections for execution in CONFIGURATION.executions: sut_node = None + tg_node = None if execution.system_under_test.name in nodes: # a Node with the same name already exists sut_node = nodes[execution.system_under_test.name] - else: - # the SUT has not been initialized yet - try: + + if execution.traffic_generator_system.name in nodes: + # a Node with the same name already exists + tg_node = nodes[execution.traffic_generator_system.name] + + try: + if not sut_node: sut_node = SutNode(execution.system_under_test) - result.update_setup(Result.PASS) - except Exception as e: - dts_logger.exception( - f"Connection to node {execution.system_under_test} failed." - ) - result.update_setup(Result.FAIL, e) - else: - nodes[sut_node.name] = sut_node - - if sut_node: + if not tg_node: + tg_node = TGNode(execution.traffic_generator_system) + tg_node.verify() + result.update_setup(Result.PASS) + except Exception as e: + failed_node = execution.system_under_test.name + if sut_node: + failed_node = execution.traffic_generator_system.name + dts_logger.exception( + f"Creation of node {failed_node} failed." + ) + result.update_setup(Result.FAIL, e) + else: + nodes[sut_node.name] = sut_node + nodes[tg_node.name] = tg_node + + if sut_node and tg_node: _run_execution(sut_node, execution, result) except Exception as e: diff --git a/dts/framework/testbed_model/__init__.py b/dts/framework/testbed_model/__init__.py index f54a947051..5cbb859e47 100644 --- a/dts/framework/testbed_model/__init__.py +++ b/dts/framework/testbed_model/__init__.py @@ -20,3 +20,4 @@ ) from .node import Node from .sut_node import SutNode +from .tg_node import TGNode -- 2.30.2