@@ -14,7 +14,7 @@ libcamera_compliance() {
--verbose \
--skip-modules \
--force-9p \
- --rwdir "$PWD/build" \
+ --rwdir "$PWD/build=$PWD/build" \
--run /opt/linux/bzImage \
--exec " \
set -x; \
@@ -25,12 +25,10 @@ libcamera_compliance() {
UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 \
GTEST_OUTPUT=xml:./build/lc-compliance-report.xml \
lc-compliance -c Virtual0; \
- echo \\\$? > ./build/.test-status; \
"
- local status=$(cat build/.test-status)
+ local status=$?
echo "Test result exit state: $status"
- rm build/.test-status
if [[ $status != 0 ]] ; then
exit $status
@@ -24,13 +24,16 @@ libcamera_unit_test() {
echo "Running libcamera tests in a qemu VM"
virtme-ng --verbose --skip-modules --force-9p \
- --rwdir "$PWD/build" \
+ --rwdir "$PWD/build=$PWD/build" \
--run /opt/linux/bzImage \
- --exec "meson test -C build --no-rebuild --print-errorlogs; echo \\\$? > build/.test-status"
+ --exec " \
+ set -ex; \
+ mount -t tmpfs tmpfs /tmp/; \
+ meson test -C build --no-rebuild --print-errorlogs; \
+ "
- local status=$(cat build/.test-status)
+ local status=$?
echo "Test result exit state: $status"
- rm build/.test-status
if [[ $status != 0 ]] ; then
exit $status
@@ -34,7 +34,7 @@ variables:
ca-certificates
git
VIRTME_GIT_URL: 'https://github.com/arighi/virtme-ng.git'
- VIRTME_GIT_REF: 'v1.18'
+ VIRTME_GIT_REF: 'v1.40'
# Jobs that test individual commits need more history to find the common
# ancestor of the branch being tested and the default branch. Fetch up to 100
This enables the removal of the exit code workaround since the exit code is now propagated to the host[0]. However, the single argument `--rwdir` does not work as it did in 1.18, and the `<path>=<path>` form must be used otherwise virtme-ng refuses to start[1]: error: cannot initialize <path> inside the guest (path must be defined inside a valid overlay) And moreover, since virtme-ng now creates an overlay for `/tmp` by default[2], and some tests require a /tmp with `O_TMPFILE` support, `/tmp` needs to be mounted as tmpfs before running the tests. [0]: https://github.com/arighi/virtme-ng/pull/61 [1]: https://github.com/arighi/virtme-ng/issues/409 [2]: https://github.com/arighi/virtme-ng/pull/114 Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- changes in v2: * move virtme-ng update to a separate commit * use `--rwdir x=x` instead of `--overlay-rwdir` * I created and referenced https://github.com/arighi/virtme-ng/issues/409 because I don't really understand why the 1.18 behaviour was changed v1: https://patchwork.libcamera.org/patch/25942/ --- .gitlab-ci/test-lc-compliance.sh | 6 ++---- .gitlab-ci/test-libcamera-qemu.sh | 11 +++++++---- gitlab-ci.yml | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) -- 2.52.0