cirrus-ci: get testing working again
cover cirrus-ci: get testing working again
Hello,
The following series fixes Cirrus-CI testing so it's fully working again:
https://cirrus-ci.com/build/5486825222963200
I request a release-ack to get those committed (once reviewed). The risk is very low, since they only modify Cirrus-CI code, so Gitlab-CI is not changed at all.
Roger Pau Monne (2):
cirrus-ci: install libinotify for FreeBSD
cirrus-ci: fix bashism in the test_script code
.cirrus.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.51.0
PATCH 1/2 cirrus-ci: install libinotify for FreeBSD
FreeBSD QEMU build requires libinotify, otherwise the build fails with:
./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found
Install the package and add the /usr/local include and libs paths explicitly as QEMU configure options.
--- .cirrus.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
.cirrus.yml +4 -1
@@ -11,6 +11,8 @@ freebsd_template: &FREEBSD_ENV environment: APPEND_LIB: /usr/local/lib APPEND_INCLUDES: /usr/local/include + CONFIG_QEMUU_EXTRA_ARGS: --extra-ldflags=-L${APPEND_LIB} + --extra-cflags=-I${APPEND_INCLUDES} CIRRUS_CLONE_DEPTH: 1 CIRRUS_LOG_TIMESTAMP: true
@@ -51,11 +53,12 @@ task: install_script: pkg install -y seabios gmake ninja bash pkgconf bison perl5 yajl lzo2 pixman argp-standalone - libxml2 glib git python3 + libxml2 glib git python3 libinotify configure_script: - cc --version - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin + --with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}" - gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig << : *FREEBSD_CONFIGURE_ARTIFACTS
Signature · 1 line
2.51.0
Re: [PATCH for-4.21 1/2] cirrus-ci: install libinotify for FreeBSD
Quoted 8 lines · Roger Pau Monne
FreeBSD QEMU build requires libinotify, otherwise the build fails with:
./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found
Install the package and add the
/usr/localinclude and libs paths explicitly as QEMU configure options.Signed-off-by Roger Pau Monné <[email protected]>
Quoted 18 lines
--- .cirrus.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-).cirrus.yml +2
-0@@ -11,6 +11,8 @@ freebsd_template: &FREEBSD_ENV environment: APPEND_LIB: /usr/local/lib APPEND_INCLUDES: /usr/local/include + CONFIG_QEMUU_EXTRA_ARGS: --extra-ldflags=-L${APPEND_LIB} + --extra-cflags=-I${APPEND_INCLUDES} CIRRUS_CLONE_DEPTH: 1 CIRRUS_LOG_TIMESTAMP: true
.cirrus.yml task: · line 56
Quoted 5 lines
.cirrus.yml +1
-1@@ -51,11 +53,12 @@ task: install_script: pkg install -y seabios gmake ninja bash pkgconf bison perl5 yajl lzo2 pixman argp-standalone - libxml2 glib git python3 + libxml2 glib git python3 libinotify
I presume this is good on FreeBSD 13 and later ?
.cirrus.yml task: · line 64
Quoted 8 lines
.cirrus.yml +1
-0configure_script: - cc --version - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin + --with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}" - gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig << : *FREEBSD_CONFIGURE_ARTIFACTS
Do we really need both the ENV variable and the --configure parts?
I could believe we need both, but that also feels like something we ought to fix.
~Andrew
Re: [PATCH for-4.21 1/2] cirrus-ci: install libinotify for FreeBSD
Quoted 29 lines · Andrew Cooper
Quoted 8 lines · Roger Pau Monne
FreeBSD QEMU build requires libinotify, otherwise the build fails with:
./qemu-xen-dir-remote/meson.build:2535:15: ERROR: C shared or static library 'inotify' not found
Install the package and add the
/usr/localinclude and libs paths explicitly as QEMU configure options.Signed-off-by Roger Pau Monné <[email protected]>Acked-by Andrew Cooper <[email protected]>Quoted 17 lines
--- .cirrus.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-).cirrus.yml +2
-0@@ -11,6 +11,8 @@ freebsd_template: &FREEBSD_ENV environment: APPEND_LIB: /usr/local/lib APPEND_INCLUDES: /usr/local/include + CONFIG_QEMUU_EXTRA_ARGS: --extra-ldflags=-L${APPEND_LIB} + --extra-cflags=-I${APPEND_INCLUDES} CIRRUS_CLONE_DEPTH: 1 CIRRUS_LOG_TIMESTAMP: true
Quoted 8 lines
.cirrus.yml task: · line 56
Quoted 6 lines
.cirrus.yml +1
-1@@ -51,11 +53,12 @@ task: install_script: pkg install -y seabios gmake ninja bash pkgconf bison perl5 yajl lzo2 pixman argp-standalone - libxml2 glib git python3 + libxml2 glib git python3 libinotifyI presume this is good on FreeBSD 13 and later ?
The ports makefile doesn't limit libinotify to specific FreeBSD releases, but given 13.5 is the oldest supported version I would think so.
Quoted 10 lines
.cirrus.yml task: · line 64
Quoted 8 lines
.cirrus.yml +1
-0configure_script: - cc --version - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin + --with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}" - gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig << : *FREEBSD_CONFIGURE_ARTIFACTSDo we really need both the ENV variable and the --configure parts?
Bah, no, the ENV was my first attempt, which doesn't work, and then I forgot to clean it up. That chunk above needs to disappear.
Thanks, Roger.
PATCH 2/2 cirrus-ci: fix bashism in the test_script code
In reply to Roger Pau MonneThe default shell in FreeBSD is plain sh, which doesn't support the usage of the '|&' operator:
./automation/scripts/console.exp |& sed 's/\r\+$//' /tmp/scripts34c427adc6599db29cb91221a0939d85.sh: 16: Syntax error: "&" unexpected
Fix this by using a redirection of stderr into stdout, and then a pipe.
--- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.cirrus.yml +1 -1
@@ -169,7 +169,7 @@ task: export TEST_LOG="serial-${FREEBSD_BUILD}-${XTF_ARCH}.txt" export PASSED="Test result: SUCCESS" export TEST_TIMEOUT=120 - ./automation/scripts/console.exp |& sed 's/\r\+$//' + ./automation/scripts/console.exp 2>&1 | sed 's/\r\+$//' always: serial_artifacts:
Signature · 1 line
2.51.0
Re: [PATCH for-4.21 2/2] cirrus-ci: fix bashism in the test_script code
Quoted 10 lines · Roger Pau Monne
The default shell in FreeBSD is plain sh, which doesn't support the usage of the '|&' operator:
./automation/scripts/console.exp |& sed 's/\r\+$//'
/tmp/scripts34c427adc6599db29cb91221a0939d85.sh: 16: Syntax error: "&" unexpectedFix this by using a redirection of stderr into stdout, and then a pipe.
Fixes a406195c15dd ("automation: call expect script with redirected standard error")Signed-off-by Roger Pau Monné <[email protected]>
It's sad that this slipped in because the CirrusCI runs were reliably broken by the libinotify issue.
~Andrew