travis: Add sandbox/clang-7 support

To make testing with clang support easier, add sandbox/clang-7
combination to our testing matrix.  To facilitate this, switch to using
the "sources" method that the travis.yml file supports to list
additional repositories and add the official one for llvm-7.  Due to
buildman not supporting using clang at this time add logic to manually
build a single sandbox configuration in the expected output directory so
that we can still invoke all of our tests.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
lime2-spi
Tom Rini 6 years ago
parent 758694ff07
commit 4030f166f9
  1. 27
      .travis.yml

@ -10,6 +10,9 @@ language: c
addons: addons:
apt: apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
packages: packages:
- cppcheck - cppcheck
- sloccount - sloccount
@ -28,11 +31,8 @@ addons:
- device-tree-compiler - device-tree-compiler
- lzop - lzop
- liblz4-tool - liblz4-tool
- libisl15
before_install: - clang-7
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -q
- sudo apt-get install libisl15 -y
install: install:
# Clone uboot-test-hooks # Clone uboot-test-hooks
@ -105,8 +105,16 @@ script:
# Comments must be outside the command strings below, or the Travis parser # Comments must be outside the command strings below, or the Travis parser
# will get confused. # will get confused.
# #
# Exit code 129 means warnings only. # From buildman, exit code 129 means warnings only. If we've been asked to
- if [[ "${BUILDMAN}" != "" ]]; then # use clang only do one configuration.
- if [[ "${TOOLCHAIN}" == "clang" ]]; then
ret=0;
make O=../.bm-work/${TEST_PY_BD} HOSTCC=clang-7 CC=clang-7 -j$(nproc)
KCFLAGS=-Werror sandbox_config all || ret=$?;
if [[ $ret -ne 0 ]]; then
exit $ret;
fi;
elif [[ "${BUILDMAN}" != "" ]]; then
ret=0; ret=0;
tools/buildman/buildman -P -E ${BUILDMAN} || ret=$?; tools/buildman/buildman -P -E ${BUILDMAN} || ret=$?;
if [[ $ret -ne 0 && $ret -ne 129 ]]; then if [[ $ret -ne 0 && $ret -ne 129 ]]; then
@ -322,6 +330,11 @@ matrix:
- TEST_PY_BD="sandbox" - TEST_PY_BD="sandbox"
BUILDMAN="^sandbox$" BUILDMAN="^sandbox$"
TOOLCHAIN="i386" TOOLCHAIN="i386"
- name: "test/py sandbox with clang"
env:
- TEST_PY_BD="sandbox"
BUILDMAN="^sandbox$"
TOOLCHAIN="clang"
- name: "test/py sandbox_spl" - name: "test/py sandbox_spl"
env: env:
- TEST_PY_BD="sandbox_spl" - TEST_PY_BD="sandbox_spl"

Loading…
Cancel
Save