travis: Test out-of-tree builds
RFC PATCH 1/1 travis: Test out-of-tree builds
Force one config to build 'out-of-tree' (object files and executables are created in a tree outside the project source code).
---
I noticed various out-of-tree issue in the last 2 merge windows.
Pseudo-randomly picked a build from the matrix which covers system + user.
.travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
.travis.yml +7 -1
@@ -50,6 +50,8 @@ notifications: on_failure: always env: global: + - SRC_DIR="." + - BUILD_DIR="." - TEST_CMD="make check" - MAKEFLAGS="-j3" matrix:
@@ -69,11 +71,15 @@ before_install: - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ - git submodule update --init --recursive before_script: - - ./configure ${CONFIG} || { cat config.log && exit 1; } + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} + - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; } script: - make ${MAKEFLAGS} && ${TEST_CMD} matrix: include: + # Test out-of-tree builds + - env: CONFIG="--enable-debug --enable-debug-tcg" + BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.." # Test with Clang for compile portability (Travis uses clang-5.0) - env: CONFIG="--disable-system" compiler: clang
Signature · 1 line
2.18.0.rc2
Quoted 29 lines · Philippe Mathieu-Daudé
Force one config to build 'out-of-tree' (object files and executables are created in a tree outside the project source code).
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
I noticed various out-of-tree issue in the last 2 merge windows.Pseudo-randomly picked a build from the matrix which covers system + user.
.travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-).travis.yml +2
-0@@ -50,6 +50,8 @@ notifications: on_failure: always env: global: + - SRC_DIR="." + - BUILD_DIR="." - TEST_CMD="make check" - MAKEFLAGS="-j3" matrix:@@ -69,11 +71,15 @@ before_install: - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ - git submodule update --init --recursive before_script:
.travis.yml before_install: · line 82
Quoted 10 lines
.travis.yml +5
-1- - ./configure ${CONFIG} || { cat config.log && exit 1; } + - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} + - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; } script: - make ${MAKEFLAGS} && ${TEST_CMD} matrix: include: + # Test out-of-tree builds + - env: CONFIG="--enable-debug --enable-debug-tcg" + BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
Is a three-level nesting really necessary? I think a simple './build' dir should do.
Quoted 6 lines
.travis.yml +0
-0# Test with Clang for compile portability (Travis uses clang-5.0) - env: CONFIG="--disable-system" compiler: clangSignature · 1 line
2.18.0.rc2
Fam
Quoted 6 lines · Philippe Mathieu-Daudé
Force one config to build 'out-of-tree' (object files and executables are created in a tree outside the project source code).
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
I noticed various out-of-tree issue in the last 2 merge windows.
That's odd, because all my pre-merge build tests are out-of-tree (in-tree is the case I don't cover). Presumably they were only for specific oddball configs ?
(Not that there's any harm in covering this in travis too.)
thanks
-- PMM