[Fuego] [PATCH] common: fix incorrect compatibility of PLATFORM

Tim.Bird at sony.com Tim.Bird at sony.com
Tue Dec 18 02:08:54 UTC 2018



> -----Original Message-----
> From: Liu Wenlong
> Sent: Monday, December 17, 2018 12:04 AM
> From: "Liu Wenlong" <liuwl.fnst at cn.fujitsu.com>
> 
> There is a bug with commit "df2c953". The backwards-compatibility
> support shouldn't be added in phase:pre_test because JOB_BUILD_DIR
> has already been an incorrect value if "TOOLCHAIN" not defined.
> 
> Now, move this support before the definition of JOB_BUILD_DIR.
> 
> Signed-off-by: Liu Wenlong <liuwl.fnst at cn.fujitsu.com>
> ---
>  engine/scripts/common.sh    | 5 +++++
>  engine/scripts/functions.sh | 5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/engine/scripts/common.sh b/engine/scripts/common.sh
> index eed99c0..e19c11d 100644
> --- a/engine/scripts/common.sh
> +++ b/engine/scripts/common.sh
> @@ -231,6 +231,11 @@ function version_lt() {
>      [ "$1" == "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
>  }
> 
> +# support backwards-compatibility with old *-tools.sh files
> +if [ -z "$TOOLCHAIN" ] ; then
> +    TOOLCHAIN="$PLATFORM"
> +fi
> +
>  TEST_HOME="$FUEGO_CORE/engine/tests/${TESTDIR}"
>  export JOB_BUILD_DIR="${JOB_NAME}-${TOOLCHAIN}"
>  TEST_BUILD_DIR="${TESTDIR}-${TOOLCHAIN}"
> diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
> index b0cdb0e..ec0c4b4 100755
> --- a/engine/scripts/functions.sh
> +++ b/engine/scripts/functions.sh
> @@ -505,11 +505,6 @@ function pre_test {
>      # Make sure the target is alive, and prepare workspace for the test
>      source $FUEGO_RO/toolchains/tools.sh
> 
> -    # support backwards-compatibility with old *-tools.sh files
> -    if [ -z "$TOOLCHAIN" ] ; then
> -        TOOLCHAIN="$PLATFORM"
> -    fi
> -
>      is_empty $TESTDIR
> 
>      # create a stub run.json file with some of the test information
> --
> 2.11.0

Nice catch!  Applied.

Thanks,
 -- Tim



More information about the Fuego mailing list