All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/8] Various travis-ci improvements
@ 2016-10-20 19:25 Tom Rini
  2016-10-20 19:25 ` [U-Boot] [PATCH 1/8] test/py: ensure a log section exists for skipped tests Tom Rini
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:25 UTC (permalink / raw)
  To: u-boot

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.

-- 
Tom

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

* [U-Boot] [PATCH 1/8] test/py: ensure a log section exists for skipped tests
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
@ 2016-10-20 19:25 ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr' Tom Rini
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:25 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

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.

Cc: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Reported-by: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 test/py/conftest.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/test/py/conftest.py b/test/py/conftest.py
index 5b3a92316bbf..1f15e3e33dcf 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -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'
-- 
1.9.1

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

* [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr'
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
  2016-10-20 19:25 ` [U-Boot] [PATCH 1/8] test/py: ensure a log section exists for skipped tests Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-21  7:27   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git Tom Rini
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 18bf2ed4fcdb..845f6cad9400 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,8 @@
 
 # build U-Boot on Travis CI - https://travis-ci.org/
 
-sudo: true
+sudo: required
+dist: trusty
 
 language: c
 
-- 
1.9.1

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

* [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
  2016-10-20 19:25 ` [U-Boot] [PATCH 1/8] test/py: ensure a log section exists for skipped tests Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr' Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-21  7:32   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal Tom Rini
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 845f6cad9400..2f1d05d443f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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:"
-- 
1.9.1

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

* [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
                   ` (2 preceding siblings ...)
  2016-10-20 19:26 ` [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-21  7:39   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage Tom Rini
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

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 <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 2f1d05d443f5..d93efe02b0b1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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:
-- 
1.9.1

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

* [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
                   ` (3 preceding siblings ...)
  2016-10-20 19:26 ` [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-21  7:40   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 6/8] travis-ci: Add more architectures Tom Rini
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 59 +++++++++++++++--------------------------------------------
 1 file changed, 15 insertions(+), 44 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index d93efe02b0b1..8d1a90eb164b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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"
-- 
1.9.1

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

* [U-Boot] [PATCH 6/8] travis-ci: Add more architectures
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
                   ` (4 preceding siblings ...)
  2016-10-20 19:26 ` [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-21  7:41   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD' Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms Tom Rini
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

We can now build for microblaze, sh4 and xtensa.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 8d1a90eb164b..8ebcfaf996ab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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)
-- 
1.9.1

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

* [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD'
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
                   ` (5 preceding siblings ...)
  2016-10-20 19:26 ` [U-Boot] [PATCH 6/8] travis-ci: Add more architectures Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-21  7:54   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  2016-10-20 19:26 ` [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms Tom Rini
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8ebcfaf996ab..25b0023d631b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
-- 
1.9.1

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

* [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
                   ` (6 preceding siblings ...)
  2016-10-20 19:26 ` [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD' Tom Rini
@ 2016-10-20 19:26 ` Tom Rini
  2016-10-20 19:40   ` [U-Boot] [PATCH v2 " Tom Rini
  2016-10-21  9:22   ` [U-Boot] [PATCH " Heiko Schocher
  7 siblings, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:26 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .travis.yml | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 25b0023d631b..77025128ecd5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
-- 
1.9.1

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

* [U-Boot] [PATCH v2 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-20 19:26 ` [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms Tom Rini
@ 2016-10-20 19:40   ` Tom Rini
  2016-10-21 18:24     ` Stephen Warren
  2016-10-24 15:23     ` Tom Rini
  2016-10-21  9:22   ` [U-Boot] [PATCH " Heiko Schocher
  1 sibling, 2 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-20 19:40 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Tom Rini <trini@konsulko.com>
---
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(-)

diff --git a/.travis.yml b/.travis.yml
index 25b0023d631b..1aff5d607d7e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
-- 
1.9.1

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

* [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr'
  2016-10-20 19:26 ` [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr' Tom Rini
@ 2016-10-21  7:27   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  7:27 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:
> In order to make other various improvements, update to the latest
> environment travis-ci supports.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   .travis.yml | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
>
> diff --git a/.travis.yml b/.travis.yml
> index 18bf2ed4fcdb..845f6cad9400 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -3,7 +3,8 @@
>
>   # build U-Boot on Travis CI - https://travis-ci.org/
>
> -sudo: true
> +sudo: required
> +dist: trusty
>
>   language: c
>
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git
  2016-10-20 19:26 ` [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git Tom Rini
@ 2016-10-21  7:32   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  7:32 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb 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.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   .travis.yml | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

>
> diff --git a/.travis.yml b/.travis.yml
> index 845f6cad9400..2f1d05d443f5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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:"
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal
  2016-10-20 19:26 ` [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal Tom Rini
@ 2016-10-21  7:39   ` Heiko Schocher
  2016-10-21 11:19     ` Tom Rini
  2016-10-24 15:23   ` Tom Rini
  1 sibling, 1 reply; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  7:39 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb 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 <hs@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>

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:

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
> ---
>   .travis.yml | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/.travis.yml b/.travis.yml
> index 2f1d05d443f5..d93efe02b0b1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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:
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage
  2016-10-20 19:26 ` [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage Tom Rini
@ 2016-10-21  7:40   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  7:40 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb 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.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   .travis.yml | 59 +++++++++++++++--------------------------------------------
>   1 file changed, 15 insertions(+), 44 deletions(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
>
> diff --git a/.travis.yml b/.travis.yml
> index d93efe02b0b1..8d1a90eb164b 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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"
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 6/8] travis-ci: Add more architectures
  2016-10-20 19:26 ` [U-Boot] [PATCH 6/8] travis-ci: Add more architectures Tom Rini
@ 2016-10-21  7:41   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  7:41 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb Tom Rini:
> We can now build for microblaze, sh4 and xtensa.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   .travis.yml | 9 +++++++++
>   1 file changed, 9 insertions(+)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
>
> diff --git a/.travis.yml b/.travis.yml
> index 8d1a90eb164b..8ebcfaf996ab 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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)
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD'
  2016-10-20 19:26 ` [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD' Tom Rini
@ 2016-10-21  7:54   ` Heiko Schocher
  2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  7:54 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb 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.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   .travis.yml | 26 ++++++++++----------------
>   1 file changed, 10 insertions(+), 16 deletions(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

>
> diff --git a/.travis.yml b/.travis.yml
> index 8ebcfaf996ab..25b0023d631b 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-20 19:26 ` [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms Tom Rini
  2016-10-20 19:40   ` [U-Boot] [PATCH v2 " Tom Rini
@ 2016-10-21  9:22   ` Heiko Schocher
  1 sibling, 0 replies; 29+ messages in thread
From: Heiko Schocher @ 2016-10-21  9:22 UTC (permalink / raw)
  To: u-boot

Hello Tom,

Am 20.10.2016 um 21:26 schrieb 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.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   .travis.yml | 35 ++++++++++++++++++++++++++++++++++-
>   1 file changed, 34 insertions(+), 1 deletion(-)

Great!

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

>
> diff --git a/.travis.yml b/.travis.yml
> index 25b0023d631b..77025128ecd5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

* [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal
  2016-10-21  7:39   ` Heiko Schocher
@ 2016-10-21 11:19     ` Tom Rini
  0 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-21 11:19 UTC (permalink / raw)
  To: u-boot

On Fri, Oct 21, 2016 at 09:39:28AM +0200, Heiko Schocher wrote:
> Hello Tom,
> 
> Am 20.10.2016 um 21:26 schrieb 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 <hs@denx.de>
> >Signed-off-by: Tom Rini <trini@konsulko.com>
> 
> You mean here this "Warning (unit_address_vs_reg):" warnings?

And a few others as well, depending on toolchain.

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

> Nevertheless: we should at least fix this for travis, so:
> 
> Reviewed-by: Heiko Schocher <hs@denx.de>

Thanks!

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

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

* [U-Boot] [PATCH v2 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-20 19:40   ` [U-Boot] [PATCH v2 " Tom Rini
@ 2016-10-21 18:24     ` Stephen Warren
  2016-10-22 12:56       ` Tom Rini
  2016-10-24 15:23     ` Tom Rini
  1 sibling, 1 reply; 29+ messages in thread
From: Stephen Warren @ 2016-10-21 18:24 UTC (permalink / raw)
  To: u-boot

On 10/20/2016 01:40 PM, Tom Rini wrote:
> - 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,
Acked-by: Stephen Warren <swarren@nvidia.com>

A few comments on this particular patch below:

> diff --git a/.travis.yml b/.travis.yml

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

> + # 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.

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

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

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

* [U-Boot] [PATCH v2 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-21 18:24     ` Stephen Warren
@ 2016-10-22 12:56       ` Tom Rini
  2016-10-24 22:21         ` Stephen Warren
  0 siblings, 1 reply; 29+ messages in thread
From: Tom Rini @ 2016-10-22 12:56 UTC (permalink / raw)
  To: u-boot

On Fri, Oct 21, 2016 at 12:24:07PM -0600, Stephen Warren wrote:
> On 10/20/2016 01:40 PM, Tom Rini wrote:
> >- 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,
> Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> A few comments on this particular patch below:
> 
> >diff --git a/.travis.yml b/.travis.yml
> 
> > 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).

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.

> >+ # 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.

> That all said, this should be fine; just something to ponder.
> 
> >+ - 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.

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

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!

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

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

* [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr'
  2016-10-20 19:26 ` [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr' Tom Rini
  2016-10-21  7:27   ` Heiko Schocher
@ 2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:26:00PM -0400, Tom Rini wrote:

> In order to make other various improvements, update to the latest
> environment travis-ci supports.
> 
> 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: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/b64d0387/attachment.sig>

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

* [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git
  2016-10-20 19:26 ` [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git Tom Rini
  2016-10-21  7:32   ` Heiko Schocher
@ 2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:26:01PM -0400, Tom Rini wrote:

> 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.
> 
> 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: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/2516ce18/attachment.sig>

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

* [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal
  2016-10-20 19:26 ` [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal Tom Rini
  2016-10-21  7:39   ` Heiko Schocher
@ 2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:26:02PM -0400, Tom Rini wrote:

> 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 <hs@denx.de>
> 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: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/9fa616ef/attachment.sig>

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

* [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage
  2016-10-20 19:26 ` [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage Tom Rini
  2016-10-21  7:40   ` Heiko Schocher
@ 2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:26:03PM -0400, Tom Rini wrote:

> - 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.
> 
> 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: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/2755cd19/attachment.sig>

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

* [U-Boot] [PATCH 6/8] travis-ci: Add more architectures
  2016-10-20 19:26 ` [U-Boot] [PATCH 6/8] travis-ci: Add more architectures Tom Rini
  2016-10-21  7:41   ` Heiko Schocher
@ 2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:26:04PM -0400, Tom Rini wrote:

> We can now build for microblaze, sh4 and xtensa.
> 
> 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: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/cf50184a/attachment.sig>

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

* [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD'
  2016-10-20 19:26 ` [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD' Tom Rini
  2016-10-21  7:54   ` Heiko Schocher
@ 2016-10-24 15:23   ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:26:05PM -0400, Tom Rini wrote:

> 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.
> 
> 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: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161024/20888d52/attachment.sig>

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

* [U-Boot] [PATCH v2 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-20 19:40   ` [U-Boot] [PATCH v2 " Tom Rini
  2016-10-21 18:24     ` Stephen Warren
@ 2016-10-24 15:23     ` Tom Rini
  1 sibling, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 20, 2016 at 03:40:20PM -0400, Tom Rini wrote:

> - 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.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

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

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

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

* [U-Boot] [PATCH v2 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-22 12:56       ` Tom Rini
@ 2016-10-24 22:21         ` Stephen Warren
  2016-10-24 22:46           ` Tom Rini
  0 siblings, 1 reply; 29+ messages in thread
From: Stephen Warren @ 2016-10-24 22:21 UTC (permalink / raw)
  To: u-boot

On 10/22/2016 06:56 AM, Tom Rini wrote:
> On Fri, Oct 21, 2016 at 12:24:07PM -0600, Stephen Warren wrote:
>> On 10/20/2016 01:40 PM, Tom Rini wrote:
>>> - 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.

>>> + # 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.

I think it's fine for now.

>> That all said, this should be fine; just something to ponder.
>>
>>> + - 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.

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.

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

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

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

* [U-Boot] [PATCH v2 8/8] travis-ci: Add test.py for various qemu platforms
  2016-10-24 22:21         ` Stephen Warren
@ 2016-10-24 22:46           ` Tom Rini
  0 siblings, 0 replies; 29+ messages in thread
From: Tom Rini @ 2016-10-24 22:46 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 24, 2016 at 04:21:36PM -0600, Stephen Warren wrote:
[snip]
> 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?

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

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

end of thread, other threads:[~2016-10-24 22:46 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 19:25 [U-Boot] [PATCH 0/8] Various travis-ci improvements Tom Rini
2016-10-20 19:25 ` [U-Boot] [PATCH 1/8] test/py: ensure a log section exists for skipped tests Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 2/8] travis-ci: Switch to Ubuntu 14.04 'Trusty Tahr' Tom Rini
2016-10-21  7:27   ` Heiko Schocher
2016-10-24 15:23   ` Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 3/8] travis-ci: Use a git URI for dtc.git Tom Rini
2016-10-21  7:32   ` Heiko Schocher
2016-10-24 15:23   ` Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 4/8] travis-ci: Do not make buildman warnings fatal Tom Rini
2016-10-21  7:39   ` Heiko Schocher
2016-10-21 11:19     ` Tom Rini
2016-10-24 15:23   ` Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 5/8] travis-ci: Update toolchain and buildman usage Tom Rini
2016-10-21  7:40   ` Heiko Schocher
2016-10-24 15:23   ` Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 6/8] travis-ci: Add more architectures Tom Rini
2016-10-21  7:41   ` Heiko Schocher
2016-10-24 15:23   ` Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 7/8] travis-ci: Drop 'TEST_CMD' Tom Rini
2016-10-21  7:54   ` Heiko Schocher
2016-10-24 15:23   ` Tom Rini
2016-10-20 19:26 ` [U-Boot] [PATCH 8/8] travis-ci: Add test.py for various qemu platforms Tom Rini
2016-10-20 19:40   ` [U-Boot] [PATCH v2 " Tom Rini
2016-10-21 18:24     ` Stephen Warren
2016-10-22 12:56       ` Tom Rini
2016-10-24 22:21         ` Stephen Warren
2016-10-24 22:46           ` Tom Rini
2016-10-24 15:23     ` Tom Rini
2016-10-21  9:22   ` [U-Boot] [PATCH " Heiko Schocher

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.