Skip to contentSkip to conversation

Various travis-ci improvements

PATCH New Tom Rini 3 participants 29 messages Oct 20, 2016 – Oct 24, 2016

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

cover Various travis-ci improvements

Hey all,

The following series does a few things with our existing travis-ci infrastructure. We update to the latest Ubuntu release that is supported (there are only 2 Linux host choices) and make use of toolchains that are available that way when possible and fix building of x86. I added in microblaze and sh4 and xtensa to the build loop (I left out blackfin and openrisc as they have compile problems currently in general). The biggest change here is that I've added support for test.py running on qemu-x86, qemu-ppce500, qemu-mips*, vexpress_ca15_tc2, vexpress_ca9x4, and integratorcp_cm926ejs along with sandbox.

This final part is I think the most important. With this change all it now takes to have some build coverage and some test.py coverage is a github account. You can then login to travis-ci.org that, click a few things and get build and test coverage with minimal effort now. It takes about 2 hours in its current configuration but could easily be cut down in ones personal repository for quicker test cycles. And for the record, in addition to email notifications by default one will have
https://api.travis-ci.org/repos/USERNAME/u-boot/builds.atom available as an atom feed, in addition to the numerous other notification methods available.

Signature · 1 line
Tom
author
#1 lore raw

PATCH 1/8 test/py: ensure a log section exists for skipped tests

From: Stephen Warren <[email protected]>

In pytest 3, runtestprotocol() may not call pytest_runtest_setup() if the test is skipped. That call is required to create a section for the test in the log file. If this is skipped, the call to log.end_section() at the tail of pytest_runtest_protocol() will throw an exception. This patch ensures that a log section always exists, both to avoid the exception and to ensure that a consistently structured log file is always created.

---
 test/py/conftest.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
test/py/conftest.py +12 -1
index 5b3a92316bbf..1f15e3e33dcf 100644
@@ -431,6 +431,9 @@ def setup_buildconfigspec(item):
         if not ubconfig.buildconfig.get('config_' + option.lower(), None):
             pytest.skip('.config feature not enabled')
 
+def start_test_section(item):
+    anchors[item.name] = log.start_section(item.name)
+
 def pytest_runtest_setup(item):
     """pytest hook: Configure (set up) a test item.
 
@@ -444,7 +447,7 @@ def pytest_runtest_setup(item):
         Nothing.
     """
 
-    anchors[item.name] = log.start_section(item.name)
+    start_test_section(item)
     setup_boardspec(item)
     setup_buildconfigspec(item)
 
@@ -464,6 +467,14 @@ def pytest_runtest_protocol(item, nextitem):
 
     reports = runtestprotocol(item, nextitem=nextitem)
 
+    # In pytest 3, runtestprotocol() may not call pytest_runtest_setup() if
+    # the test is skipped. That call is required to create the test's section
+    # in the log file. The call to log.end_section() requires that the log
+    # contain a section for this test. Create a section for the test if it
+    # doesn't already exist.
+    if not item.name in anchors:
+        start_test_section(item)
+
     failure_cleanup = False
     test_list = tests_passed
     msg = 'OK'
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH 2/8 travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr'

In reply to Tom Rini

In order to make other various improvements, update to the latest environment travis-ci supports.

---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +2 -1
index 18bf2ed4fcdb..845f6cad9400 100644
@@ -3,7 +3,8 @@
 
 # build U-Boot on Travis CI - https://travis-ci.org/
 
-sudo: true
+sudo: required
+dist: trusty
 
 language: c
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/8 travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr'

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 7 lines

In order to make other various improvements, update to the latest environment travis-ci supports.

---
  .travis.yml | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

bye,
Heiko

Quoted 16 lines
.travis.yml +2 -1
index 18bf2ed4fcdb..845f6cad9400 100644
@@ -3,7 +3,8 @@
 
  # build U-Boot on Travis CI - https://travis-ci.org/
 
-sudo: true
+sudo: required
+dist: trusty
 
  language: c
 
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#4 lore raw

PATCH 2/8 travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr'

In reply to Tom Rini
Quoted 4 lines · Tom Rini

In order to make other various improvements, update to the latest environment travis-ci supports.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/b64d0387/attachment.sig>
author
#5 lore raw

PATCH 3/8 travis-ci: Use a git URI for dtc.git

In reply to Tom Rini

Currently we fail to fetch the dtc.git tree due to an SSL issue within the travis-ci environment. The easiest fix here is to switch to a git URI.

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
index 845f6cad9400..2f1d05d443f5 100644
@@ -25,7 +25,7 @@ cache:
 
 install:
  # install latest device tree compiler
- - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
+ - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
  - make -j4 -C /tmp/dtc
  # prepare buildman environment
  - export BUILDMAN_ROOT="root:"
Signature · 1 line
1.9.1
#6 lore raw

PATCH 3/8 travis-ci: Use a git URI for dtc.git

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 8 lines

Currently we fail to fetch the dtc.git tree due to an SSL issue within the travis-ci environment. The easiest fix here is to switch to a git URI.

---
  .travis.yml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

bye,
Heiko

Quoted 15 lines
.travis.yml +1 -1
index 845f6cad9400..2f1d05d443f5 100644
@@ -25,7 +25,7 @@ cache:
 
  install:
   # install latest device tree compiler
- - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
+ - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
   - make -j4 -C /tmp/dtc
   # prepare buildman environment
   - export BUILDMAN_ROOT="root:"
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#7 lore raw

PATCH 3/8 travis-ci: Use a git URI for dtc.git

In reply to Tom Rini
Quoted 5 lines · Tom Rini

Currently we fail to fetch the dtc.git tree due to an SSL issue within the travis-ci environment. The easiest fix here is to switch to a git URI.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/2516ce18/attachment.sig>
author
#8 lore raw

PATCH 4/8 travis-ci: Do not make buildman warnings fatal

In reply to Tom Rini

We currently will always see a number of warnings due to device tree issues. These (and other warnings) should not make the build be marked as failure so catch exit status 129 specifically and return 0 in that case.

Cc Heiko Schocher <[email protected]>
---
 .travis.yml | 7 +++++++
 1 file changed, 7 insertions(+)
.travis.yml +7 -0
index 2f1d05d443f5..d93efe02b0b1 100644
@@ -69,8 +69,15 @@ script:
  - if [[ "${TEST_CMD}" != "" ]]; then
      ${TEST_CMD};
    fi
+ # Exit code 129 means warnings only.
  - if [[ "${BUILDMAN}" != "" ]]; then
+     set +e;
      tools/buildman/buildman ${BUILDMAN};
+     if [[ "$?" == "0" || "$?" == "129" ]]; then
+       exit 0;
+     else
+       exit $?;
+     fi
    fi
 
 matrix:
Signature · 1 line
1.9.1
#9 lore raw

PATCH 4/8 travis-ci: Do not make buildman warnings fatal

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 7 lines

We currently will always see a number of warnings due to device tree issues. These (and other warnings) should not make the build be marked as failure so catch exit status 129 specifically and return 0 in that case.

Cc Heiko Schocher <[email protected]>

You mean here this "Warning (unit_address_vs_reg):" warnings?

IIRC I posted some month ago a patch, which suppress them ... the patch was rejected, with the plausible reason, that we should fix this issues ... so I started and posted some dts fix patches, also rejected with the reason that this should come from linux syncs ...

Hmm.. do we syncs for our DTS files with linux?

Nevertheless: we should at least fix this for travis, so:

bye,
Heiko

Quoted 25 lines
---
  .travis.yml | 7 +++++++
  1 file changed, 7 insertions(+)
.travis.yml +7 -0
index 2f1d05d443f5..d93efe02b0b1 100644
@@ -69,8 +69,15 @@ script:
   - if [[ "${TEST_CMD}" != "" ]]; then
       ${TEST_CMD};
     fi
+ # Exit code 129 means warnings only.
   - if [[ "${BUILDMAN}" != "" ]]; then
+     set +e;
       tools/buildman/buildman ${BUILDMAN};
+     if [[ "$?" == "0" || "$?" == "129" ]]; then
+       exit 0;
+     else
+       exit $?;
+     fi
     fi
 
  matrix:
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#10 lore raw

PATCH 4/8 travis-ci: Do not make buildman warnings fatal

Quoted 8 lines · Heiko Schocher

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 5 lines

We currently will always see a number of warnings due to device tree issues. These (and other warnings) should not make the build be marked as failure so catch exit status 129 specifically and return 0 in that case.

Quoted 4 lines
Quoted 2 lines
Cc Heiko Schocher <[email protected]>

You mean here this "Warning (unit_address_vs_reg):" warnings?

And a few others as well, depending on toolchain.

Quoted 6 lines

IIRC I posted some month ago a patch, which suppress them ... the patch was rejected, with the plausible reason, that we should fix this issues ... so I started and posted some dts fix patches, also rejected with the reason that this should come from linux syncs ...

Hmm.. do we syncs for our DTS files with linux?

Yes. I suppose that for example for x86/sandbox we should take your patches. But yes, for other platforms where we are not the authoritative source the fixes need to be pushed to Linux first and merged in. Some platforms sync more often with upstream than others in this regard.

Quoted 3 lines

Nevertheless: we should at least fix this for travis, so:

Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161021/d7b90dc0/attachment.sig>
author
#11 lore raw

PATCH 4/8 travis-ci: Do not make buildman warnings fatal

In reply to Tom Rini
Quoted 7 lines · Tom Rini

We currently will always see a number of warnings due to device tree issues. These (and other warnings) should not make the build be marked as failure so catch exit status 129 specifically and return 0 in that case.

Cc Heiko Schocher <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/9fa616ef/attachment.sig>
author
#12 lore raw

PATCH 5/8 travis-ci: Update toolchain and buildman usage

In reply to Tom Rini

- Drop the 'cache' line, travis-ci says to not cache apt packages (and does not).
- Get the Ubuntu provided toolchain for ARM and PowerPC.
- Add more toolchain options that buildman can fetch.

---
 .travis.yml | 59 +++++++++++++++--------------------------------------------
 1 file changed, 15 insertions(+), 44 deletions(-)
.travis.yml +15 -44
index d93efe02b0b1..8d1a90eb164b 100644
@@ -19,9 +19,9 @@ addons:
     - libsdl1.2-dev
     - python
     - python-virtualenv
-
-cache:
- - apt
+    - gcc-powerpc-linux-gnu
+    - gcc-arm-linux-gnueabihf
+    - iasl
 
 install:
  # install latest device tree compiler
@@ -29,17 +29,8 @@ install:
  - make -j4 -C /tmp/dtc
  # prepare buildman environment
  - export BUILDMAN_ROOT="root:"
- - export BUILDMAN_PPC="ppc:"
- - export BUILDMAN_ARM="arm:"
- - export BUILDMAN_SANDBOX="sandbox:"
- - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
- - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
- - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
- - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
- - export BUILDMAN_ALIAS="x86:"
- - export BUILDMAN_ALIAS_ARM="arm:"
- - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
- - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
+ - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman
+ - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman
  - cat ~/.buildman
  - virtualenv /tmp/venv
  - . /tmp/venv/bin/activate
@@ -55,14 +46,15 @@ env:
 before_script:
   # install toolchains based on TOOLCHAIN} variable
   - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
-  - if [[ "${TOOLCHAIN}" == *arm* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/armv5te/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh ; fi
-  - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
   - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
-  - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
+  - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi
   - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
+  - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
   - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
-  - if [[ "${TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
-  - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
+  - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
+  - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
+  - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then ./tools/buildman/buildman --fetch-arch x86_64 ; fi
+  - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
 
 script:
  # the execution sequence for each test
@@ -86,40 +78,33 @@ matrix:
   # each env setting here is a dedicated build
     - env:
         - BUILDMAN="arm1136"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="arm1136"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="arm1176"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="arm720t"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="arm920t"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="atmel -x avr32"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="avr32"
           TOOLCHAIN="avr32"
     - env:
         - BUILDMAN="davinci"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="denx"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="freescale -x powerpc,m68k,aarch64"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="sandbox x86"
-          TOOLCHAIN="i386"
+          TOOLCHAIN="x86_64"
+      script:
+        - export BUILDMAN_X86="x86:";
+          echo -e "\n[toolchain-prefix]\n${BUILDMAN_X86} ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman
     - env:
         - BUILDMAN="kirkwood"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="m68k"
           TOOLCHAIN="m68k"
@@ -128,46 +113,32 @@ matrix:
           TOOLCHAIN="mips"
     - env:
         - BUILDMAN="mpc512x"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc5xx"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc5xxx"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc8260"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc83xx"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc85xx -x freescale"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="t208xrdb t4qds t102*"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="p1_p2_rdb_pc p1010rdb"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc86xx"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="mpc8xx"
-          TOOLCHAIN="ppc"
     - env:
         - BUILDMAN="siemens"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="ti"
-          TOOLCHAIN="arm"
     - env:
         - BUILDMAN="aarch64"
           TOOLCHAIN="aarch64"
Signature · 1 line
1.9.1
#13 lore raw

PATCH 5/8 travis-ci: Update toolchain and buildman usage

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 9 lines

- Drop the 'cache' line, travis-ci says to not cache apt packages (and does not).
- Get the Ubuntu provided toolchain for ARM and PowerPC.
- Add more toolchain options that buildman can fetch.

---
  .travis.yml | 59 +++++++++++++++--------------------------------------------
  1 file changed, 15 insertions(+), 44 deletions(-)

bye,
Heiko

Quoted 152 lines
.travis.yml +15 -44
index d93efe02b0b1..8d1a90eb164b 100644
@@ -19,9 +19,9 @@ addons:
      - libsdl1.2-dev
      - python
      - python-virtualenv
-
-cache:
- - apt
+    - gcc-powerpc-linux-gnu
+    - gcc-arm-linux-gnueabihf
+    - iasl
 
  install:
   # install latest device tree compiler
@@ -29,17 +29,8 @@ install:
   - make -j4 -C /tmp/dtc
   # prepare buildman environment
   - export BUILDMAN_ROOT="root:"
- - export BUILDMAN_PPC="ppc:"
- - export BUILDMAN_ARM="arm:"
- - export BUILDMAN_SANDBOX="sandbox:"
- - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
- - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
- - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
- - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
- - export BUILDMAN_ALIAS="x86:"
- - export BUILDMAN_ALIAS_ARM="arm:"
- - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
- - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
+ - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman
+ - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman
   - cat ~/.buildman
   - virtualenv /tmp/venv
   - . /tmp/venv/bin/activate
@@ -55,14 +46,15 @@ env:
  before_script:
    # install toolchains based on TOOLCHAIN} variable
    - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
-  - if [[ "${TOOLCHAIN}" == *arm* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/armv5te/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh ; fi
-  - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
    - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
-  - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
+  - if [[ "${TOOLCHAIN}" == *bfin* ]]; then ./tools/buildman/buildman --fetch-arch bfin ; fi
    - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
+  - if [[ "${TOOLCHAIN}" == *microblaze* ]]; then ./tools/buildman/buildman --fetch-arch microblaze ; fi
    - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
-  - if [[ "${TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
-  - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
+  - if [[ "${TOOLCHAIN}" == *or32* ]]; then ./tools/buildman/buildman --fetch-arch or32 ; fi
+  - if [[ "${TOOLCHAIN}" == *sh4* ]]; then ./tools/buildman/buildman --fetch-arch sh4 ; fi
+  - if [[ "${TOOLCHAIN}" == *x86_64* ]]; then ./tools/buildman/buildman --fetch-arch x86_64 ; fi
+  - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
 
  script:
   # the execution sequence for each test
@@ -86,40 +78,33 @@ matrix:
    # each env setting here is a dedicated build
      - env:
          - BUILDMAN="arm1136"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="arm1136"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="arm1176"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="arm720t"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="arm920t"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="atmel -x avr32"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="avr32"
            TOOLCHAIN="avr32"
      - env:
          - BUILDMAN="davinci"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="denx"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="freescale -x powerpc,m68k,aarch64"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="sandbox x86"
-          TOOLCHAIN="i386"
+          TOOLCHAIN="x86_64"
+      script:
+        - export BUILDMAN_X86="x86:";
+          echo -e "\n[toolchain-prefix]\n${BUILDMAN_X86} ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman
      - env:
          - BUILDMAN="kirkwood"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="m68k"
            TOOLCHAIN="m68k"
@@ -128,46 +113,32 @@ matrix:
            TOOLCHAIN="mips"
      - env:
          - BUILDMAN="mpc512x"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc5xx"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc5xxx"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc8260"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc83xx"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc85xx -x freescale"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="t208xrdb t4qds t102*"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="p1_p2_rdb_pc p1010rdb"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc86xx"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="mpc8xx"
-          TOOLCHAIN="ppc"
      - env:
          - BUILDMAN="siemens"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="ti"
-          TOOLCHAIN="arm"
      - env:
          - BUILDMAN="aarch64"
            TOOLCHAIN="aarch64"
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#14 lore raw

PATCH 5/8 travis-ci: Update toolchain and buildman usage

In reply to Tom Rini
Quoted 6 lines · Tom Rini

- Drop the 'cache' line, travis-ci says to not cache apt packages (and does not).
- Get the Ubuntu provided toolchain for ARM and PowerPC.
- Add more toolchain options that buildman can fetch.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/2755cd19/attachment.sig>
author
#15 lore raw

PATCH 6/8 travis-ci: Add more architectures

In reply to Tom Rini

We can now build for microblaze, sh4 and xtensa.

---
 .travis.yml | 9 +++++++++
 1 file changed, 9 insertions(+)
.travis.yml +9 -0
index 8d1a90eb164b..8ebcfaf996ab 100644
@@ -109,6 +109,9 @@ matrix:
         - BUILDMAN="m68k"
           TOOLCHAIN="m68k"
     - env:
+        - BUILDMAN="microblaze"
+          TOOLCHAIN="microblaze"
+    - env:
         - BUILDMAN="mips"
           TOOLCHAIN="mips"
     - env:
@@ -142,6 +145,12 @@ matrix:
     - env:
         - BUILDMAN="aarch64"
           TOOLCHAIN="aarch64"
+    - env:
+        - BUILDMAN="sh4"
+          TOOLCHAIN="sh4"
+    - env:
+        - BUILDMAN="xtensa"
+          TOOLCHAIN="xtensa"
 
     # QA jobs for code analytics
     # static code analysis with cppcheck (we can add --enable=all later)
Signature · 1 line
1.9.1
#16 lore raw

PATCH 6/8 travis-ci: Add more architectures

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 6 lines

We can now build for microblaze, sh4 and xtensa.

---
  .travis.yml | 9 +++++++++
  1 file changed, 9 insertions(+)

bye,
Heiko

Quoted 29 lines
.travis.yml +9 -0
index 8d1a90eb164b..8ebcfaf996ab 100644
@@ -109,6 +109,9 @@ matrix:
          - BUILDMAN="m68k"
            TOOLCHAIN="m68k"
      - env:
+        - BUILDMAN="microblaze"
+          TOOLCHAIN="microblaze"
+    - env:
          - BUILDMAN="mips"
            TOOLCHAIN="mips"
      - env:
@@ -142,6 +145,12 @@ matrix:
      - env:
          - BUILDMAN="aarch64"
            TOOLCHAIN="aarch64"
+    - env:
+        - BUILDMAN="sh4"
+          TOOLCHAIN="sh4"
+    - env:
+        - BUILDMAN="xtensa"
+          TOOLCHAIN="xtensa"
 
      # QA jobs for code analytics
      # static code analysis with cppcheck (we can add --enable=all later)
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#17 lore raw

PATCH 6/8 travis-ci: Add more architectures

In reply to Tom Rini
Quoted 3 lines · Tom Rini

We can now build for microblaze, sh4 and xtensa.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/cf50184a/attachment.sig>
author
#18 lore raw

PATCH 7/8 travis-ci: Drop 'TEST_CMD'

In reply to Tom Rini

We don't need to use TEST_CMD in order to run tests. We need a BUILDMAN and TOOLCHAIN variable to avoid having to duplicate logic or write some wrapper function. But this makes the tests harder as we add more complex examples.

---
 .travis.yml | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)
.travis.yml +10 -16
index 8ebcfaf996ab..25b0023d631b 100644
@@ -57,10 +57,6 @@ before_script:
   - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
 
 script:
- # the execution sequence for each test
- - if [[ "${TEST_CMD}" != "" ]]; then
-     ${TEST_CMD};
-   fi
  # Exit code 129 means warnings only.
  - if [[ "${BUILDMAN}" != "" ]]; then
      set +e;
@@ -154,24 +150,22 @@ matrix:
 
     # QA jobs for code analytics
     # static code analysis with cppcheck (we can add --enable=all later)
-    - env:
-        - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
+    - script:
+        - cppcheck --force --quiet --inline-suppr .
     # search for TODO within source tree
-    - env:
-        - TEST_CMD="grep -r TODO ."
+    - script:
+        - grep -r TODO .
     # search for FIXME within source tree
-    - env:
-        - TEST_CMD="grep -r FIXME ."
+    - script:
+        - grep -r FIXME .
     # search for HACK within source tree and ignore HACKKIT board
-    - env:
-        - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
       script:
         - grep -r HACK . | grep -v HACKKIT
     # some statistics about the code base
-    - env:
-        - TEST_CMD="sloccount ."
+    - script:
+        - sloccount .
     # test/py
-    - env:
-        - TEST_CMD="./test/py/test.py --bd sandbox --build"
+    - script:
+        - ./test/py/test.py --bd sandbox --build
 
 # TODO make it perfect ;-r
Signature · 1 line
1.9.1
#19 lore raw

PATCH 7/8 travis-ci: Drop 'TEST_CMD'

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 9 lines

We don't need to use TEST_CMD in order to run tests. We need a BUILDMAN and TOOLCHAIN variable to avoid having to duplicate logic or write some wrapper function. But this makes the tests harder as we add more complex examples.

---
  .travis.yml | 26 ++++++++++----------------
  1 file changed, 10 insertions(+), 16 deletions(-)

bye,
Heiko

Quoted 52 lines
.travis.yml +10 -16
index 8ebcfaf996ab..25b0023d631b 100644
@@ -57,10 +57,6 @@ before_script:
    - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi
 
  script:
- # the execution sequence for each test
- - if [[ "${TEST_CMD}" != "" ]]; then
-     ${TEST_CMD};
-   fi
   # Exit code 129 means warnings only.
   - if [[ "${BUILDMAN}" != "" ]]; then
       set +e;
@@ -154,24 +150,22 @@ matrix:
 
      # QA jobs for code analytics
      # static code analysis with cppcheck (we can add --enable=all later)
-    - env:
-        - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
+    - script:
+        - cppcheck --force --quiet --inline-suppr .
      # search for TODO within source tree
-    - env:
-        - TEST_CMD="grep -r TODO ."
+    - script:
+        - grep -r TODO .
      # search for FIXME within source tree
-    - env:
-        - TEST_CMD="grep -r FIXME ."
+    - script:
+        - grep -r FIXME .
      # search for HACK within source tree and ignore HACKKIT board
-    - env:
-        - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
        script:
          - grep -r HACK . | grep -v HACKKIT
      # some statistics about the code base
-    - env:
-        - TEST_CMD="sloccount ."
+    - script:
+        - sloccount .
      # test/py
-    - env:
-        - TEST_CMD="./test/py/test.py --bd sandbox --build"
+    - script:
+        - ./test/py/test.py --bd sandbox --build
 
  # TODO make it perfect ;-r
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author
#20 lore raw

PATCH 7/8 travis-ci: Drop 'TEST_CMD'

In reply to Tom Rini
Quoted 6 lines · Tom Rini

We don't need to use TEST_CMD in order to run tests. We need a BUILDMAN and TOOLCHAIN variable to avoid having to duplicate logic or write some wrapper function. But this makes the tests harder as we add more complex examples.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/20888d52/attachment.sig>
author
#21 lore raw

PATCH 8/8 travis-ci: Add test.py for various qemu platforms

In reply to Tom Rini

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

---
 .travis.yml | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)
.travis.yml +34 -1
index 25b0023d631b..77025128ecd5 100644
@@ -10,6 +10,8 @@ language: c
 
 addons:
   apt:
+    sources:
+    - sourceline: 'ppa:gns3/qemu'
     packages:
     - cppcheck
     - sloccount
@@ -19,6 +21,10 @@ addons:
     - libsdl1.2-dev
     - python
     - python-virtualenv
+    - qemu-system-arm
+    - qemu-system-mips
+    - qemu-system-ppc
+    - qemu-system-x86
     - gcc-powerpc-linux-gnu
     - gcc-arm-linux-gnueabihf
     - iasl
@@ -27,6 +33,9 @@ install:
  # install latest device tree compiler
  - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
  - make -j4 -C /tmp/dtc
+ # Clone uboot-test-hooks
+ - git clone --depth=1 git://github.com/trini/uboot-test-hooks.git /tmp/uboot-test-hooks
+ - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
  # prepare buildman environment
  - export BUILDMAN_ROOT="root:"
  - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman
@@ -38,7 +47,7 @@ install:
 
 env:
   global:
-    - PATH=/tmp/dtc:$PATH
+    - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH
     - BUILD_DIR=build
     - HOSTCC="cc"
     - HOSTCXX="c++"
@@ -167,5 +176,29 @@ matrix:
     # test/py
     - script:
         - ./test/py/test.py --bd sandbox --build
+    - env:
+        - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
+      script:
+        - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
+          ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
+          ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
+    - env:
+        - TOOLCHAIN="mips"
+          CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-"
+      script:
+        - ./test/py/test.py --bd qemu_mips --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mipsel --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mips64 --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mips64el --build -k 'not sleep';
+    - env:
+        - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-"
+      script:
+        - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep'
+    - env:
+        - TOOLCHAIN="x86_64"
+          BUILD_ROM=yes
+          CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-"
+      script:
+        - ./test/py/test.py --bd qemu-x86 --build -k 'not sleep'
 
 # TODO make it perfect ;-r
Signature · 1 line
1.9.1
author
#22 lore raw

PATCH v2 8/8 travis-ci: Add test.py for various qemu platforms

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

---
Ooops, Stephen has merged my request to add the conf files now, so really reference his repository and not mine.

 .travis.yml | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)
.travis.yml +34 -1
index 25b0023d631b..1aff5d607d7e 100644
@@ -10,6 +10,8 @@ language: c
 
 addons:
   apt:
+    sources:
+    - sourceline: 'ppa:gns3/qemu'
     packages:
     - cppcheck
     - sloccount
@@ -19,6 +21,10 @@ addons:
     - libsdl1.2-dev
     - python
     - python-virtualenv
+    - qemu-system-arm
+    - qemu-system-mips
+    - qemu-system-ppc
+    - qemu-system-x86
     - gcc-powerpc-linux-gnu
     - gcc-arm-linux-gnueabihf
     - iasl
@@ -27,6 +33,9 @@ install:
  # install latest device tree compiler
  - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
  - make -j4 -C /tmp/dtc
+ # Clone uboot-test-hooks
+ - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks
+ - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
  # prepare buildman environment
  - export BUILDMAN_ROOT="root:"
  - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman
@@ -38,7 +47,7 @@ install:
 
 env:
   global:
-    - PATH=/tmp/dtc:$PATH
+    - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH
     - BUILD_DIR=build
     - HOSTCC="cc"
     - HOSTCXX="c++"
@@ -167,5 +176,29 @@ matrix:
     # test/py
     - script:
         - ./test/py/test.py --bd sandbox --build
+    - env:
+        - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
+      script:
+        - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
+          ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
+          ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
+    - env:
+        - TOOLCHAIN="mips"
+          CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-"
+      script:
+        - ./test/py/test.py --bd qemu_mips --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mipsel --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mips64 --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mips64el --build -k 'not sleep';
+    - env:
+        - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-"
+      script:
+        - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep'
+    - env:
+        - TOOLCHAIN="x86_64"
+          BUILD_ROM=yes
+          CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-"
+      script:
+        - ./test/py/test.py --bd qemu-x86 --build -k 'not sleep'
 
 # TODO make it perfect ;-r
Signature · 1 line
1.9.1
#23 lore raw

PATCH v2 8/8 travis-ci: Add test.py for various qemu platforms

Quoted 3 lines · Tom Rini

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

Overall, the series,

A few comments on this particular patch below:

.travis.yml language: c · line 14

Quoted 6 lines
.travis.yml +2 -0
 
 addons:
   apt:
+    sources:
+    - sourceline: 'ppa:gns3/qemu'

Have you co-ordinated with "qns3" to ensure that PPA is always going to be available, and host binaries for Ubuntuy 16.04 (some PPAs eventually disappear as the owner moves on to other things, or change the set of distro releases they support at the owner's whim).

Quoted 2 lines

+ # Clone uboot-test-hooks
+ - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks

Does it make sense to rely on my copy of the repo being around all the time? I have no intention of removing it, but when I created it I'd assumed others would create their own clones for their own infra-structure. I wonder if all the dependencies for U-Boot's testing should be hosted on U-Boot infra-structure?

That all said, this should be fine; just something to ponder.

Quoted 1 line

+ - ln -s travis-ci /tmp/uboot-test-hooks/bin/hostname

It may be useful to add the following too:

- ln -s travis-ci /tmp/uboot-test-hooks/py/hostname

That way, if we ever need per-board test configuration files, the path to access them will already be available.

.travis.yml matrix: · line 184

Quoted 6 lines
.travis.yml +6 -0
+    - env:
+        - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
+      script:
+        - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
+          ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
+          ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;

Does it make sense to make that 3 separate scripts? I assume that would
(a) allow the individual status of the 3 test.py invocations to be seen separately (b) might allow/cause travis-ci to run them in parallel; I'm not sure if this Travis config file is a sequential list of commands, or a list of potentially parallel actions.

author
#24 lore raw

PATCH v2 8/8 travis-ci: Add test.py for various qemu platforms

Quoted 17 lines · Stephen Warren
Quoted 3 lines · Tom Rini

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

Overall, the series,

A few comments on this particular patch below:

.travis.yml language: c · line 14

Quoted 6 lines
.travis.yml +0 -0

addons:
apt:

.travis.yml +2 -0
+    sources:
+    - sourceline: 'ppa:gns3/qemu'
Quoted 4 lines

Have you co-ordinated with "qns3" to ensure that PPA is always going to be available, and host binaries for Ubuntuy 16.04 (some PPAs eventually disappear as the owner moves on to other things, or change the set of distro releases they support at the owner's whim).

I don't like this part either. I couldn't find an "official" PPA to provide a newer qemu nor does it appear to be in the official backports channel either. My current plan is that if something happens to the PPA I'll have to host one myself.

Quoted 8 lines
Quoted 2 lines

+ # Clone uboot-test-hooks
+ - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks

Does it make sense to rely on my copy of the repo being around all the time? I have no intention of removing it, but when I created it I'd assumed others would create their own clones for their own infra-structure. I wonder if all the dependencies for U-Boot's testing should be hosted on U-Boot infra-structure?

A good point. The way I've been thinking of it is that we also need a repo with as many and varied configs as possible, which has become yours :). That said, we could move a copy of this over to the u-boot account on github if you'd like.

Quoted 10 lines

That all said, this should be fine; just something to ponder.

Quoted 1 line

+ - ln -s travis-ci /tmp/uboot-test-hooks/bin/hostname

It may be useful to add the following too:

- ln -s travis-ci /tmp/uboot-test-hooks/py/hostname

That way, if we ever need per-board test configuration files, the path to access them will already be available.

A good point. I think we could get the network tests going, maybe with a little re-work to dynamically hash the file from the host side? But that's an aside.

Quoted 7 lines

.travis.yml matrix: · line 184

Quoted 6 lines
.travis.yml +6 -0
+    - env:
+        - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
+      script:
+        - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
+          ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
+          ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
Quoted 5 lines

Does it make sense to make that 3 separate scripts? I assume that would (a) allow the individual status of the 3 test.py invocations to be seen separately (b) might allow/cause travis-ci to run them in parallel; I'm not sure if this Travis config file is a sequential list of commands, or a list of potentially parallel actions.

So, the way travis-ci works is that you can (and we do) split tasks up to run in parallel. The hunk above is a series to run in sequence on the same host. The downside to moving this to parallel is the amount of duplication you need in each stanza. We could fix that (at least in the case of non-buildman-fetched toolchains) if test.py used buildman to build, as that will determine CROSS_COMPILE correctly from the default .buildman file we create earlier on. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161022/b925ed29/attachment.sig>
#25 lore raw

PATCH v2 8/8 travis-ci: Add test.py for various qemu platforms

Quoted 15 lines · Tom Rini
Quoted 5 lines · Stephen Warren
Quoted 3 lines · Tom Rini

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

Quoted 8 lines
Quoted 2 lines

+ # Clone uboot-test-hooks
+ - git clone --depth=1 git://github.com/swarren/uboot-test-hooks.git /tmp/uboot-test-hooks

Does it make sense to rely on my copy of the repo being around all the time? I have no intention of removing it, but when I created it I'd assumed others would create their own clones for their own infra-structure. I wonder if all the dependencies for U-Boot's testing should be hosted on U-Boot infra-structure?

Quoted 4 lines

A good point. The way I've been thinking of it is that we also need a repo with as many and varied configs as possible, which has become yours :). That said, we could move a copy of this over to the u-boot account on github if you'd like.

I think it's fine for now.

Quoted 6 lines
Quoted 6 lines

That all said, this should be fine; just something to ponder.

Quoted 1 line

+ - ln -s travis-ci /tmp/uboot-test-hooks/bin/hostname

It may be useful to add the following too:

Quoted 8 lines
Quoted 4 lines

- ln -s travis-ci /tmp/uboot-test-hooks/py/hostname

That way, if we ever need per-board test configuration files, the path to access them will already be available.

A good point. I think we could get the network tests going, maybe with a little re-work to dynamically hash the file from the host side? But that's an aside.

Yes, assuming qemu networking works, I expect that would be possible. Yes, I think it'd be pretty easy to dynamically create a test download file and calculate the CRC from the per-board Python config files.

Quoted 13 lines
Quoted 7 lines

.travis.yml matrix: · line 184

Quoted 6 lines
.travis.yml +6 -0
+    - env:
+        - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
+      script:
+        - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
+          ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
+          ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
Quoted 5 lines

Does it make sense to make that 3 separate scripts? I assume that would (a) allow the individual status of the 3 test.py invocations to be seen separately (b) might allow/cause travis-ci to run them in parallel; I'm not sure if this Travis config file is a sequential list of commands, or a list of potentially parallel actions.

Quoted 4 lines

So, the way travis-ci works is that you can (and we do) split tasks up to run in parallel. The hunk above is a series to run in sequence on the same host. The downside to moving this to parallel is the amount of duplication you need in each stanza.

The duplication doesn't seem like a terribly big deal given it will allow finer-grained status on the main per-build page.

Quoted 4 lines

We could fix that (at least in the
case of non-buildman-fetched toolchains) if test.py used buildman to build, as that will determine CROSS_COMPILE correctly from the default .buildman file we create earlier on. Thanks!

I'll look into whether that's possible.

BTW, does/can Travis save the test-log.html from the test.py invocations? That would make debugging any failures a little easier.

author
#26 lore raw

PATCH v2 8/8 travis-ci: Add test.py for various qemu platforms

On Mon, Oct 24, 2016 at 04:21:36PM -0600, Stephen Warren wrote:
[snip]

Quoted 2 lines

BTW, does/can Travis save the test-log.html from the test.py invocations? That would make debugging any failures a little easier.

I'm far from a travis "expert". But the real nice thing about it is that you can hook up and test via github. It took maybe 2 minutes to get my u-boot clone going in travis-ci so I could test things out, and that's something I want to emphasize in -rc3 is how easy it is to get a lot more coverage with minimal effort.

So since a script clause is just a bit of bash commands basically, some sort of quick wrapper or maybe just pass in -s to test.py since another nice thing is that the web view will collapse output from each step?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/9f29e6a9/attachment.sig>
author
#27 lore raw

PATCH v2 8/8 travis-ci: Add test.py for various qemu platforms

In reply to Tom Rini
Quoted 5 lines · Tom Rini

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

After adding in Stephen's suggested edit, applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/dda8df13/attachment.sig>
#28 lore raw

PATCH 8/8 travis-ci: Add test.py for various qemu platforms

In reply to Tom Rini

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:

Quoted 8 lines

- Add a PPA for a more recent qemu (required for PowerPC to work)
- Add tests to run test.py for various QEMU platforms. This relies on swarren's uboot-test-hooks repository to provide the abstractions.

---
  .travis.yml | 35 ++++++++++++++++++++++++++++++++++-
  1 file changed, 34 insertions(+), 1 deletion(-)

Great!

bye,
Heiko

Quoted 75 lines
.travis.yml +34 -1
index 25b0023d631b..77025128ecd5 100644
@@ -10,6 +10,8 @@ language: c
 
  addons:
    apt:
+    sources:
+    - sourceline: 'ppa:gns3/qemu'
      packages:
      - cppcheck
      - sloccount
@@ -19,6 +21,10 @@ addons:
      - libsdl1.2-dev
      - python
      - python-virtualenv
+    - qemu-system-arm
+    - qemu-system-mips
+    - qemu-system-ppc
+    - qemu-system-x86
      - gcc-powerpc-linux-gnu
      - gcc-arm-linux-gnueabihf
      - iasl
@@ -27,6 +33,9 @@ install:
   # install latest device tree compiler
   - git clone --depth=1 git://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
   - make -j4 -C /tmp/dtc
+ # Clone uboot-test-hooks
+ - git clone --depth=1 git://github.com/trini/uboot-test-hooks.git /tmp/uboot-test-hooks
+ - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
   # prepare buildman environment
   - export BUILDMAN_ROOT="root:"
   - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman
@@ -38,7 +47,7 @@ install:
 
  env:
    global:
-    - PATH=/tmp/dtc:$PATH
+    - PATH=/tmp/dtc:/tmp/uboot-test-hooks/bin:$PATH
      - BUILD_DIR=build
      - HOSTCC="cc"
      - HOSTCXX="c++"
@@ -167,5 +176,29 @@ matrix:
      # test/py
      - script:
          - ./test/py/test.py --bd sandbox --build
+    - env:
+        - CROSS_COMPILE="/usr/bin/arm-linux-gnueabihf-"
+      script:
+        - ./test/py/test.py --bd vexpress_ca15_tc2 --id qemu --build;
+          ./test/py/test.py --bd vexpress_ca9x4 --id qemu --build;
+          ./test/py/test.py --bd integratorcp_cm926ejs --id qemu --build;
+    - env:
+        - TOOLCHAIN="mips"
+          CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/mips-linux/bin/mips-linux-"
+      script:
+        - ./test/py/test.py --bd qemu_mips --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mipsel --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mips64 --build -k 'not sleep';
+          ./test/py/test.py --bd qemu_mips64el --build -k 'not sleep';
+    - env:
+        - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-"
+      script:
+        - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep'
+    - env:
+        - TOOLCHAIN="x86_64"
+          BUILD_ROM=yes
+          CROSS_COMPILE="${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-"
+      script:
+        - ./test/py/test.py --bd qemu-x86 --build -k 'not sleep'
 
  # TODO make it perfect ;-r
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany