|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 08/13] CI: enable on-demand XTF on qubes runners
On Wed, 4 Nov 2026, dmukhin@xxxxxxxx wrote:
> From: Denis Mukhin <dmukhin@xxxxxxxx>
>
> Currently, public CI infra has no job to run an XTF on the hardware
> runner.
>
> This change enables running XTFs on hardware runners on demand, such
> as test job on a development branch.
very nice!!
> Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
> ---
> automation/gitlab-ci/test.yaml | 2 +
> automation/scripts/include/xtf/qubes-hw1 | 1 +
> automation/scripts/include/xtf/qubes-hw11 | 1 +
> automation/scripts/include/xtf/qubes-hw2 | 1 +
> automation/scripts/include/xtf/qubes-hw22 | 1 +
> automation/scripts/include/xtf/qubes-hw3 | 1 +
> automation/scripts/include/xtf/qubes-x86_64 | 54 +++++++++++++++++++++
> 7 files changed, 61 insertions(+)
> create mode 120000 automation/scripts/include/xtf/qubes-hw1
> create mode 120000 automation/scripts/include/xtf/qubes-hw11
> create mode 120000 automation/scripts/include/xtf/qubes-hw2
> create mode 120000 automation/scripts/include/xtf/qubes-hw22
> create mode 120000 automation/scripts/include/xtf/qubes-hw3
> create mode 100644 automation/scripts/include/xtf/qubes-x86_64
>
> diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
> index 9ca93842dfe7..4d7d5e3d9a11 100644
> --- a/automation/gitlab-ci/test.yaml
> +++ b/automation/gitlab-ci/test.yaml
> @@ -244,6 +244,7 @@
> PCIDEV_INTR: "MSI-X"
> XEN_CONSOLE: "console=com1 com1=115200,8n1,pci,msi,04:00.0"
> SUT_ADDR: test-1.testnet
> + XTF_TARGET: qubes-hw1
> tags:
> - qubes-hw1
>
> @@ -255,6 +256,7 @@
> PCIDEV_INTR: "MSI-X"
> XEN_CONSOLE: "console=com1 com1=115200,8n1,pci,msi"
> SUT_ADDR: test-11.testnet
> + XTF_TARGET: qubes-hw11
> tags:
> - qubes-hw11
>
> diff --git a/automation/scripts/include/xtf/qubes-hw1
> b/automation/scripts/include/xtf/qubes-hw1
> new file mode 120000
> index 000000000000..c6b7de7308b6
> --- /dev/null
> +++ b/automation/scripts/include/xtf/qubes-hw1
> @@ -0,0 +1 @@
> +qubes-x86_64
> \ No newline at end of file
> diff --git a/automation/scripts/include/xtf/qubes-hw11
> b/automation/scripts/include/xtf/qubes-hw11
> new file mode 120000
> index 000000000000..c6b7de7308b6
> --- /dev/null
> +++ b/automation/scripts/include/xtf/qubes-hw11
> @@ -0,0 +1 @@
> +qubes-x86_64
> \ No newline at end of file
> diff --git a/automation/scripts/include/xtf/qubes-hw2
> b/automation/scripts/include/xtf/qubes-hw2
> new file mode 120000
> index 000000000000..c6b7de7308b6
> --- /dev/null
> +++ b/automation/scripts/include/xtf/qubes-hw2
> @@ -0,0 +1 @@
> +qubes-x86_64
> \ No newline at end of file
> diff --git a/automation/scripts/include/xtf/qubes-hw22
> b/automation/scripts/include/xtf/qubes-hw22
> new file mode 120000
> index 000000000000..c6b7de7308b6
> --- /dev/null
> +++ b/automation/scripts/include/xtf/qubes-hw22
> @@ -0,0 +1 @@
> +qubes-x86_64
> \ No newline at end of file
> diff --git a/automation/scripts/include/xtf/qubes-hw3
> b/automation/scripts/include/xtf/qubes-hw3
> new file mode 120000
> index 000000000000..c6b7de7308b6
> --- /dev/null
> +++ b/automation/scripts/include/xtf/qubes-hw3
> @@ -0,0 +1 @@
> +qubes-x86_64
> \ No newline at end of file
Setting
XTF_TARGET: qubes-x86_64
once in .adl-x86_64 would cover every Qubes runner, including zen5,
without any symlinks.
> diff --git a/automation/scripts/include/xtf/qubes-x86_64
> b/automation/scripts/include/xtf/qubes-x86_64
> new file mode 100644
> index 000000000000..d183dd33e4af
> --- /dev/null
> +++ b/automation/scripts/include/xtf/qubes-x86_64
> @@ -0,0 +1,54 @@
> +#!/bin/bash
> +#
> +# XTF test utilities (qubes-* hardware x86_64 runners).
> +#
> +
> +# Target-specific environment overrides.
> +function xtf_init()
> +{
> + export XEN_BINARY="${XEN_BINARY:-${WORKDIR}/xen}"
> +
> + XEN_CMDLINE="${XEN_CMDLINE:-loglvl=all guest_loglvl=all dom0_mem=4G
> console_timestamps=boot}"
> + export EXTRA_XEN_CMDLINE="${XEN_CMDLINE} ${XEN_CONSOLE}"
this overwrites the job's EXTRA_XEN_CMDLINE, for example "fred" would be
dropped
> + export TFTP="/scratch/gitlab-runner/tftp"
> + export CONTROLLER="control@thor.testnet"
> +}
> +
> +# Perform target-specific XTF environment setup.
> +function xtf_setup_host()
> +{
> + cat > "$TFTP/grub.cfg" <<EOF
> +serial --port=auto --speed=115200 --word=8 --parity=no --stop=1
> +terminal_input serial
> +terminal_output serial
> +
> +insmod multiboot2
> +
> +echo Loading Xen...
> +multiboot2 (http)/gitlab-ci/xen $XEN_CMDLINE
> +
> +echo Loading XTF...
> +module2 (http)/gitlab-ci/xtf
> +
> +echo Booting Xen...
> +boot
> + EOF
EOF is indented and does not end the heredoc
> +
> + cat > $TFTP/boot.ipxe <<EOF
> +#!ipxe
> +kernel /gitlab-ci/xen $XEN_CMDLINE || reboot
> +module /gitlab-ci/xtf || reboot
> +boot
> +EOF
> +
> + cp ${XEN_BINARY} $TFTP/xen
> + cp ${XTF_BINARY} $TFTP/xtf
> +
> + export TEST_CMD="ssh $CONTROLLER console"
> +
> + trap "ssh $CONTROLLER poweroff" EXIT
> +
> + # Boot the system
> + ssh $CONTROLLER gitlabci poweron
As this powercycle the board once per test, do you have an estimate for
how long it takes to run this?
> +}
> --
> 2.55.0
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |