All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH] Functional.glib: support for multic versions glib
@ 2018-07-16 11:29 Li Xiaoming
  2018-07-20 23:53 ` Tim.Bird
  0 siblings, 1 reply; 4+ messages in thread
From: Li Xiaoming @ 2018-07-16 11:29 UTC (permalink / raw)
  To: fuego

Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
---
 engine/tests/Functional.glib/fuego_test.sh | 59 +++++++++++++++++++++++++-----
 engine/tests/Functional.glib/spec.json     | 13 ++++++-
 2 files changed, 62 insertions(+), 10 deletions(-)

diff --git a/engine/tests/Functional.glib/fuego_test.sh b/engine/tests/Functional.glib/fuego_test.sh
index b69c05c..dbcc468 100755
--- a/engine/tests/Functional.glib/fuego_test.sh
+++ b/engine/tests/Functional.glib/fuego_test.sh
@@ -1,22 +1,55 @@
-tarball=glib-2.22.1.tar.bz2
+tarball=$FUNCTIONAL_GLIB_PACKAGE
 
 function test_build {
-    patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
+    if [[ $tarball =~ "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 [[ $tarball =~ "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 [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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 [[ $tarball =~ "2.22" ]]
+    then
+	#glib2.22 contexts nedd gio/tests/Makefile.am
+	put gio/tests/Makefile.am $BOARD_TESTDIR/fuego.$TESTDIR/
+    fi
+
+    if [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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 +73,15 @@ 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 [[ $tarball =~ "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" ]] || [[ $tarball =~ "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..5b06923 100644
--- a/engine/tests/Functional.glib/spec.json
+++ b/engine/tests/Functional.glib/spec.json
@@ -1,6 +1,17 @@
 {
     "testName": "Functional.glib",
     "specs": {
-        "default": {}
+	 "default": {
+	      "VERSION":"2.22.1",
+	      "PACKAGE":"glib-2.22.1.tar.bz2"
+	 },
+	 "2-46": {
+	      "VERSION":"2.46.2",
+	      "PACKAGE":"glib-2.46.2.tar.bz2"
+	 },
+         "2-48":{
+              "VERSION":"2.48.2",
+              "PACKAGE":"glib-2.48.2.tar.bz2"
+	}
     }
 }
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Fuego] [PATCH] Functional.glib: support for multic versions glib
  2018-07-16 11:29 [Fuego] [PATCH] Functional.glib: support for multic versions glib Li Xiaoming
@ 2018-07-20 23:53 ` Tim.Bird
  2018-07-23  6:20   ` Li, Xiaoming
  0 siblings, 1 reply; 4+ messages in thread
From: Tim.Bird @ 2018-07-20 23:53 UTC (permalink / raw)
  To: lixm.fnst, fuego

See comments inline below.

> -----Original Message-----
> From: Li Xiaoming

Some more details in the commit message would be nice.

> 
> Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
> ---
>  engine/tests/Functional.glib/fuego_test.sh | 59
> +++++++++++++++++++++++++-----
>  engine/tests/Functional.glib/spec.json     | 13 ++++++-
>  2 files changed, 62 insertions(+), 10 deletions(-)
> 
> diff --git a/engine/tests/Functional.glib/fuego_test.sh
> b/engine/tests/Functional.glib/fuego_test.sh
> index b69c05c..dbcc468 100755
> --- a/engine/tests/Functional.glib/fuego_test.sh
> +++ b/engine/tests/Functional.glib/fuego_test.sh
> @@ -1,22 +1,55 @@
> -tarball=glib-2.22.1.tar.bz2
> +tarball=$FUNCTIONAL_GLIB_PACKAGE
Interesting use of a dynamic variable here.

The other tarball packages are not available in the Fuego repository.
Will you be adding a patch to provide them?

I think I'd like to eliminate the variable PACKAGE, and just use
VERSION, so this would become:
tarball=glib-$VERSION.tar.bz2

Is there a reason not to move to the latest version of the
tarball, and just use that?  Are there differences in the tests
between 2.22 and 2.48, such that the tests are not backwards
compatible?

> 
>  function test_build {
> -    patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> +    if [[ $tarball =~ "2.22" ]]
> +    then
> +	patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> +    fi
> +
Looks good.  Nice to not need a patch anymore.  If
we just migrate to a later version of the library, we can get
rid of the patch, and this conditional.

>      # 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 [[ $tarball =~ "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 [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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
>  }
> 
This is OK to make these conditional like this, but why have
all three?

>  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 [[ $tarball =~ "2.22" ]]
> +    then
> +	#glib2.22 contexts nedd gio/tests/Makefile.am
'nedd' should be 'needs'?

> +	put gio/tests/Makefile.am $BOARD_TESTDIR/fuego.$TESTDIR/
> +    fi
> +
> +    if [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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 +73,15 @@ 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 [[ $tarball =~ "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" ]] || [[ $tarball =~ "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..5b06923 100644
> --- a/engine/tests/Functional.glib/spec.json
> +++ b/engine/tests/Functional.glib/spec.json
> @@ -1,6 +1,17 @@
>  {
>      "testName": "Functional.glib",
>      "specs": {
> -        "default": {}
> +	 "default": {
> +	      "VERSION":"2.22.1",
> +	      "PACKAGE":"glib-2.22.1.tar.bz2"
> +	 },
> +	 "2-46": {
> +	      "VERSION":"2.46.2",
> +	      "PACKAGE":"glib-2.46.2.tar.bz2"
> +	 },
> +         "2-48":{
> +              "VERSION":"2.48.2",
> +              "PACKAGE":"glib-2.48.2.tar.bz2"
> +	}
>      }
>  }
> --
> 2.7.4


The biggest question here is why keep the older tests
around?  Otherwise, it looks good.
I haven't applied it yet, though, pending some more discussion.
 -- Tim


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fuego] [PATCH] Functional.glib: support for multic versions glib
  2018-07-20 23:53 ` Tim.Bird
@ 2018-07-23  6:20   ` Li, Xiaoming
  2018-07-23 22:16     ` Tim.Bird
  0 siblings, 1 reply; 4+ messages in thread
From: Li, Xiaoming @ 2018-07-23  6:20 UTC (permalink / raw)
  To: Tim.Bird, fuego

Hi Tim

Sorry for my late reply.

Other versions of tarball will be submitted by git merge request, as my mail accout does not support a mail of 5M+ size.

I have investigated on glib2.46 and glib2.48, and make it work.

The reasons of why I keep 3 versions of glib are below:
1). Different board  may have different versions of glib, and I think it looks good to make the board and fuego have the same version of glib.(maybe dont need so, i have not thoutht much about it).

2). Some fuego user may dont want to upgrade their board's glib to a higher version.

3). As you have seen, different versions of glib test suite need different *.c files copied to board,  and i have investigated to make 2.46 and 2.48 work well. It will cost someone of 2) a lot of time of fix this problem if we only keep a latest version.

And i agree with you on the rest review points.


Thanks
Li

-----Original Message-----
From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com] 
Sent: Saturday, July 21, 2018 7:53 AM
To: Li, Xiaoming/李 霄鸣; fuego@lists.linuxfoundation.org
Subject: RE: [Fuego] [PATCH] Functional.glib: support for multic versions glib

See comments inline below.

> -----Original Message-----
> From: Li Xiaoming

Some more details in the commit message would be nice.

> 
> Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
> ---
>  engine/tests/Functional.glib/fuego_test.sh | 59
> +++++++++++++++++++++++++-----
>  engine/tests/Functional.glib/spec.json     | 13 ++++++-
>  2 files changed, 62 insertions(+), 10 deletions(-)
> 
> diff --git a/engine/tests/Functional.glib/fuego_test.sh
> b/engine/tests/Functional.glib/fuego_test.sh
> index b69c05c..dbcc468 100755
> --- a/engine/tests/Functional.glib/fuego_test.sh
> +++ b/engine/tests/Functional.glib/fuego_test.sh
> @@ -1,22 +1,55 @@
> -tarball=glib-2.22.1.tar.bz2
> +tarball=$FUNCTIONAL_GLIB_PACKAGE
Interesting use of a dynamic variable here.

The other tarball packages are not available in the Fuego repository.
Will you be adding a patch to provide them?

I think I'd like to eliminate the variable PACKAGE, and just use VERSION, so this would become:
tarball=glib-$VERSION.tar.bz2

Is there a reason not to move to the latest version of the tarball, and just use that?  Are there differences in the tests between 2.22 and 2.48, such that the tests are not backwards compatible?

> 
>  function test_build {
> -    patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> +    if [[ $tarball =~ "2.22" ]]
> +    then
> +	patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> +    fi
> +
Looks good.  Nice to not need a patch anymore.  If we just migrate to a later version of the library, we can get rid of the patch, and this conditional.

>      # 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 [[ $tarball =~ "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 [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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
>  }
> 
This is OK to make these conditional like this, but why have all three?

>  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 [[ $tarball =~ "2.22" ]]
> +    then
> +	#glib2.22 contexts nedd gio/tests/Makefile.am
'nedd' should be 'needs'?

> +	put gio/tests/Makefile.am $BOARD_TESTDIR/fuego.$TESTDIR/
> +    fi
> +
> +    if [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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 +73,15 @@ 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 [[ $tarball =~ "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" ]] || [[ $tarball =~ "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..5b06923 100644
> --- a/engine/tests/Functional.glib/spec.json
> +++ b/engine/tests/Functional.glib/spec.json
> @@ -1,6 +1,17 @@
>  {
>      "testName": "Functional.glib",
>      "specs": {
> -        "default": {}
> +	 "default": {
> +	      "VERSION":"2.22.1",
> +	      "PACKAGE":"glib-2.22.1.tar.bz2"
> +	 },
> +	 "2-46": {
> +	      "VERSION":"2.46.2",
> +	      "PACKAGE":"glib-2.46.2.tar.bz2"
> +	 },
> +         "2-48":{
> +              "VERSION":"2.48.2",
> +              "PACKAGE":"glib-2.48.2.tar.bz2"
> +	}
>      }
>  }
> --
> 2.7.4


The biggest question here is why keep the older tests around?  Otherwise, it looks good.
I haven't applied it yet, though, pending some more discussion.
 -- Tim






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Fuego] [PATCH] Functional.glib: support for multic versions glib
  2018-07-23  6:20   ` Li, Xiaoming
@ 2018-07-23 22:16     ` Tim.Bird
  0 siblings, 0 replies; 4+ messages in thread
From: Tim.Bird @ 2018-07-23 22:16 UTC (permalink / raw)
  To: lixm.fnst, fuego



> -----Original Message-----
> From: Li, Xiaoming 
> Hi Tim
> 
> Sorry for my late reply.
> 
> Other versions of tarball will be submitted by git merge request, as my mail
> accout does not support a mail of 5M+ size.
> 
> I have investigated on glib2.46 and glib2.48, and make it work.

OK. Sounds good.  I will look for a pull request shortly.
(Please note I'll be out of the office for the rest of this week, so
I won't respond until Monday at the earliest.)


> The reasons of why I keep 3 versions of glib are below:
> 1). Different board  may have different versions of glib, and I think it looks
> good to make the board and fuego have the same version of glib.(maybe
> dont need so, i have not thoutht much about it).
> 
> 2). Some fuego user may dont want to upgrade their board's glib to a higher
> version.

I don't think Fuego should impose a version of glib to test, so this sounds
OK.  We should be able to test whatever version of glib is on the target
board.

> 3). As you have seen, different versions of glib test suite need different *.c
> files copied to board,  and i have investigated to make 2.46 and 2.48 work
> well. It will cost someone of 2) a lot of time of fix this problem if we only
> keep a latest version.

OK.  I think it's worth checking to see if the tests are backwards-compatible.
I'm not sure how the glib tests work.  Do they compile programs against the
library on the target?  In this case, if the API has changed, then there could
be issues.

> 
> And i agree with you on the rest review points.

OK Thanks.
 -- Tim

> -----Original Message-----
> From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com]
> Sent: Saturday, July 21, 2018 7:53 AM
> To: Li, Xiaoming/李 霄鸣; fuego@lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH] Functional.glib: support for multic versions glib
> 
> See comments inline below.
> 
> > -----Original Message-----
> > From: Li Xiaoming
> 
> Some more details in the commit message would be nice.
> 
> >
> > Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
> > ---
> >  engine/tests/Functional.glib/fuego_test.sh | 59
> > +++++++++++++++++++++++++-----
> >  engine/tests/Functional.glib/spec.json     | 13 ++++++-
> >  2 files changed, 62 insertions(+), 10 deletions(-)
> >
> > diff --git a/engine/tests/Functional.glib/fuego_test.sh
> > b/engine/tests/Functional.glib/fuego_test.sh
> > index b69c05c..dbcc468 100755
> > --- a/engine/tests/Functional.glib/fuego_test.sh
> > +++ b/engine/tests/Functional.glib/fuego_test.sh
> > @@ -1,22 +1,55 @@
> > -tarball=glib-2.22.1.tar.bz2
> > +tarball=$FUNCTIONAL_GLIB_PACKAGE
> Interesting use of a dynamic variable here.
> 
> The other tarball packages are not available in the Fuego repository.
> Will you be adding a patch to provide them?
> 
> I think I'd like to eliminate the variable PACKAGE, and just use VERSION, so
> this would become:
> tarball=glib-$VERSION.tar.bz2
> 
> Is there a reason not to move to the latest version of the tarball, and just use
> that?  Are there differences in the tests between 2.22 and 2.48, such that the
> tests are not backwards compatible?
> 
> >
> >  function test_build {
> > -    patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> > +    if [[ $tarball =~ "2.22" ]]
> > +    then
> > +	patch -p0 -N -s < $TEST_HOME/glib-strfuncs.patch
> > +    fi
> > +
> Looks good.  Nice to not need a patch anymore.  If we just migrate to a later
> version of the library, we can get rid of the patch, and this conditional.
> 
> >      # 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 [[ $tarball =~ "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 [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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
> >  }
> >
> This is OK to make these conditional like this, but why have all three?
> 
> >  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 [[ $tarball =~ "2.22" ]]
> > +    then
> > +	#glib2.22 contexts nedd gio/tests/Makefile.am
> 'nedd' should be 'needs'?
> 
> > +	put gio/tests/Makefile.am $BOARD_TESTDIR/fuego.$TESTDIR/
> > +    fi
> > +
> > +    if [[ $tarball =~ "2.46" ]] || [[ $tarball =~ "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 +73,15 @@ 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 [[ $tarball =~ "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" ]] || [[ $tarball =~ "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..5b06923 100644
> > --- a/engine/tests/Functional.glib/spec.json
> > +++ b/engine/tests/Functional.glib/spec.json
> > @@ -1,6 +1,17 @@
> >  {
> >      "testName": "Functional.glib",
> >      "specs": {
> > -        "default": {}
> > +	 "default": {
> > +	      "VERSION":"2.22.1",
> > +	      "PACKAGE":"glib-2.22.1.tar.bz2"
> > +	 },
> > +	 "2-46": {
> > +	      "VERSION":"2.46.2",
> > +	      "PACKAGE":"glib-2.46.2.tar.bz2"
> > +	 },
> > +         "2-48":{
> > +              "VERSION":"2.48.2",
> > +              "PACKAGE":"glib-2.48.2.tar.bz2"
> > +	}
> >      }
> >  }
> > --
> > 2.7.4
> 
> 
> The biggest question here is why keep the older tests around?  Otherwise, it
> looks good.
> I haven't applied it yet, though, pending some more discussion.
>  -- Tim
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-23 22:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 11:29 [Fuego] [PATCH] Functional.glib: support for multic versions glib Li Xiaoming
2018-07-20 23:53 ` Tim.Bird
2018-07-23  6:20   ` Li, Xiaoming
2018-07-23 22:16     ` Tim.Bird

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.