summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformCI
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2021-12-13 09:14:40 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-13 11:36:57 +0000
commit04eacd39439d55bb1a5cbd366c19b1c03d5c7846 (patch)
treed0355ae39d02b9067a4234046397580693e8da0f /OvmfPkg/PlatformCI
parent64bccda53434c1f501f3cef9682170c93251d27e (diff)
downloadedk2-04eacd39439d55bb1a5cbd366c19b1c03d5c7846.tar.gz
edk2-04eacd39439d55bb1a5cbd366c19b1c03d5c7846.tar.bz2
edk2-04eacd39439d55bb1a5cbd366c19b1c03d5c7846.zip
OvmfPkg/PlatformCI: add MicrovmBuild.py
Add build test for OvmfPkg/Microvm. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg/PlatformCI')
-rw-r--r--OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml10
-rw-r--r--OvmfPkg/PlatformCI/MicrovmBuild.py37
2 files changed, 47 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index cc37a2be8f..cd7eaae54e 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 0000000000..7ad1149696
--- /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.dirname(os.path.abspath(__file__)))
+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