diff --git a/tests/integration/aval/aval-tests.yml b/tests/integration/aval/aval-tests.yml index ea32189..801f45e 100644 --- a/tests/integration/aval/aval-tests.yml +++ b/tests/integration/aval/aval-tests.yml @@ -35,6 +35,21 @@ build-aval-docker: - cd tests/integration && python /aval/main.py --delegation-config $DELEGATION_CONFIG --run-before-on-host "./run_all.sh --device --machine $TCB_MACHINE --report --tcb-tags requires-device --tcb-custom-image ${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${GITLAB_DOCKERREGISTRY_SUFFIX_LATEST}" + # To circumvent the mismatch between Aktualizr's database and ostree when an external entity manages ostree without + # Aktualizr, install a different version than the one Aktualizr thinks it's currently installed (the one before TCB + # deploy), which externally forces both Aktualizr and ostree to sync. In particular, if we're running a nightly, install + # a release build and vice-versa + - | + toggle_release_type() { + local current_release_type="$1" + if [ "$current_release_type" == "release" ]; then + echo "nightly" + elif [ "$current_release_type" == "nightly" ]; then + echo "release" + fi + } + - TARGET_BUILD_TYPE=$(toggle_release_type "$TARGET_BUILD_TYPE") python /aval/main.py --delegation-config $DELEGATION_CONFIG + "echo 'Updating to a different TOS version than the TCB tests version, to circumvent the mismatch between Aktualizr'\''s database and ostree when an external entity manages ostree without Aktualizr'" - (! grep "^not ok" workdir/reports/*) # $AVAL_TEST_ALL can be defined on a Gitlab schedule to run tests on all devices