X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=.gitlab-ci.yml;h=badfcb4254ed2c2079826a8d30d5c84f6e91a158;hb=4f6abf159a17a3923fa40d7fc7e46d09ad24c055;hp=f148739550aed1d70fd7081bad328671d1e84c04;hpb=b52f5a1958fd1047da723a15f2a24dd849daac2c;p=oweals%2Fu-boot.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f148739550..badfcb4254 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ # Grab our configured image. The source for this is found at: # https://gitlab.denx.de/u-boot/gitlab-ci-runner -image: trini/u-boot-gitlab-ci-runner:bionic-20200311-10Apr2020 +image: trini/u-boot-gitlab-ci-runner:bionic-20200403-27Apr2020 # We run some tests in different order, to catch some failures quicker. stages: @@ -36,44 +36,27 @@ stages: after_script: - rm -rf /tmp/uboot-test-hooks /tmp/venv script: - # From buildman, exit code 129 means warnings only. If we've been asked to - # use clang only do one configuration. - - if [[ "${TEST_PY_BD}" != "" ]]; then - ret=0; - tools/buildman/buildman -o /tmp -P -E --board ${TEST_PY_BD} ${OVERRIDE} - || ret=$?; - if [[ $ret -ne 0 && $ret -ne 129 ]]; then - tools/buildman/buildman -o /tmp -seP --board ${TEST_PY_BD}; - exit $ret; - fi; - fi - # "not a_test_which_does_not_exist" is a dummy -k parameter which will - # never prevent any test from running. That way, we can always pass - # "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom - # value. + # If we've been asked to use clang only do one configuration. + - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD} + - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e + --board ${TEST_PY_BD} ${OVERRIDE} - virtualenv -p /usr/bin/python3 /tmp/venv - . /tmp/venv/bin/activate - pip install -r test/py/requirements.txt - - export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/${TEST_PY_BD}; - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; + # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not + - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; - if [[ "${TEST_PY_BD}" != "" ]]; then - ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} - -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" - --build-dir "$UBOOT_TRAVIS_BUILD_DIR"; - ret=$?; - if [[ $ret -ne 0 ]]; then - exit $ret; - fi; - fi; + ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} + ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} + --build-dir "$UBOOT_TRAVIS_BUILD_DIR" build all 32bit ARM platforms: tags: [ 'all' ] stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E arm -x aarch64 || ret=$?; - if [[ $ret -ne 0 && $ret -ne 129 ]]; then + ./tools/buildman/buildman -o /tmp -P -E -W arm -x aarch64 || ret=$?; + if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; fi; @@ -86,8 +69,8 @@ build all 64bit ARM platforms: - . /tmp/venv/bin/activate - pip install pyelftools - ret=0; - ./tools/buildman/buildman -o /tmp -P -E aarch64 || ret=$?; - if [[ $ret -ne 0 && $ret -ne 129 ]]; then + ./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?; + if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; fi; @@ -97,8 +80,8 @@ build all PowerPC platforms: stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E powerpc || ret=$?; - if [[ $ret -ne 0 && $ret -ne 129 ]]; then + ./tools/buildman/buildman -o /tmp -P -E -W powerpc || ret=$?; + if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; fi; @@ -108,8 +91,8 @@ build all other platforms: stage: world build script: - ret=0; - ./tools/buildman/buildman -o /tmp -P -E -x arm,powerpc || ret=$?; - if [[ $ret -ne 0 && $ret -ne 129 ]]; then + ./tools/buildman/buildman -o /tmp -P -E -W -x arm,powerpc || ret=$?; + if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP; exit $ret; fi; @@ -120,7 +103,7 @@ cppcheck: tags: [ 'all' ] stage: testsuites script: - - cppcheck --force --quiet --inline-suppr . + - cppcheck -j$(nproc) --force --quiet --inline-suppr . # search for TODO within source tree grep TODO/FIXME/HACK: @@ -187,6 +170,14 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: ./tools/patman/patman --test; make testconfig +Run tests for Nokia RX-51 (aka N900): + tags: [ 'all' ] + stage: testsuites + script: + - ./tools/buildman/buildman --fetch-arch arm; + export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH; + test/nokia_rx51_test.sh + # Test sandbox with test.py sandbox test.py: tags: [ 'all' ] @@ -198,14 +189,14 @@ sandbox with clang test.py: tags: [ 'all' ] variables: TEST_PY_BD: "sandbox" - OVERRIDE: "-O clang-7" + OVERRIDE: "-O clang-10" <<: *buildman_and_testpy_dfn sandbox_spl test.py: tags: [ 'all' ] variables: TEST_PY_BD: "sandbox_spl" - TEST_PY_TEST_SPEC: "test_ofplatdata" + TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff" <<: *buildman_and_testpy_dfn evb-ast2500 test.py: