From patchwork Thu Dec 12 18:16:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 22303 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4A7B9C32EA for ; Thu, 12 Dec 2024 18:17:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E891467EDE; Thu, 12 Dec 2024 19:17:03 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eAd5GoMz"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A46CE67EDA for ; Thu, 12 Dec 2024 19:16:59 +0100 (CET) Received: from pb-laptop.local (185.221.143.90.nat.pool.zt.hu [185.221.143.90]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CF22E316 for ; Thu, 12 Dec 2024 19:16:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1734027385; bh=AwhueC/jxcCrfvDFKEW3e7iX5VorJwlmYijEHVXBma4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eAd5GoMzemo07LAC1ZwnqTFaCKEC4OvVO2s1VNzx77gpVDKg393r57N60IS3CXum8 rzKBwHBLGyj1O5r41mbUth/edowPlabYVgwFeyG62gfEpl198+JUGNV/3DL3T0/Irn r8tA/2hhI/s/uCIAGUwgterOVemkLdwgIrFsahUQ= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [libcamera-ci] [RFC PATCH v1 3/3] Add job to run lc-compliance on the virtual pipeline handler Date: Thu, 12 Dec 2024 19:16:55 +0100 Message-ID: <20241212181655.112958-3-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212181655.112958-1-barnabas.pocze@ideasonboard.com> References: <20241212181655.112958-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a new job "lc-compliance:virtual" that uses the build artifacts produced by the "build-test:debug" job to run lc-compliance in a virtual machine on the "Virtual0" camera. The `force_fallback_for=gtest` option is needed because `cpp_debustl` makes ABI incompatible changes in the STL containers, so googletest also needs to be compiled with these changes. Signed-off-by: Barnabás Pőcze --- .gitlab-ci/test-lc-compliance.sh | 27 +++++++++++++++++++++++++++ gitlab-ci.yml | 18 ++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100755 .gitlab-ci/test-lc-compliance.sh -- 2.47.1 diff --git a/.gitlab-ci/test-lc-compliance.sh b/.gitlab-ci/test-lc-compliance.sh new file mode 100755 index 0000000..e6697a6 --- /dev/null +++ b/.gitlab-ci/test-lc-compliance.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +source "$(dirname "$0")/lib.sh" + +libcamera_compliance() { + echo "Running libcamera compliance tests in a qemu VM" + + virtme-ng \ + --verbose \ + --skip-modules \ + --force-9p \ + --rwdir "$PWD/build" \ + --run /opt/linux/bzImage \ + --exec "LIBCAMERA_LOG_LEVELS=*:DEBUG ./build/src/apps/lc-compliance/lc-compliance -c Virtual0; echo \\\$? > ./build/.test-status" + + local status=$(cat build/.test-status) + echo "Test result exit state: $status" + rm build/.test-status + + if [[ $status != 0 ]] ; then + exit $status + fi +} + +run libcamera_compliance diff --git a/gitlab-ci.yml b/gitlab-ci.yml index c7448b8..5e9e309 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -382,9 +382,10 @@ build-test:debug: -D cam=disabled -D cpp_debugstl=true -D documentation=disabled + -D force_fallback_for=gtest -D gstreamer=enabled - -D lc-compliance=disabled - -D pipelines=[] + -D lc-compliance=enabled + -D pipelines=virtual -D pycamera=enabled -D qcam=disabled -D test=true @@ -420,3 +421,16 @@ test-unit: # artifacts: # reports: # junit: build/meson-logs/testlog.junit.xml + +lc-compliance:virtual: + extends: + - .fdo.distribution-image@debian + - .libcamera-ci.debian:12 + - .libcamera-ci.scripts + stage: test + needs: + - job: build-test:debug + tags: + - kvm + script: + - $CI_PROJECT_DIR/.gitlab-ci/test-lc-compliance.sh