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 02F9A45B44; Tue, 15 Oct 2024 23:34:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D059F4025D; Tue, 15 Oct 2024 23:34:17 +0200 (CEST) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by mails.dpdk.org (Postfix) with ESMTP id 9E5DA40144 for ; Tue, 15 Oct 2024 23:34:16 +0200 (CEST) Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-6cbd1ae26a6so42731736d6.1 for ; Tue, 15 Oct 2024 14:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1729028056; x=1729632856; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AJ7tNKZL9X8q71T0KDRZTyjtaDEI+4zMfXbd1rWpSmY=; b=XBsvdYgcICvcDEFq8wSR2fJZ3Xh/+F/W7tnTMKi0G8LKZG7v7MJAJvqBKjc5SjI1F8 Agv1bxlBMlm5b0mZ3XI/iyMppN4wSvrOvJKxup5LSvykrPlNmeDfgGPU7890ZSlu7TSw Au84ziA3krOS67Ilbo8yWcuYe0FB/1R9F14SM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729028056; x=1729632856; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AJ7tNKZL9X8q71T0KDRZTyjtaDEI+4zMfXbd1rWpSmY=; b=gbZ6KqkHh+pISysbRg1AL0Yij4r9RPrv0Uq3NB0JpfGxQ4i4SRR4LdNSxoIOIJPm4M uo2PUgv7u6xoyZYoYxj1BNoiKeI5tzLuyAG748m29vjLVmBhepL4wBgsHOw/Ezpl7vhr TJNjrkqY4fCeg2UAwQ+TM6niecYF8YWvosgNe84wKB8q2v0R26NnVAUnRU2jaRiEx+EP fjOHbyzGS2HW3LxvPl63SP46feDn+yrxAsd4dygi1oea73AGUrmahTX6fsPw3m1pugVQ EZVN+25I+K4eeJcCuDZ/llfpE+ZqIXkAxipe4TTGTsYt8nEj6eB2JSmdFBDS8GCicCGp rNgw== X-Gm-Message-State: AOJu0YwQjE9wGuEcO6uV9l5HsjwkhaelcdSg7XDxivkT+X9s7GpEx3H3 6RzPl0usNAhOoS2DenFdlu3EgW0m5aRZHc7QTkmBMtxt/Jbll8eDBF2WMMOQaRY0RxZsrM4s7sr MQWA+2C0y4o+iY2GU8faF1Ke6daHvJr1HJ5cGgXLUtn09d2ckOS3uNa6UBFn9pu75OO4y6J7jjl NbhbRXcip0RukwGAsZTHtYHtwXXu6K X-Google-Smtp-Source: AGHT+IHmdWBxQXqRZbXO3SC6rvV3afuUXQkCUHgMcGp7Me3rcrafaZcaCozr9m8vxvm0q+m5xqCiww== X-Received: by 2002:a05:6214:5349:b0:6cc:44b:105d with SMTP id 6a1803df08f44-6cc2b8c4abfmr22816606d6.12.1729028055547; Tue, 15 Oct 2024 14:34:15 -0700 (PDT) Received: from localhost.unh.edu (targon.iol.unh.edu. [132.177.125.242]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cc22961b92sm11020906d6.120.2024.10.15.14.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 14:34:15 -0700 (PDT) From: Manit Mahajan To: ci@dpdk.org Cc: 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: Tue, 15 Oct 2024 17:32:11 -0400 Message-ID: <20241015213211.587-1-mmahajan@iol.unh.edu> X-Mailer: git-send-email 2.41.0 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