summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-03-18 09:42:49 -0600
committerTom Rini <trini@konsulko.com>2020-04-10 21:24:01 -0400
commite7c05b1fda999e5676289386a956dc56df03eec2 (patch)
tree7e53ffdc02b69252c5c13087077f2c54dca85929
parentf08c8ef9b7d7cf8bbdb744636f64515ac072569d (diff)
travis: Split the building into two parts
Buildman is used in two ways: - to build a selection of boards (with no testing) - to build a single board (and run pytest) The gitlab and azure scrips do this in separate places, but travis does not. To aid the refactoring process and keep the following patches in sync across all three environments, split the code out in travis as well. Use the buildman -w option for the single board. It is easier to understand since it specifies the output directory directly. Also it avoids needing to look at the internal .bm-work directory. This initially creates some duplicate code, but by the end of the series we have two completely different build paths with different arguments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--.travis.yml13
1 files changed, 11 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 601a50d202..23f92095af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -206,7 +206,8 @@ script:
#
# From buildman, exit code 129 means warnings only. If we've been asked to
# use clang only do one configuration.
- - if [[ "${BUILDMAN}" != "" ]]; then
+ # Build a selection of boards if TEST_PY_BD is empty
+ - if [[ "${BUILDMAN}" != "" ]] && [[ "${TEST_PY_BD}" == "" ]]; then
ret=0;
tools/buildman/buildman -P -E ${BUILDMAN} ${OVERRIDE}|| ret=$?;
if [[ $ret -ne 0 && $ret -ne 129 ]]; then
@@ -218,8 +219,9 @@ script:
# never prevent any test from running. That way, we can always pass
# "-k something" even when $TEST_PY_TEST_SPEC doesnt need a custom
# value.
+ # Build just the one board needed for testing, if TEST_PY_BD is non-empty
- if [[ "${TEST_PY_BD}" != "" ]]; then
- export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/.bm-work/${TEST_PY_BD};
+ export UBOOT_TRAVIS_BUILD_DIR=`cd .. && pwd`/${TEST_PY_BD};
cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/;
cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/;
if [[ -e ~/grub_arm.efi ]]; then
@@ -234,6 +236,13 @@ script:
if [[ -e ~/grub_riscv64.efi ]]; then
cp ~/grub_riscv64.efi $UBOOT_TRAVIS_BUILD_DIR/;
fi;
+ ret=0;
+ tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E ${BUILDMAN}
+ ${OVERRIDE}|| ret=$?;
+ if [[ $ret -ne 0 && $ret -ne 129 ]]; then
+ tools/buildman/buildman -sde -o ${UBOOT_TRAVIS_BUILD_DIR} -w ${BUILDMAN};
+ exit $ret;
+ fi;
virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
pip install -r test/py/requirements.txt;