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 D162E45B4C; Thu, 24 Oct 2024 20:36:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7AF0434E6; Thu, 24 Oct 2024 20:36:13 +0200 (CEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 76BDC40156 for ; Thu, 24 Oct 2024 20:36:12 +0200 (CEST) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-46096aadaf0so7926611cf.2 for ; Thu, 24 Oct 2024 11:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1729794971; x=1730399771; 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=2YbN7I4ViMauVwZcCcumyo77/eJ3FW4fYb6Old68iv4=; b=QPjcBY5+RgL9PRq1/uTFV6pe0lOJ3ZHGyoi6OuX/dJJA9WX4LdtEI9koHLEV/oRUmL V4M8hCpc1C8HZ/FNryRpV/ya2rMgv+9aU/efr+H9LNzS8AXy9lw69U3cOiUDUwuYWcUj UfnvoCzMGcQd7hNAI/J8rhBM7k2HLLymSr03k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729794971; x=1730399771; 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=2YbN7I4ViMauVwZcCcumyo77/eJ3FW4fYb6Old68iv4=; b=Q5KwzQcB8iNDlBQHKwNDPJE4+kgSi9Ybasr7kxuScYiXp94zXGOFJAkgZzx/5SyXwa jMaBHmon5YZkd9JMK6ITzWa4/6ZAl0Kb0A3ofgjH7GET5qBq6JKfvt1tFAfub4HlKXNP tiUhuHZ1GaibVgWYZW83ZXa2aFmA5jF6SUiBt/Pr6hZzjVKT1Mvv6MxafguAiETE7IZp SkPDpsZnz8oNM71P/vhoFfF/NzyrKQLDb/xAGXlT3c76Slg2p6jF1Ce/fY+B4ZgrRcc6 JjQWyLS2nPCFeIObzklFCV7nVb1RBikV1V9PhV0Rw/r6zMT/5k8XlouAw9sa2dh/9Q0N CR6A== X-Gm-Message-State: AOJu0Yz/iY66CrOc+28x2+ly7b2gXJxcqwYh2eZE0ELLM2Ok3d9IQiJP aV5d70edRTXq8MhTd0ZfC4/tyXlpar57NV/X6Uz1aBdu27aAqqp0BFQzWppWSru6CKJVQxz8aWW O3H256FSZr1xFVGhtnA2czmkasnYNu7KOEqPjhUMdD2heLiV0ksHcGE9kvtXfQB0qh73O1b7ojk u1HmDaV9t9eB6P1ForjThdP79i5w== X-Google-Smtp-Source: AGHT+IFysDdyvQ59Ay4y7QrKAoWT6u0k9eyNnAZybE0TSyUj+EB4SxgLd6XR0ODRpic7GwkKGjDfRw== X-Received: by 2002:a05:622a:1e15:b0:460:8559:e5bc with SMTP id d75a77b69052e-461145b7531mr96247851cf.4.1729794971606; Thu, 24 Oct 2024 11:36:11 -0700 (PDT) Received: from localhost.localdomain ([2607:ac80:410:8:94cc:30f5:b304:9a00]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460d3dae6f5sm54203441cf.92.2024.10.24.11.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 11:36:11 -0700 (PDT) From: Manit Mahajan To: Cc: ci@dpdk.org, probb@iol.unh.edu, thomas@monjalon.net, aconole@redhat.com, bruce.richardson@intel.com, Manit Mahajan Subject: [PATCH] tools: run check-meson.py in create_series_artifact Date: Thu, 24 Oct 2024 14:35:00 -0400 Message-ID: <20241024183526.16946-1-mmahajan@iol.unh.edu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20241015213211.587-1-mmahajan@iol.unh.edu> References: <20241015213211.587-1-mmahajan@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The check-meson.py is a python script that runs checks on Meson.build files in DPDK. Checks include, splitting a line into a code part and a comment part, list of files are correctly indented, and more. Updating create_series_artifact.py to run the check-meson.py so check-meson.py can be run on all incoming patches. In UNH CI, we will report a build failure if the check-meson.py reports an error. Signed-off-by: Manit Mahajan --- tools/create_series_artifact.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tools/create_series_artifact.py b/tools/create_series_artifact.py index 550ea82..bfc97f8 100755 --- a/tools/create_series_artifact.py +++ b/tools/create_series_artifact.py @@ -251,6 +251,24 @@ class ProjectTree(object): self.set_properties(apply_error=error) return not error + + def check_meson(self) -> bool: + + result = subprocess.run( + ['python', os.path.join(self.path, "devtools/check-meson.py"), '-d', str(self.path), '-v'], + cwd=self.path, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + + self.log("Running Check Meson") + self.log(result.stdout.decode()) + self.log(result.stderr.decode()) + + error = "Error" in result.stdout.decode() + self.set_properties(meson_error=error) + return not error + def test_build(self) -> bool: ninja_result: Optional[subprocess.CompletedProcess] = None meson_result: subprocess.CompletedProcess = subprocess.run( @@ -454,8 +472,14 @@ def collect_series_info(args: argparse.Namespace) -> CreateSeriesParameters: def try_to_apply(tree: ProjectTree) -> bool: - return tree.apply_patch_series() and tree.test_build() and tree.create_tarball() + artifact_build_result = True + artifact_build_result &= tree.apply_patch_series() + artifact_build_result &= tree.check_meson() + artifact_build_result &= tree.test_build() + artifact_build_result &= tree.create_tarball() + + return artifact_build_result def main() -> int: data = collect_series_info(parse_args()) -- 2.41.0