diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-01-31 16:16:22 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-01-31 16:16:22 +0100 |
commit | cc64e9cc058229554b94c5363360844758b7da61 (patch) | |
tree | 2ab1743020321ab46b3ee60236ba875943ccea8a /jenkinsfile.edk2 | |
parent | 2d8b3f0688eb951b797b72092a86224e25060fa5 (diff) | |
download | jenkinsfiles-cc64e9cc058229554b94c5363360844758b7da61.tar.gz |
stash builds for tests
Diffstat (limited to 'jenkinsfile.edk2')
-rw-r--r-- | jenkinsfile.edk2 | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/jenkinsfile.edk2 b/jenkinsfile.edk2 index aa43c89..c3604a8 100644 --- a/jenkinsfile.edk2 +++ b/jenkinsfile.edk2 @@ -1,6 +1,6 @@ #!/usr/bin/env groovy -def BuildX64(args) { +def BuildX64(stash, args) { dir ('edk2') { sh """ rm -rf Build @@ -10,25 +10,31 @@ def BuildX64(args) { build $args -t GCC5 -n \$(nproc) -a X64 -p OvmfPkg/OvmfPkgX64.dsc """ } + dir ('edk2/Build/OvmfX64') { + stash name: "$stash", includes: "*/FV/OVMF*.fd" + } } -def TestSimpleX64(args) { +def TestSimpleX64(stash, args) { + dir ("$stash") { + unstash "$stash" + } sh """ scripts/qemu-boot-kernel $args \ - -bios edk2/Build/OvmfX64/*/FV/OVMF.fd + -bios $stash/*/FV/OVMF.fd """ } -def TestFlashX64(args) { +def TestFlashX64(stash, args) { + dir ("$stash") { + unstash "$stash" + } sh """ - code=\$(echo edk2/Build/OvmfX64/*/FV/OVMF_CODE.fd) - vars=\$(echo edk2/Build/OvmfX64/*/FV/OVMF_VARS.fd) - qcow="test-flash-vars-\$\$.qcow2" - qemu-img create -f qcow2 -b "\${vars}" "\${qcow}" + code=\$(echo $stash/*/FV/OVMF_CODE.fd) + vars=\$(echo $stash/*/FV/OVMF_VARS.fd) scripts/qemu-boot-kernel $args \ -drive file=\${code},if=pflash,format=raw,unit=0,readonly=on \ - -drive file=\${qcow},if=pflash,format=qcow2,unit=1 - rm -f "\${vars}" + -drive file=\${vars},if=pflash,format=raw,unit=1 """ } @@ -71,37 +77,37 @@ pipeline { stage ('Build default') { steps { - BuildX64(""); + BuildX64("default", ""); } } stage ('Test pc') { steps { - TestSimpleX64("-M pc") + TestSimpleX64("default", "-M pc") } } stage ('Test q35') { steps { - TestSimpleX64("-M q35") + TestSimpleX64("default", "-M q35") } } stage ('Test q35 smp4 pflash') { steps { - TestFlashX64("-M q35 -smp 4") + TestFlashX64("default", "-M q35 -smp 4") } } stage ('Build smm') { steps { - BuildX64("-D SECURE_BOOT_ENABLE -D SMM_REQUIRE"); + BuildX64("smm", "-D SECURE_BOOT_ENABLE -D SMM_REQUIRE"); } } stage ('Test q35 smp4 pflash smm') { steps { - TestFlashX64("-M q35,smm=on -global ICH9-LPC.disable_s3=1 -smp 4") + TestFlashX64("smm", "-M q35,smm=on -global ICH9-LPC.disable_s3=1 -smp 4") } } } |