From patchwork Mon Nov 3 17:11:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 4517 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 03 Nov 2025 18:12:25 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f59.google.com (mail-wm1-f59.google.com [209.85.128.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5A3HCOQS004886 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 3 Nov 2025 18:12:24 +0100 Received: by mail-wm1-f59.google.com with SMTP id 5b1f17b1804b1-47740c1442dsf15449775e9.1 for ; Mon, 03 Nov 2025 09:12:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1762189939; cv=pass; d=google.com; s=arc-20240605; b=ZhR1joMVyKJ9V2EyykGA/QQZTN2d55Z4oX6JYBHALGWgogy4GnGYNeKyZrTnAuuj8y qQv+F6rh00J5ZkshY5p2IlmiJeUquJl6Bpaj6vWZOY6U2V1cQEI2Lhye4uWvIi0glyTZ SAF/2rZqlaBq3/+s7FXIrxw/bc2PGXGSE74dKuHYHvIKyW8tLdVfeOyMoVK3AKUnuxIB PrKFWxPoMZlaix+DZgZCUcmjprmBx+ERpTmPqy5CELTLweID56cur3x/JsH/H0CPRzaQ nMEW6gL4gjkAFxPmVF9nxYOLaDovbPGjv0E3i1BkCopQwsfaXnKkzNWodWpA3uA8gYcI 73qA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=PkpDXOP4kKI0wpy5LagzgIt+ntpEYWPEUfEB1BWa5EY=; fh=E9wDk00sPYgCLnKCkni3bnCgCamRgFA++ovwhi2PnqA=; b=RDIbO2c7yd4do9YFxD/sA+OunS4DTglPnpT2nzVYCDX0WSgjQc31wxPXypNP1A5cLy vVjJQcXIGPQdoIfsv4x6EW2CZkohhu8Z0ABGU7SFPMJHDCAncmePcS57UAObybYuDFTo 9TwZCSl3uTdaHGrRPTpGMihuJqfI4J1QKgF/hg4ofnQRz3/9GZ2aVtFxqWF/Smrxjssu YL5TrJg7RyZRja7pDUrX1FUpnavh0iRA829Hq4Vp/Pg/LZGu5hp2eSFbtgqSFtatVWM1 AVZtRTFj9X8k1pSnLr/OkqAN7gZOhFyoEI5Xd92BSc6omtcC/DD1ou9y2Ndz3kiZ/bUj wtGA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=USmQzeez; spf=pass (google.com: domain of fm-1212295-20251103171214ac6539299f0002076c-yeuu1a@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-20251103171214ac6539299f0002076c-YeuU1a@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1762189939; x=1762794739; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :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=PkpDXOP4kKI0wpy5LagzgIt+ntpEYWPEUfEB1BWa5EY=; b=eNJG3cLV9iarjRVXqD/f+P6vIlcJXYQUoGpVznoZC1OStsDwvk9Vn3y2zNP7e6OPvr er0+yKAS73qKYNsGyn7A8wQlDdYIM4W3GX0CkkzgkcDJScrKfTF1+sG/gUSFA76u7Hd+ E/Uwq7uiWwnU0ipnu1S9QPNlE8mwmXambzz4a4AcYsjxiyaQdOHT/skOmGy0M/KKZ7rg B2EDwHPYiz9klqGcxDASpjeaFd934eG0ymGudPAYyZTAgpR8XKA6pzmhIsni0soDmW83 4XAKatGVB9lat9tx14Pt0ymuy14ljkVfaMpbHTbbxhBrSio3Gk49J3u1Kjl9uPb9296s q+zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762189939; x=1762794739; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PkpDXOP4kKI0wpy5LagzgIt+ntpEYWPEUfEB1BWa5EY=; b=igMaOBtf2zlGZSxILhMf9wKEh2eC0hFFMB2jnObtiOQoS138qeLauTCDlau2l6QcK2 MLenNbS4jWBXCX3JK1eibZUSr49tJrNopFFFLkt3zJiXXJ0X1DvKUg3igR1J/Gcv1gqy l1pWt4/fDp7VjlvqYXUdLIoxVnudJjsdRAFvFGTt9pDu//JeDuUryHXPbwE/vZoJZtfT hUDeVbesoQbKr/R5k/ME6j8J4jXm2JxIM9kaacnnz9itE2Lx83wEv3uGPyocV8qObai1 39DGTuA+vsB3NqwwTAZkgBeqKbD9QEkyo3tb9HJWPdi0GC2R7D80PZumpsCpVquzE8QG goqA== X-Forwarded-Encrypted: i=2; AJvYcCXuyQYElC/I1JvNo6cXL8NL+0RVR0t/wGtKQw7k6j0dnuueNFph+JzrENe3EdGeKOpSkr/Ntuc=@isar-build.org X-Gm-Message-State: AOJu0YziFrfMNDbZKH7VuBTw+0FjyZxkGgVJUTcKxrh6mLJ0bnMmEW/v 2Ki8CyoqAqwyTp8SISl5cbflVW78SFgzRGea3pPYDvwtPFXQyiq0TMpp X-Google-Smtp-Source: AGHT+IEtxHVJDaw48WvXWy1X9G1qBlyy6F7mFjvRBVf3JjKiXs63ZYr+sAw20ze1J/f/7VKWlNFB8Q== X-Received: by 2002:a05:600c:524a:b0:477:54cd:200c with SMTP id 5b1f17b1804b1-47754cd20f6mr704905e9.25.1762189938867; Mon, 03 Nov 2025 09:12:18 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+aOLdoDPRBO5XQnMSy+0XiZODluzVWZuAe0pIBsVh8JGg==" Received: by 2002:a05:600c:858c:b0:475:c559:4e89 with SMTP id 5b1f17b1804b1-477279e2587ls30746985e9.2.-pod-prod-03-eu; Mon, 03 Nov 2025 09:12:15 -0800 (PST) X-Received: by 2002:a05:600d:831c:b0:477:542a:7ed1 with SMTP id 5b1f17b1804b1-477542a7ee4mr6078305e9.19.1762189935437; Mon, 03 Nov 2025 09:12:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762189935; cv=none; d=google.com; s=arc-20240605; b=ddu05/TVLPt3Bw8KhPDpODwxfcDVEuDlQR1wZeSL4isjDHrh6ucQdu974zdiwU+o7A ss04YzqZ3iXoa4zk2YUyFWheAKyvYnyjTNy1qt8Ni7L7XPOiboY/pEE3kO+qAKK7FYnm 9Wrc8dSSL97rD2EdIxM7Yzi/3NYTGDO4FuIwEUz6CwMcg4vB1sWJYiiRWrqALVup5bvI 17oMogFrO9eQA0ZAQqySq7L4naJIg7NdqBRHFEhzgXdTadWy/jHcMci66v7JNAPlSKP0 k6u5frMvyPLUUQSgEeEHyBKkrrytzs4dAM3vrYVMhgy8qVzczuyekferP1NWwx+zum9h sjHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=KJS+k/nQBptR1SYsoxzRt0gAFy7Pgr+kh+TNl7981a8=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=A1VrZVKlN19Ifpq2ssz1GZwy5ZruB6gyU+OX5dkM5S2CHzTquCRTbm+Xnm+nNmHSBK 0szF4174zpEn4MV99Qq6QKd7cGn+77/3dao82KimRfAF3ppCkU2MVnL5q84aSZKWJOaT VipnitFNgY/vqhGIZDnpJTPNGGUwWvUNIQbgMLiokeYPgKOmDLB6pKKyP0w3x61TolSs VkpNJRjQ53PleB8HhjnoxGQ21tJIa4l0xh/5HHlOlo+Prqpu6z1N5RrhE7xsh6cR0Z2q KCNoNFtcFIWJ9tv6wG7mBoagdi3OKWczxaq8RWWEiGt8swBgzHoeVBdSnAkFu2EeMSVP Dz2w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=USmQzeez; spf=pass (google.com: domain of fm-1212295-20251103171214ac6539299f0002076c-yeuu1a@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-20251103171214ac6539299f0002076c-YeuU1a@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4773c30a1e1si70905e9.0.2025.11.03.09.12.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Nov 2025 09:12:15 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1212295-20251103171214ac6539299f0002076c-yeuu1a@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 20251103171214ac6539299f0002076c for ; Mon, 03 Nov 2025 18:12:15 +0100 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH v3 1/1] test: provide ci_shell as a convenience wrapper Date: Mon, 3 Nov 2025 18:11:42 +0100 Message-ID: <20251103171150.338064-2-cedric.hombourger@siemens.com> In-Reply-To: <20251103171150.338064-1-cedric.hombourger@siemens.com> References: <20251103171150.338064-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=USmQzeez; spf=pass (google.com: domain of fm-1212295-20251103171214ac6539299f0002076c-yeuu1a@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-20251103171214ac6539299f0002076c-YeuU1a@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Ease use of the container environment that may be used to run tests from this project by adding a `scripts/ci_shell` script to invoke `kas-container` for you. The script uses the existing kas/isar.yml kas file to use your existing checkout of the Isar code: this makes it easier to test your work-in-progress changes. Lastly, `ci_setup.sh` will produce less output (e.g. when installing dependencies) and will print a few hints to remind users with useful commands. Signed-off-by: Cedric Hombourger --- CONTRIBUTING.md | 52 +++++++++++---------------------------------- scripts/ci_setup.sh | 32 +++++++++++++++++++++++----- scripts/ci_shell | 18 ++++++++++++++++ 3 files changed, 57 insertions(+), 45 deletions(-) create mode 100755 scripts/ci_shell diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 07621232..6970477b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -81,54 +81,26 @@ Plan merges to `master` so that both fit the two-week window; short extensions s by launching CI tests scripts. The procedure is described below: ``` - git clone https://github.com/siemens/kas - cat > kas.yml </dev/null } +echo "🔍 Checking dependencies..." tools="avocado qemu-system-aarch64 qemu-system-arm qemu-system-i386 qemu-system-x86_64" need_install=0 for tool in ${tools}; do which "${tool}" || need_install=1 done [ "${need_install}" = "0" ] || { - sudo apt-get update - sudo apt-get install -y avocado qemu-system-arm qemu-system-x86 + echo "⏳ Installing missing dependencies..." + ( + sudo apt-get update + sudo apt-get install -y avocado qemu-system-arm qemu-system-x86 + ) >/dev/null } -exec /container-entrypoint ${*} +( + cat <<' EOF' + alias tlist="avocado list" + alias trun="avocado run" + cd /work/testsuite + EOF +) | sudo tee -a /etc/profile.d/ci.sh >/dev/null + +cat <<'EOF' + +💡 Use "tlist citest.py" to list existing test cases +💡 Use "trun citest.py:TestClass.test_method" to run a specific test +💡 Use "trun -p sstate=1 citest.py" to enable sstate + +✅ Test environment ready for use! + +EOF + +exec /container-entrypoint bash -l diff --git a/scripts/ci_shell b/scripts/ci_shell new file mode 100755 index 00000000..9481a8ef --- /dev/null +++ b/scripts/ci_shell @@ -0,0 +1,18 @@ +#!/bin/bash +# A simple wrapper to run a container to run CI tests +# +# Cedric Hombourger +# Copyright (c) Siemens AG, 2025 +# SPDX-License-Identifier: MIT + +self=${0} +topdir=$(readlink -f $(dirname ${self})/..) + +export KAS_BUILD_DIR=$(mktemp -d) +cleanup() { + rm -rf --one-file-system ${KAS_BUILD_DIR} +} +trap "cleanup" EXIT + +cd ${topdir} +kas/kas-container shell --command /work/scripts/ci_setup.sh kas/isar.yml