[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 5/6] travis.yml: Detach build and test steps
From: |
Thomas Huth |
Subject: |
Re: [PATCH v1 5/6] travis.yml: Detach build and test steps |
Date: |
Tue, 7 Jan 2020 16:24:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 07/01/2020 14.53, Alex Bennée wrote:
> From: Wainer dos Santos Moschetta <address@hidden>
>
> Currently build and test commands are a single step in a
> Travis's `script` block. In order to see the output
> of the tests one needs to scroll down the log to find where
> the build messages ended and the limit is not clear. If
> they were in different steps then Travis would print the
> result build command, which can be easily grep'ed.
>
> So this change is made to detach those commands
> to ease the visualization of the output.
>
> Note that all steps on the `script` block is executed regardless
> if one previous has failed. To overcome it, let's save the
> return code of the build then check whether succeed or failed on
> the test step.
>
> Signed-off-by: Wainer dos Santos Moschetta <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Tested-by: Philippe Mathieu-Daudé <address@hidden>
> Signed-off-by: Alex Bennée <address@hidden>
> Message-Id: <address@hidden>
> ---
> .travis.yml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 93838bf0f8b..848a2714efe 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -94,7 +94,8 @@ before_script:
> - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
> - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log &&
> exit 1; }
> script:
> - - make -j3 && travis_retry ${TEST_CMD}
> + - BUILD_RC=0 && make -j3 || BUILD_RC=$?
What about using "|| exit 1" instead of "|| BUILD_RC=$?" ?
> + - if [ "$BUILD_RC" -eq 0 ] ; then travis_retry ${TEST_CMD} ; else $(exit
> $BUILD_RC); fi
> after_script:
> - if command -v ccache ; then ccache --show-stats ; fi
>
>
Thomas