|
8 | 8 | key: "$CI_JOB_NAME"
|
9 | 9 | when: always
|
10 | 10 | before_script:
|
| 11 | + - source scripts/ci/gitlab-ci-section |
| 12 | + - section_start setup "Pre-script setup" |
11 | 13 | - JOBS=$(expr $(nproc) + 1)
|
12 | 14 | - cat /packages.txt
|
| 15 | + - section_end setup |
13 | 16 | script:
|
14 | 17 | - export CCACHE_BASEDIR="$(pwd)"
|
15 | 18 | - export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
|
|
19 | 22 | - mkdir build
|
20 | 23 | - cd build
|
21 | 24 | - ccache --zero-stats
|
| 25 | + - section_start configure "Running configure" |
22 | 26 | - ../configure --enable-werror --disable-docs --enable-fdt=system
|
23 | 27 | ${TARGETS:+--target-list="$TARGETS"}
|
24 | 28 | $CONFIGURE_ARGS ||
|
|
27 | 31 | then
|
28 | 32 | pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
|
29 | 33 | fi || exit 1;
|
| 34 | + - section_end configure |
| 35 | + - section_start build "Building QEMU" |
30 | 36 | - $MAKE -j"$JOBS"
|
| 37 | + - section_end build |
| 38 | + - section_start test "Running tests" |
31 | 39 | - if test -n "$MAKE_CHECK_ARGS";
|
32 | 40 | then
|
33 | 41 | $MAKE -j"$JOBS" $MAKE_CHECK_ARGS ;
|
34 | 42 | fi
|
| 43 | + - section_end test |
35 | 44 | - ccache --show-stats
|
36 | 45 |
|
37 | 46 | # We jump some hoops in common_test_job_template to avoid
|
|
54 | 63 | stage: test
|
55 | 64 | image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
56 | 65 | script:
|
| 66 | + - source scripts/ci/gitlab-ci-section |
| 67 | + - section_start buildenv "Setting up to run tests" |
57 | 68 | - scripts/git-submodule.sh update roms/SLOF
|
58 |
| - - meson subprojects download $(cd build/subprojects && echo *) |
| 69 | + - build/pyvenv/bin/meson subprojects download $(cd build/subprojects && echo *) |
59 | 70 | - cd build
|
60 | 71 | - find . -type f -exec touch {} +
|
61 | 72 | # Avoid recompiling by hiding ninja with NINJA=":"
|
| 73 | + # We also have to pre-cache the functional tests manually in this case |
| 74 | + - if [ "x${QEMU_TEST_CACHE_DIR}" != "x" ]; then |
| 75 | + $MAKE precache-functional ; |
| 76 | + fi |
| 77 | + - section_end buildenv |
| 78 | + - section_start test "Running tests" |
62 | 79 | - $MAKE NINJA=":" $MAKE_CHECK_ARGS
|
| 80 | + - section_end test |
63 | 81 |
|
64 | 82 | .native_test_job_template:
|
65 | 83 | extends: .common_test_job_template
|
|
72 | 90 | reports:
|
73 | 91 | junit: build/meson-logs/testlog.junit.xml
|
74 | 92 |
|
75 |
| -.avocado_test_job_template: |
| 93 | +.functional_test_job_template: |
76 | 94 | extends: .common_test_job_template
|
77 | 95 | cache:
|
78 | 96 | key: "${CI_JOB_NAME}-cache"
|
79 | 97 | paths:
|
80 | 98 | - ${CI_PROJECT_DIR}/avocado-cache
|
| 99 | + - ${CI_PROJECT_DIR}/functional-cache |
81 | 100 | policy: pull-push
|
82 | 101 | artifacts:
|
83 | 102 | name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
|
86 | 105 | paths:
|
87 | 106 | - build/tests/results/latest/results.xml
|
88 | 107 | - build/tests/results/latest/test-results
|
| 108 | + - build/tests/functional/*/*/*.log |
89 | 109 | reports:
|
90 | 110 | junit: build/tests/results/latest/results.xml
|
91 | 111 | before_script:
|
|
96 | 116 | - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
|
97 | 117 | >> ~/.config/avocado/avocado.conf
|
98 | 118 | - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
|
99 |
| - du -chs ${CI_PROJECT_DIR}/avocado-cache ; |
| 119 | + du -chs ${CI_PROJECT_DIR}/*-cache ; |
100 | 120 | fi
|
101 | 121 | - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
|
| 122 | + - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=1 |
| 123 | + - export QEMU_TEST_CACHE_DIR=${CI_PROJECT_DIR}/functional-cache |
102 | 124 | after_script:
|
103 | 125 | - cd build
|
104 |
| - - du -chs ${CI_PROJECT_DIR}/avocado-cache |
| 126 | + - du -chs ${CI_PROJECT_DIR}/*-cache |
105 | 127 | variables:
|
106 | 128 | QEMU_JOB_AVOCADO: 1
|
0 commit comments