diff options
author | Tom Rini <trini@konsulko.com> | 2020-02-11 12:41:14 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-02-13 10:10:50 -0500 |
commit | 26a426a1001d0f84fc1627ea547fb4f406e85d5c (patch) | |
tree | bfd3b5c5a626105d79cfefbf59524bea03cd2b61 /.travis.yml | |
parent | fbf9c154a6d9c600b355076c33f60781ddbd34f2 (diff) |
travis/gitlab/azure: Ensure we use python3 always
When running our tests there are some cases where as part of the Python
2.7 to Python 3.6 migration we didn't force Python 3.6 to be used as
everything wasn't yet migrated. Now that everything is, make sure to
tell virtualenv to use python3. In the case of Travis this is best done
by making the tools test happen after the main tests so that it will
already have been run in all cases, TEST_PY_TOOLS is a subset of
TEST_PY_BD.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index 44e539038a..e6db9d6a72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,16 +133,6 @@ script: cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/; cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi; cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi; - if [[ -n "${TEST_PY_TOOLS}" ]]; then - PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt" - PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}" - ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test && - ./tools/patman/patman --test && - ./tools/buildman/buildman -t && - PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt" - PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}" - ./tools/dtoc/dtoc -t; - fi; if [[ "${TEST_PY_BD}" != "" ]]; then virtualenv -p /usr/bin/python3 /tmp/venv; . /tmp/venv/bin/activate; @@ -154,6 +144,14 @@ script: if [[ $ret -ne 0 ]]; then exit $ret; fi; + if [[ -n "${TEST_PY_TOOLS}" ]]; then + export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; + export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}"; + ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test && + ./tools/patman/patman --test && + ./tools/buildman/buildman -t && + ./tools/dtoc/dtoc -t; + fi; fi matrix: |