From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web12.31943.1635168007208408874 for ; Mon, 25 Oct 2021 06:20:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JC4sQlr7; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635168006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8oOpT72Do6szDbTjbu3GtG5y17VzLTZixjJff+NFhco=; b=JC4sQlr7Qq64raGDB8E1VHfAtbvW79M0Vdxs/3HlkbaGI8HV7eknkqstra1KoBF6YxHBUB GRZNI3SPcZzyZJIOOP/HNYpobDlmOAOFu5Z0YUGTO8mSb3uV3RxXuE3nQjX8dkZGVwbxys hB9pw5aLsC0WnaIbGXeYNINQ+Y8rmjI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-389-6DA3diUiNJ6LvWLZnAIcQw-1; Mon, 25 Oct 2021 09:20:05 -0400 X-MC-Unique: 6DA3diUiNJ6LvWLZnAIcQw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 73FB65074D; Mon, 25 Oct 2021 13:20:03 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7586968D95; Mon, 25 Oct 2021 13:19:55 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7E2461801A8C; Mon, 25 Oct 2021 15:19:31 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Bret Barkelew , Gerd Hoffmann , Jordan Justen , Jiewen Yao , Ard Biesheuvel , Sean Brogan , Liming Gao , Michael D Kinney Subject: [PATCH v2 4/7] OvmfPkg/PlatformCI: add MicrovmBuild.py Date: Mon, 25 Oct 2021 15:19:28 +0200 Message-Id: <20211025131931.129666-5-kraxel@redhat.com> In-Reply-To: <20211025131931.129666-1-kraxel@redhat.com> References: <20211025131931.129666-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Add build test for OvmfPkg/Microvm. Signed-off-by: Gerd Hoffmann --- .../.azurepipelines/Ubuntu-GCC5.yml | 10 +++++ OvmfPkg/PlatformCI/MicrovmBuild.py | 37 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 OvmfPkg/PlatformCI/MicrovmBuild.py diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index cc37a2be8f93..cd7eaae54ec7 100644 --- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -122,6 +122,16 @@ jobs: # this build is for freebsd bhyve not qemu-kvm Run.Flags: "QEMU_SKIP=TRUE" Run: $(should_run) + + MICROVM_X64_DEBUG: + Build.File: "$(package)/PlatformCI/MicrovmBuild.py" + Build.Arch: "X64" + Build.Flags: "" + Build.Target: "DEBUG" + # no storage supported by microvm build + # can't boot to uefi shell -> skip test + Run.Flags: "QEMU_SKIP=TRUE" + Run: $(should_run) workspace: clean: all diff --git a/OvmfPkg/PlatformCI/MicrovmBuild.py b/OvmfPkg/PlatformCI/MicrovmBuild.py new file mode 100644 index 000000000000..c397837e6e5e --- /dev/null +++ b/OvmfPkg/PlatformCI/MicrovmBuild.py @@ -0,0 +1,37 @@ +# @file +# Script to Build OVMF UEFI firmware +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +import os +import sys + +sys.path.append(os.path.join(os.getcwd(), 'OvmfPkg', 'PlatformCI')) +from PlatformBuildLib import SettingsManager +from PlatformBuildLib import PlatformBuilder + + # ####################################################################################### # + # Common Configuration # + # ####################################################################################### # +class CommonPlatform(): + ''' Common settings for this platform. Define static data here and use + for the different parts of stuart + ''' + PackagesSupported = ("OvmfPkg",) + ArchSupported = ("X64",) + TargetsSupported = ("DEBUG", "RELEASE", "NOOPT") + Scopes = ('ovmf', 'edk2-build') + WorkspaceRoot = os.path.realpath(os.path.join( + os.path.dirname(os.path.abspath(__file__)), "..", "..")) + + @classmethod + def GetDscName(cls, ArchCsv: str) -> str: + ''' return the DSC given the architectures requested. + + ArchCsv: csv string containing all architectures to build + ''' + return "Microvm/MicrovmX64.dsc" + +import PlatformBuildLib +PlatformBuildLib.CommonPlatform = CommonPlatform -- 2.31.1