From 465d6944da680fa0844dc08516cc07dcaedc03b4 Mon Sep 17 00:00:00 2001 From: Dun Tan Date: Tue, 22 Nov 2022 12:39:09 +0800 Subject: [PATCH] OvmfPkg/PlatformCI: Add new JOB in .yml of OvmfPkg PlatformCI Add new job like OVMF_X64_DEBUG_UNIT_TEST in OvmfPkg PlatformCI .yml file. New parameter unit_test_list is used to specify Shell Unit Test list which needs to build and run. Format for this input should be:'-u ModulePath1:DscPath1,ModulePath2:DscPath2' or '-u ModulePath1:DscPath1 -u ModulePath2:DscPath2'. (Path is edk2 workspace relative) Signed-off-by: Dun Tan Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Ray Ni --- OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 11 +++++++++++ OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index 7160d95f7e049..2242ffebb5520 100644 --- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -22,6 +22,7 @@ jobs: vm_image: 'ubuntu-18.04' should_run: true run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE" + unit_test_list: '' #Use matrix to speed up the build process strategy: @@ -55,6 +56,15 @@ jobs: Build.Target: "DEBUG" Run.Flags: $(run_flags) Run: $(should_run) + OVMF_X64_DEBUG_UNIT_TEST: + Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.Arch: "X64" + Build.Flags: "" + Build.Target: "DEBUG" + Run.Flags: $(run_flags) + Run: $(should_run) + # unit_test_list should be the format: '-u ModulePath1:DscPath1,ModulePath2:DscPath2' or '-u ModulePath1:DscPath1 -u ModulePath2:DscPath2'.(Path is workspace relative) + unit_test_list: '' OVMF_X64_RELEASE: Build.File: "$(package)/PlatformCI/PlatformBuild.py" Build.Arch: "X64" @@ -187,6 +197,7 @@ jobs: build_file: $(Build.File) build_flags: $(Build.Flags) run_flags: $(Run.Flags) + unit_test_list: $(unit_test_list) extra_install_step: - bash: sudo apt-get install qemu displayName: Install qemu diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml index 7d6344d6383d5..881db9eb27aea 100644 --- a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml +++ b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml @@ -21,6 +21,7 @@ jobs: vm_image: 'windows-2019' should_run: true run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE" + unit_test_list : '' #Use matrix to speed up the build process strategy: @@ -54,6 +55,15 @@ jobs: Build.Target: "DEBUG" Run.Flags: $(run_flags) Run: $(should_run) + OVMF_X64_DEBUG_UNIT_TEST: + Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.Arch: "X64" + Build.Flags: "" + Build.Target: "DEBUG" + Run.Flags: $(run_flags) + Run: $(should_run) + # unit_test_list should be the format: '-u ModulePath1:DscPath1,ModulePath2:DscPath2' or '-u ModulePath1:DscPath1 -u ModulePath2:DscPath2'.(Path is workspace relative) + unit_test_list: '' OVMF_X64_RELEASE: Build.File: "$(package)/PlatformCI/PlatformBuild.py" Build.Arch: "X64" @@ -133,6 +143,7 @@ jobs: build_file: $(Build.File) build_flags: $(Build.Flags) run_flags: $(Run.Flags) + unit_test_list: $(unit_test_list) extra_install_step: - powershell: choco install qemu --version=2021.5.5; Write-Host "##vso[task.prependpath]c:\Program Files\qemu" displayName: Install QEMU and Set QEMU on path # friendly name displayed in the UI