]> xenbits.xensource.com Git - people/aperard/libvirt.git/commitdiff
ci: Do more as part of .qemu-build-template
authorAndrea Bolognani <abologna@redhat.com>
Fri, 12 Jan 2024 10:02:56 +0000 (11:02 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 12 Jan 2024 13:28:43 +0000 (14:28 +0100)
Entering $SCRATCH_DIR, going back to the original directory and
setting SELinux labels for the newly-installed QEMU binaries
are all steps that logically belong to this template rather
than its callers.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
ci/integration-template.yml

index 1ccf64f4c15d4a8f09f27ed43552de0a528cf396..166445527ced7e47d1bda8b7847144baa45894f1 100644 (file)
@@ -1,4 +1,5 @@
 .qemu-build-template: &qemu-build-template
+  - pushd "$SCRATCH_DIR"
   - git clone --depth 1 https://gitlab.com/qemu-project/qemu.git
   - cd qemu
   #
@@ -22,6 +23,8 @@
   # other user
   - sudo git config --global --add safe.directory "$SCRATCH_DIR/qemu"
   - sudo make install
+  - sudo restorecon -R /usr
+  - popd
 
 
 .collect-logs: &collect-logs
 .integration_tests_upstream_qemu:
   before_script:
     - !reference [.integration_tests, before_script]
-    - pushd "$SCRATCH_DIR"
     - *qemu-build-template
-    - sudo restorecon -R /usr
-    - popd
 
 .integration_tests_upstream_qemu_prebuilt_env:
   extends: