1 .native_build_job_template:
3 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
5 - JOBS=$(expr $(nproc) + 1)
7 - if test -n "$LD_JOBS";
9 scripts/git-submodule.sh update meson ;
13 - if test -n "$TARGETS";
15 ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ;
17 ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ;
18 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
19 - if test -n "$LD_JOBS";
21 ../meson/meson.py configure . -Dbackend_max_links="$LD_JOBS" ;
24 - if test -n "$MAKE_CHECK_ARGS";
26 make -j"$JOBS" $MAKE_CHECK_ARGS ;
29 .common_test_job_template:
31 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
33 - scripts/git-submodule.sh update
34 $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
36 - find . -type f -exec touch {} +
37 # Avoid recompiling by hiding ninja with NINJA=":"
38 - make NINJA=":" $MAKE_CHECK_ARGS
40 .native_test_job_template:
41 extends: .common_test_job_template
43 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
46 - build/meson-logs/testlog.txt
48 .avocado_test_job_template:
49 extends: .common_test_job_template
51 key: "${CI_JOB_NAME}-cache"
53 - ${CI_PROJECT_DIR}/avocado-cache
56 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
60 - build/tests/results/latest/results.xml
61 - build/tests/results/latest/test-results
63 junit: build/tests/results/latest/results.xml
65 - mkdir -p ~/.config/avocado
66 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
67 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
68 >> ~/.config/avocado/avocado.conf
69 - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
70 >> ~/.config/avocado/avocado.conf
71 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
72 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
74 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
77 - du -chs ${CI_PROJECT_DIR}/avocado-cache
79 # Only run these jobs if running on the mainstream namespace,
80 # or if the user set the QEMU_CI_AVOCADO_TESTING variable (either
81 # in its namespace setting or via git-push option, see documentation
82 # in /.gitlab-ci.yml of this repository).
83 - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
85 - if: '$QEMU_CI_AVOCADO_TESTING'
87 # Otherwise, set to manual (the jobs are created but not run).