diff mbox

[U-Boot,3/6] travis-ci: centralize ~/.buildman editing

Message ID 20161026170536.2367-3-swarren@wwwdotorg.org
State Accepted
Commit 2ded4bf9bb83a5323290a65b3747d61c02ef8ad5
Delegated to: Tom Rini
Headers show

Commit Message

Stephen Warren Oct. 26, 2016, 5:05 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

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.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 .travis.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Heiko Schocher Oct. 27, 2016, 4:21 a.m. UTC | #1
Hello Stephen,

Am 26.10.2016 um 19:05 schrieb Stephen Warren:
> From: Stephen Warren <swarren@nvidia.com>
>
> 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.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>   .travis.yml | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)

Thanks!

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

bye,
Heiko

>
> diff --git a/.travis.yml b/.travis.yml
> index 33685ce14777..119dec8df5b2 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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:
>
Tom Rini Oct. 29, 2016, 5:41 p.m. UTC | #2
On Wed, Oct 26, 2016 at 11:05:33AM -0600, Stephen Warren wrote:

> From: Stephen Warren <swarren@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> Reviewed-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/.travis.yml b/.travis.yml
index 33685ce14777..119dec8df5b2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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: