[Fuego] [PATCH] Functional.glib: fixed to support multi version

Tim.Bird at sony.com Tim.Bird at sony.com
Tue Aug 7 00:50:12 UTC 2018


Thanks.  Patch applied to master.

Please note that I only tested the default spec.
  -- Tim


> -----Original Message-----
> From: Li Xiaoming
> Sent: Monday, July 30, 2018 11:39 PM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH] Functional.glib: fixed to support multi version
> 
> Details: glib 2.46 & 2.48 have to add --enable-always-build-tests to
> ./configure, as it does not build tests in default.
>          They also need seveal .c files on board, just like 2.22 need
> gio/tests/Makefile.am.
>          Remove some tests of 2.46 & 2.48 built by make check, as cross-compile
> does not support make check.
> 
> Signed-off-by: Li Xiaoming <lixm.fnst at cn.fujitsu.com>
> ---
>  engine/tests/Functional.glib/fuego_test.sh | 52
> ++++++++++++++++++++++++------
>  engine/tests/Functional.glib/spec.json     | 10 +++++-
>  2 files changed, 52 insertions(+), 10 deletions(-)
> 
> diff --git a/engine/tests/Functional.glib/fuego_test.sh
> b/engine/tests/Functional.glib/fuego_test.sh
> index b69c05c..e3a3811 100755
> --- a/engine/tests/Functional.glib/fuego_test.sh
> +++ b/engine/tests/Functional.glib/fuego_test.sh
> @@ -1,22 +1,50 @@
> -tarball=glib-2.22.1.tar.bz2
> +tarball=glib-$FUNCTIONAL_GLIB_VERSION.tar.bz2
> 
>  function test_build {
> -    patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> +    if [[ $FUNCTIONAL_GLIB_VERSION =~ "2.22" ]] ; then
> +        patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> +    fi
> +
>      # Don't run tests on the build host
>      find . -name 'Makefile*' | xargs sed -i '/@test -z "${TEST_PROGS}" ||
> ${GTESTER} --verbose ${TEST_PROGS}/d'
>      echo -e "glib_cv_stack_grows=no \nglib_cv_uscore=no
> \nac_cv_func_posix_getpwuid_r=no
> \nac_cv_func_nonposix_getpwuid_r=no
> \nac_cv_func_posix_getgrgid_r=no" > config.cross
>      # get updated config.sub and config.guess files, so configure
>      # doesn't reject new toolchains
>      cp /usr/share/misc/config.{sub,guess} .
> -    ./configure --prefix=`pwd`/build --cache-file=config.cross --host=$HOST --
> target=$HOST --build=`uname -m`-linux-gnu CC="$CC" AR="$AR"
> RANLIB="$RANLIB" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP"
> CXXFLAGS="$CXXFLAGS"
> -    make 2>&1
> -    cd tests && make test; cd -
> -    cd glib/tests && make test; cd -
> +
> +    if [[ $FUNCTIONAL_GLIB_VERSION =~ "2.22" ]] ; then
> +        ./configure --prefix=`pwd`/build --cache-file=config.cross --host=$HOST
> --target=$HOST --build=`uname -m`-linux-gnu CC="$CC" AR="$AR"
> RANLIB="$RANLIB" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP"
> CXXFLAGS="$CXXFLAGS"
> +        make 2>&1
> +        cd tests && make test; cd -
> +        cd glib/tests && make test; cd -
> +    fi
> +
> +    if [[ $FUNCTIONAL_GLIB_VERSION =~ "2.46" ]] || [[
> $FUNCTIONAL_GLIB_VERSION =~ "2.48" ]] ; then
> +        ./configure --prefix=`pwd`/build  --enable-always-build-tests --cache-
> file=config.cross --host=$HOST --target=$HOST --build=`uname -m`-linux-gnu
> CC="$CC" AR="$AR" RANLIB="$RANLIB" CXX="$CXX" CPP="$CPP"
> CXXCPP="$CXXCPP" CXXFLAGS="$CXXFLAGS"
> +        make 2>&1
> +        cd tests && make; cd -
> +        cd glib/tests && make; cd -
> +    fi
>  }
> 
>  function test_deploy {
> -	# Makefile.am is used by 'contexts' test. XXX - why?
> -	put gio/tests/Makefile.am `find . -name .libs | xargs -IDIRS find DIRS -
> not -type d -not -name '*.so*' -not -name '*.la*' -perm /u+x`
> $BOARD_TESTDIR/fuego.$TESTDIR/
> +    put `find . -name .libs | xargs -IDIRS find DIRS -not -type d -not -name
> '*.so*' -not -name '*.la*' -perm /u+x`  $BOARD_TESTDIR/fuego.$TESTDIR/
> +
> +    if [[ $FUNCTIONAL_GLIB_VERSION =~ "2.22" ]] ; then
> +        #glib2.22 contexts need gio/tests/Makefile.am
> +        put gio/tests/Makefile.am $BOARD_TESTDIR/fuego.$TESTDIR/
> +    fi
> +
> +    if [[ $FUNCTIONAL_GLIB_VERSION =~ "2.46" ]] || [[
> $FUNCTIONAL_GLIB_VERSION =~ "2.48" ]] ; then
> +        #glib(2.46 2.48) contexts need gio/tests/contexts.c
> +        put gio/tests/contexts.c $BOARD_TESTDIR/fuego.$TESTDIR/
> +
> +        #glib(2.46 2.48) keyfile need
> glib/tests/keyfiletest.ini,glib/tests/keyfile.c,glib/tests/pages.ini
> +        put glib/tests/keyfiletest.ini glib/tests/keyfile.c glib/tests/pages.ini
> $BOARD_TESTDIR/fuego.$TESTDIR/
> +
> +        #glib(2.46 2.48) g-icon need gio/tests/g-icon.c
> +        put gio/tests/g-icon.c $BOARD_TESTDIR/fuego.$TESTDIR/
> +    fi
>  }
> 
>  # Excluded tests
> @@ -40,7 +68,13 @@ function test_deploy {
>  # filter-streams
> 
>  function test_run {
> -	report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./gtester  ./objects
> ./readwrite ./g-file ./fileutils ./data-output-stream ./signal3 ./properties
> ./rand ./memory-input-stream ./sleepy-stream  ./g-icon ./array-test
> ./strfuncs ./testgdateparser ./srvtarget ./threadtests ./keyfile ./string
> ./hostutils ./memory-output-stream ./objects2 ./closures ./scannerapi
> ./testgdate ./data-input-stream ./signal2 ./signal1 ./testgobject ./g-file-info
> ./simple-async-result ./buffered-input-stream ./contexts ./printf
> ./properties2 ./unix-streams "
> +    if [[ $FUNCTIONAL_GLIB_VERSION =~ "2.22" ]] ; then
> +        report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./gtester  ./objects
> ./readwrite ./g-file ./fileutils ./data-output-stream ./signal3 ./properties
> ./rand ./memory-input-stream ./sleepy-stream  ./g-icon ./array-test
> ./strfuncs ./testgdateparser ./srvtarget ./threadtests ./keyfile ./string
> ./hostutils ./memory-output-stream ./objects2 ./closures ./scannerapi
> ./testgdate ./data-input-stream ./signal2 ./signal1 ./testgobject ./g-file-info
> ./simple-async-result ./buffered-input-stream ./contexts ./printf
> ./properties2 ./unix-streams "
> +    fi
> +
> +    if [[ $tarball =~ "2.46" ]] || [[ $FUNCTIONAL_GLIB_VERSION =~ "2.48" ]] ;
> then
> +        report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./gtester ./readwrite  ./g-
> file  ./data-output-stream  ./properties ./rand ./memory-input-stream
> ./sleepy-stream  ./array-test ./strfuncs  ./srvtarget  ./string ./hostutils
> ./memory-output-stream   ./scannerapi ./data-input-stream  ./g-file-info
> ./simple-async-result ./buffered-input-stream   ./test-printf  ./unix-streams
> ./contexts ./keyfile ./g-icon "
> +    fi
>  }
> 
>  function test_processing {
> diff --git a/engine/tests/Functional.glib/spec.json
> b/engine/tests/Functional.glib/spec.json
> index 8bc2da5..23f4a28 100644
> --- a/engine/tests/Functional.glib/spec.json
> +++ b/engine/tests/Functional.glib/spec.json
> @@ -1,6 +1,14 @@
>  {
>      "testName": "Functional.glib",
>      "specs": {
> -        "default": {}
> +        "default": {
> +            "VERSION":"2.22.1"
> +        },
> +        "2-46": {
> +            "VERSION":"2.46.2"
> +        },
> +        "2-48":{
> +            "VERSION":"2.48.2"
> +        }
>      }
>  }
> --
> 2.7.4
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego


More information about the Fuego mailing list