travis-ci: Use = not : when writing ~/.buildman
PATCH 1/6 travis-ci: Use = not : when writing ~/.buildman
From: Stephen Warren <[email protected]>
Travis CI seems to be confused when there's a colon in an echo command, and this is currently worked around using a variable that contains the text we want to echo. Use = syntax instead so that we can remove the work-around; it's rather confusing until you find out what it's for.
--- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
.travis.yml +2 -4
@@ -38,8 +38,7 @@ install: - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` # prepare buildman environment - - export BUILDMAN_ROOT="root:" - - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman + - echo -e "[toolchain]\nroot = /usr" > ~/.buildman - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman - cat ~/.buildman - virtualenv /tmp/venv
@@ -105,8 +104,7 @@ matrix: - BUILDMAN="sandbox x86" 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 + - echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman - env: - BUILDMAN="kirkwood" - env:
Signature · 1 line
2.10.1
PATCH 2/6 travis-ci: use correct exit code on errors
From: Stephen Warren <[email protected]>
The phrase "if [ $? -ne 0 ]; then exit $?; fi" doesn't work correctly; by the time the "exit" statement runs, $? has already been over-written by the result of the [ command. Fix this by explicitly storing $? and then using that stored value in both the test and the error-case exit statement.
This change also converts from textual comparison to integer comparison, since the exit code is an integer and there's no need to convert it to a string for comparison.
--- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
.travis.yml +4 -3
@@ -70,11 +70,12 @@ script: - if [[ "${BUILDMAN}" != "" ]]; then set +e; tools/buildman/buildman ${BUILDMAN}; - if [[ "$?" == "0" || "$?" == "129" ]]; then + ret=$?; + if [[ $ret -eq 0 || $ret -eq 129 ]]; then exit 0; else - exit $?; - fi + exit $ret; + fi; fi matrix:
Signature · 1 line
2.10.1
PATCH 2/6 travis-ci: use correct exit code on errors
Hello Stephen,
Am 26.10.2016 um 19:05 schrieb Stephen Warren:
Quoted 8 lines
From: Stephen Warren <[email protected]>
The phrase "if [ $? -ne 0 ]; then exit $?; fi" doesn't work correctly; by the time the "exit" statement runs, $? has already been over-written by the result of the [ command. Fix this by explicitly storing $? and then using that stored value in both the test and the error-case exit statement.
Quoted 8 lines
This change also converts from textual comparison to integer comparison, since the exit code is an integer and there's no need to convert it to a string for comparison.
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Thanks!
bye,
Heiko
Quoted 22 lines
.travis.yml +4
-3@@ -70,11 +70,12 @@ script: - if [[ "${BUILDMAN}" != "" ]]; then set +e; tools/buildman/buildman ${BUILDMAN}; - if [[ "$?" == "0" || "$?" == "129" ]]; then + ret=$?; + if [[ $ret -eq 0 || $ret -eq 129 ]]; then exit 0; else - exit $?; - fi + exit $ret; + fi; fi matrix:
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/6 travis-ci: use correct exit code on errors
In reply to Stephen WarrenQuoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The phrase "if [ $? -ne 0 ]; then exit $?; fi" doesn't work correctly; by the time the "exit" statement runs, $? has already been over-written by the result of the [ command. Fix this by explicitly storing $? and then using that stored value in both the test and the error-case exit statement.
Quoted 6 lines
This change also converts from textual comparison to integer comparison, since the exit code is an integer and there's no need to convert it to a string for comparison.
Signed-off-by Stephen Warren <[email protected]>Reviewed-by 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/20161029/2db0863c/attachment.sig>
PATCH 3/6 travis-ci: centralize ~/.buildman editing
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Any time an x86 toolchain is used, we need to edit ~/.buildman to reference it. Move the editing logic into a central place so that it doesn't have to be duplicated everywhere that uses the x86 toolchain; future patches will add additional cases where it's used.
It would be nice if we could unconditionally write all of ~/.buildman at once. Unfortunately, buildman fails if any toolchain mentioned in a toolchain-prefix entry doesn't exist, even if it doesn't need to use it for the current build.
The sandbox/x86 build definition currently does nothing more than edit ~/.buildman; no builds are run. Fix this by not defining a custom script for this build, and hence preventing that stanza from replacing the default script.
--- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
.travis.yml +4 -3
@@ -62,7 +62,10 @@ before_script: - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; 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}" == *x86_64* ]]; then + ./tools/buildman/buildman --fetch-arch x86_64; + echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman; + fi - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi script:
@@ -104,8 +107,6 @@ matrix: - env: - BUILDMAN="sandbox x86" TOOLCHAIN="x86_64" - script: - - echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman - env: - BUILDMAN="kirkwood" - env:
Signature · 1 line
2.10.1
PATCH 3/6 travis-ci: centralize ~/.buildman editing
Hello Stephen,
Am 26.10.2016 um 19:05 schrieb Stephen Warren:
Quoted 17 lines
From: Stephen Warren <[email protected]>
Any time an x86 toolchain is used, we need to edit ~/.buildman to reference it. Move the editing logic into a central place so that it doesn't have to be duplicated everywhere that uses the x86 toolchain; future patches will add additional cases where it's used.
It would be nice if we could unconditionally write all of ~/.buildman at once. Unfortunately, buildman fails if any toolchain mentioned in a toolchain-prefix entry doesn't exist, even if it doesn't need to use it for the current build.
The sandbox/x86 build definition currently does nothing more than edit ~/.buildman; no builds are run. Fix this by not defining a custom script for this build, and hence preventing that stanza from replacing the default script.
Quoted 4 lines
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Thanks!
bye,
Heiko
Quoted 27 lines
.travis.yml +4
-3@@ -62,7 +62,10 @@ before_script: - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; 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}" == *x86_64* ]]; then + ./tools/buildman/buildman --fetch-arch x86_64; + echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman; + fi - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi script:@@ -104,8 +107,6 @@ matrix: - env: - BUILDMAN="sandbox x86" TOOLCHAIN="x86_64" - script: - - echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman - env: - BUILDMAN="kirkwood" - env:
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 3/6 travis-ci: centralize ~/.buildman editing
In reply to Stephen WarrenQuoted 12 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Any time an x86 toolchain is used, we need to edit ~/.buildman to reference it. Move the editing logic into a central place so that it doesn't have to be duplicated everywhere that uses the x86 toolchain; future patches will add additional cases where it's used.
It would be nice if we could unconditionally write all of ~/.buildman at once. Unfortunately, buildman fails if any toolchain mentioned in a toolchain-prefix entry doesn't exist, even if it doesn't need to use it for the current build.
Quoted 7 lines
The sandbox/x86 build definition currently does nothing more than edit ~/.buildman; no builds are run. Fix this by not defining a custom script for this build, and hence preventing that stanza from replacing the default script.
Signed-off-by Stephen Warren <[email protected]>Reviewed-by 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/20161029/4b542466/attachment.sig>
PATCH 4/6 travis-ci: use buildman -P everywhere
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
This places build results into a board-specific directory rather than a buildman-thread-specific directory. This is required so that we can access the directory from test.py, and there's no risk of a particular build's results being over-written by another build performed by the same thread.
In theory, this can lead to slower builds when building many different boards in a single buildman thread, since it removes the possibility of incremental builds between boards. In practice however I didn't notice longer build times when when enabling this option; if anything build times decreased although I suspect that's simply due to general variations in build performance across different machines within the Travis CI infra-structure.
--- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.travis.yml +1 -1
@@ -72,7 +72,7 @@ script: # Exit code 129 means warnings only. - if [[ "${BUILDMAN}" != "" ]]; then set +e; - tools/buildman/buildman ${BUILDMAN}; + tools/buildman/buildman -P ${BUILDMAN}; ret=$?; if [[ $ret -eq 0 || $ret -eq 129 ]]; then exit 0;
Signature · 1 line
2.10.1
PATCH 4/6 travis-ci: use buildman -P everywhere
Hello Stephen,
Am 26.10.2016 um 19:05 schrieb Stephen Warren:
Quoted 16 lines
From: Stephen Warren <[email protected]>
This places build results into a board-specific directory rather than a buildman-thread-specific directory. This is required so that we can access the directory from
test.py, and there's no risk of a particular build's results being over-written by another build performed by the same thread.In theory, this can lead to slower builds when building many different boards in a single buildman thread, since it removes the possibility of incremental builds between boards. In practice however I didn't notice longer build times when when enabling this option; if anything build times decreased although I suspect that's simply due to general variations in build performance across different machines within the Travis CI infra-structure.
Quoted 4 lines
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
bye,
Heiko
Quoted 15 lines
.travis.yml +1
-1@@ -72,7 +72,7 @@ script: # Exit code 129 means warnings only. - if [[ "${BUILDMAN}" != "" ]]; then set +e; - tools/buildman/buildman ${BUILDMAN}; + tools/buildman/buildman -P ${BUILDMAN}; ret=$?; if [[ $ret -eq 0 || $ret -eq 129 ]]; then exit 0;
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 4/6 travis-ci: use buildman -P everywhere
In reply to Stephen WarrenQuoted 16 lines · Stephen Warren
From: Stephen Warren <[email protected]>
This places build results into a board-specific directory rather than a buildman-thread-specific directory. This is required so that we can access the directory from
test.py, and there's no risk of a particular build's results being over-written by another build performed by the same thread.In theory, this can lead to slower builds when building many different boards in a single buildman thread, since it removes the possibility of incremental builds between boards. In practice however I didn't notice longer build times when when enabling this option; if anything build times decreased although I suspect that's simply due to general variations in build performance across different machines within the Travis CI infra-structure.
Quoted 2 lines
Signed-off-by Stephen Warren <[email protected]>Reviewed-by 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/20161029/e013b926/attachment.sig>
PATCH 5/6 travis-ci: don't invoke exit on success
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Invoking exit prevents any subsequent build commands from running, and future patches will add extra commands.
--- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
.travis.yml +1 -3
@@ -74,9 +74,7 @@ script: set +e; tools/buildman/buildman -P ${BUILDMAN}; ret=$?; - if [[ $ret -eq 0 || $ret -eq 129 ]]; then - exit 0; - else + if [[ $ret -ne 0 && $ret -ne 129 ]]; then exit $ret; fi; fi
Signature · 1 line
2.10.1
PATCH 5/6 travis-ci: don't invoke exit on success
Hello Stephen,
Am 26.10.2016 um 19:05 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
Invoking exit prevents any subsequent build commands from running, and future patches will add extra commands.
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Thanks!
bye,
Heiko
Quoted 17 lines
.travis.yml +1
-3@@ -74,9 +74,7 @@ script: set +e; tools/buildman/buildman -P ${BUILDMAN}; ret=$?; - if [[ $ret -eq 0 || $ret -eq 129 ]]; then - exit 0; - else + if [[ $ret -ne 0 && $ret -ne 129 ]]; then exit $ret; fi; fi
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 5/6 travis-ci: don't invoke exit on success
In reply to Stephen WarrenQuoted 7 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Invoking exit prevents any subsequent build commands from running, and future patches will add extra commands.
Signed-off-by Stephen Warren <[email protected]>Reviewed-by 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/20161029/d21163c4/attachment.sig>
PATCH 6/6 travis-ci: compile with buildman when running test/py
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
Use buildman to compile any U-Boot binary tested by test/py. This re-uses all the work done elsewhere to make buildman work within Travis-CI, in particular related to toolchain downloading and buildman config file creation.
--- .travis.yml | 81 ++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 27 deletions(-)
.travis.yml +54 -27
@@ -69,6 +69,9 @@ before_script: - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi script: + # Comments must be outside the command strings below, or the Travis parser + # will get confused. + # # Exit code 129 means warnings only. - if [[ "${BUILDMAN}" != "" ]]; then set +e;
@@ -78,6 +81,15 @@ script: exit $ret; fi; fi + # "not a_test_which_does_not_exist" is a dummy -k parameter which will + # 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. + - if [[ "${TEST_PY_BD}" != "" ]]; then + ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} + -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" + --build-dir `cd .. && pwd`/.bm-work/${TEST_PY_BD}; + fi matrix: include:
@@ -178,38 +190,53 @@ matrix: - JOB="sloccount" script: - sloccount . + # test/py - env: - - JOB="test.py sandbox" - script: - - ./test/py/test.py --bd sandbox --build + - TEST_PY_BD="sandbox" + BUILDMAN="^sandbox$" + TOOLCHAIN="x86_64" - env: - - JOB="test.py ARM" - - 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; + - TEST_PY_BD="vexpress_ca15_tc2" + TEST_PY_ID="--id qemu" + BUILDMAN="^vexpress_ca15_tc2$" - env: - - JOB="test.py MIPS" - - 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'; + - TEST_PY_BD="vexpress_ca9x4" + TEST_PY_ID="--id qemu" + BUILDMAN="^vexpress_ca9x4$" - env: - - JOB="test.py PowerPC" - - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-" - script: - - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep' + - TEST_PY_BD="integratorcp_cm926ejs" + TEST_PY_ID="--id qemu" + BUILDMAN="^integratorcp_cm926ejs$" - env: - - JOB="test.py x86-64" - - 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' + - TEST_PY_BD="qemu_mips" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mips$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu_mipsel" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mipsel$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu_mips64" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mips64$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu_mips64el" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mips64el$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu-ppce500" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu-ppce500$" + - env: + - TEST_PY_BD="qemu-x76" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu-x86$" + TOOLCHAIN="x86_64" + BUILD_ROM="yes" # TODO make it perfect ;-r
Signature · 1 line
2.10.1
PATCH 6/6 travis-ci: compile with buildman when running test/py
.travis.yml matrix: · line 236
Quoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Use buildman to compile any U-Boot binary tested by test/py. This re-uses all the work done elsewhere to make buildman work within Travis-CI, in particular related to toolchain downloading and buildman config file creation.
.travis.yml +2
-0+ - env: + - TEST_PY_BD="qemu-x76"
Oops, that should be "86" not "76". I thought I'd fixed that, but must have accidentally rebased the fix away:-(
I'll wait for any other comments before reposting.
PATCH 6/6 travis-ci: compile with buildman when running test/py
In reply to Stephen WarrenQuoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Use buildman to compile any U-Boot binary tested by test/py. This re-uses all the work done elsewhere to make buildman work within Travis-CI, in particular related to toolchain downloading and buildman config file creation.
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 81 ++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 27 deletions(-)
Thanks for fixing all of this so we can use buildman with test.py. My only real concern with this patch series is that now that we're doing N jobs for test.py, is the setup/tear-down time for each machine causing the job to run longer? Or do things like the "big" powerpc/arm jobs run long enough that they're still going when we hit this?
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/20161026/6faec8b0/attachment.sig>
PATCH 6/6 travis-ci: compile with buildman when running test/py
Quoted 14 lines · Tom Rini
Quoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Use buildman to compile any U-Boot binary tested by test/py. This re-uses all the work done elsewhere to make buildman work within Travis-CI, in particular related to toolchain downloading and buildman config file creation.
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 81 ++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 27 deletions(-)
Quoted 5 lines
Thanks for fixing all of this so we can use buildman with
test.py. My only real concern with this patch series is that now that we're doing N jobs fortest.py, is the setup/tear-down time for each machine causing the job to run longer? Or do things like the "big" powerpc/arm jobs run long enough that they're still going when we hit this?
These jobs all take 1-4 minutes each, whereas a number of the build jobs take over 30 minutes. Since there's some serialization (I've only see 5 jobs at most run in parallel), the extra separate setup probably does increase the overall build time a tiny amount, but it doesn't seem significant.
If we want, we could probably make TEST_PY_BD a list, and have the test script loop over the entries, assuming that extra shell script logic doesn't confuse Travis YAML parser:-(
PATCH 6/6 travis-ci: compile with buildman when running test/py
In reply to Stephen WarrenHello Stephen,
Am 26.10.2016 um 19:05 schrieb Stephen Warren:
Quoted 11 lines
From: Stephen Warren <[email protected]>
Use buildman to compile any U-Boot binary tested by test/py. This re-uses all the work done elsewhere to make buildman work within Travis-CI, in particular related to toolchain downloading and buildman config file creation.
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 81 ++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 27 deletions(-)
Thanks!
bye,
Heiko
Quoted 113 lines
.travis.yml +54
-27@@ -69,6 +69,9 @@ before_script: - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then ./tools/buildman/buildman --fetch-arch xtensa ; fi script: + # Comments must be outside the command strings below, or the Travis parser + # will get confused. + # # Exit code 129 means warnings only. - if [[ "${BUILDMAN}" != "" ]]; then set +e;@@ -78,6 +81,15 @@ script: exit $ret; fi; fi + # "not a_test_which_does_not_exist" is a dummy -k parameter which will + # 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. + - if [[ "${TEST_PY_BD}" != "" ]]; then + ./test/py/test.py --bd ${TEST_PY_BD} ${TEST_PY_ID} + -k "${TEST_PY_TEST_SPEC:-not a_test_which_does_not_exist}" + --build-dir `cd .. && pwd`/.bm-work/${TEST_PY_BD}; + fi matrix: include:@@ -178,38 +190,53 @@ matrix: - JOB="sloccount" script: - sloccount . + # test/py - env: - - JOB="test.py sandbox" - script: - - ./test/py/test.py --bd sandbox --build + - TEST_PY_BD="sandbox" + BUILDMAN="^sandbox$" + TOOLCHAIN="x86_64" - env: - - JOB="test.py ARM" - - 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; + - TEST_PY_BD="vexpress_ca15_tc2" + TEST_PY_ID="--id qemu" + BUILDMAN="^vexpress_ca15_tc2$" - env: - - JOB="test.py MIPS" - - 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'; + - TEST_PY_BD="vexpress_ca9x4" + TEST_PY_ID="--id qemu" + BUILDMAN="^vexpress_ca9x4$" - env: - - JOB="test.py PowerPC" - - CROSS_COMPILE="/usr/bin/powerpc-linux-gnu-" - script: - - ./test/py/test.py --bd qemu-ppce500 --build -k 'not sleep' + - TEST_PY_BD="integratorcp_cm926ejs" + TEST_PY_ID="--id qemu" + BUILDMAN="^integratorcp_cm926ejs$" - env: - - JOB="test.py x86-64" - - 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' + - TEST_PY_BD="qemu_mips" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mips$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu_mipsel" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mipsel$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu_mips64" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mips64$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu_mips64el" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu_mips64el$" + TOOLCHAIN="mips" + - env: + - TEST_PY_BD="qemu-ppce500" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu-ppce500$" + - env: + - TEST_PY_BD="qemu-x76" + TEST_PY_TEST_SPEC="not sleep" + BUILDMAN="^qemu-x86$" + TOOLCHAIN="x86_64" + BUILD_ROM="yes" # 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
PATCH 6/6 travis-ci: compile with buildman when running test/py
In reply to Stephen WarrenQuoted 9 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Use buildman to compile any U-Boot binary tested by test/py. This re-uses all the work done elsewhere to make buildman work within Travis-CI, in particular related to toolchain downloading and buildman config file creation.
Signed-off-by Stephen Warren <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Fixed the typo for qemu-x86 and 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/20161029/547e91b1/attachment.sig>
PATCH 1/6 travis-ci: Use = not : when writing ~/.buildman
In reply to Stephen WarrenHello Stephen,
Am 26.10.2016 um 19:05 schrieb Stephen Warren:
Quoted 11 lines
From: Stephen Warren <[email protected]>
Travis CI seems to be confused when there's a colon in an echo command, and this is currently worked around using a variable that contains the text we want to echo. Use = syntax instead so that we can remove the work-around; it's rather confusing until you find out what it's for.
Signed-off-by Stephen Warren <[email protected]>--- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Thanks!
bye,
Heiko
Quoted 26 lines
.travis.yml +2
-4@@ -38,8 +38,7 @@ install: - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` # prepare buildman environment - - export BUILDMAN_ROOT="root:" - - echo -e "[toolchain]\n${BUILDMAN_ROOT} /usr" > ~/.buildman + - echo -e "[toolchain]\nroot = /usr" > ~/.buildman - echo -e "\n[toolchain-alias]\nblackfin = bfin\nsh = sh4\nopenrisc = or32" >> ~/.buildman - cat ~/.buildman - virtualenv /tmp/venv@@ -105,8 +104,7 @@ matrix: - BUILDMAN="sandbox x86" 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 + - echo -e "\n[toolchain-prefix]\nx86 = ${HOME}/.buildman-toolchains/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-" >> ~/.buildman - env: - BUILDMAN="kirkwood" - env:
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/6 travis-ci: Use = not : when writing ~/.buildman
In reply to Stephen WarrenQuoted 9 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Travis CI seems to be confused when there's a colon in an echo command, and this is currently worked around using a variable that contains the text we want to echo. Use = syntax instead so that we can remove the work-around; it's rather confusing until you find out what it's for.
Signed-off-by Stephen Warren <[email protected]>Reviewed-by 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/20161029/4340b514/attachment.sig>