All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] travis/gitlab/azure: Ensure we use python3 always
@ 2020-02-11 17:41 Tom Rini
  2020-02-13 22:12 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2020-02-11 17:41 UTC (permalink / raw)
  To: u-boot

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>
---
 .azure-pipelines.yml |  2 +-
 .gitlab-ci.yml       |  4 ++--
 .travis.yml          | 18 ++++++++----------
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 052c3aa278b5..c22095830c0c 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -123,7 +123,7 @@ jobs:
           git config --global user.name "Azure Pipelines"
           git config --global user.email bmeng.cn at gmail.com
           export USER=azure
-          virtualenv /tmp/venv
+          virtualenv -p /usr/bin/python3 /tmp/venv
           . /tmp/venv/bin/activate
           pip install pyelftools
           export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e20a789ac150..d486e72042fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -72,7 +72,7 @@ build all 64bit ARM platforms:
   tags: [ 'all' ]
   stage: world build
   script:
-    - virtualenv /tmp/venv
+    - virtualenv -p /usr/bin/python3 /tmp/venv
     - . /tmp/venv/bin/activate
     - pip install pyelftools
     - ret=0;
@@ -157,7 +157,7 @@ Run binman, buildman, dtoc and patman testsuites:
     - git config --global user.name "GitLab CI Runner";
       git config --global user.email trini at konsulko.com;
       export USER=gitlab;
-      virtualenv /tmp/venv;
+      virtualenv -p /usr/bin/python3 /tmp/venv;
       . /tmp/venv/bin/activate;
       pip install pyelftools;
       export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl;
diff --git a/.travis.yml b/.travis.yml
index 3991eb7716fb..23c181e8d377 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:
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] travis/gitlab/azure: Ensure we use python3 always
  2020-02-11 17:41 [PATCH] travis/gitlab/azure: Ensure we use python3 always Tom Rini
@ 2020-02-13 22:12 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-02-13 22:12 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 11, 2020 at 12:41:14PM -0500, Tom Rini wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200213/fb943710/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-13 22:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 17:41 [PATCH] travis/gitlab/azure: Ensure we use python3 always Tom Rini
2020-02-13 22:12 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.