Patchwork [2/2] socat: enable ptest

login
register
mail settings
Submitter Hongxu Jia
Date Feb. 13, 2014, 2:54 a.m.
Message ID <44d5a04a1b2ed639f0f65a05418a63d4cfe7b6d5.1392259689.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/66671/
State New
Headers show

Comments

Hongxu Jia - Feb. 13, 2014, 2:54 a.m.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-connectivity/socat/socat/run-ptest  |  5 +++++
 meta/recipes-connectivity/socat/socat_1.7.2.3.bb | 12 ++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-connectivity/socat/socat/run-ptest
Khem Raj - Feb. 13, 2014, 3:26 a.m.
-Khem
On Feb 12, 2014 6:57 PM, "Hongxu Jia" <hongxu.jia@windriver.com> wrote:
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/recipes-connectivity/socat/socat/run-ptest  |  5 +++++
>  meta/recipes-connectivity/socat/socat_1.7.2.3.bb | 12 ++++++++++--
>  2 files changed, 15 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-connectivity/socat/socat/run-ptest
>
> diff --git a/meta/recipes-connectivity/socat/socat/run-ptest
b/meta/recipes-connectivity/socat/socat/run-ptest
> new file mode 100644
> index 0000000..1fffab1
> --- /dev/null
> +++ b/meta/recipes-connectivity/socat/socat/run-ptest
> @@ -0,0 +1,5 @@
> +#!/bin/bash

is bash really needed ?
> +
> +export SOCAT="/usr/bin/socat"
> +
> +./test.sh
> diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.3.bbb/meta/recipes-connectivity/socat/
socat_1.7.2.3.bb
> index 99060b1..2e763bb 100644
> --- a/meta/recipes-connectivity/socat/socat_1.7.2.3.bb
> +++ b/meta/recipes-connectivity/socat/socat_1.7.2.3.bb
> @@ -7,6 +7,8 @@ SECTION = "console/network"
>
>  DEPENDS = "openssl readline"
>
> +RDEPENDS_${PN}-ptest += "bash"
> +
>  LICENSE = "GPL-2.0+-with-OpenSSL-exception"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
>
 file://README;beginline=252;endline=282;md5=79246f11a1db0b6ccec54d1fb711c01e"
> @@ -14,7 +16,9 @@ LIC_FILES_CHKSUM =
"file://COPYING;md5=18810669f13b87348459e611d31ab760 \
>
>  SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2\
>             file://compile.patch \
> -           file://fix-xxx_SHIFT-autoheader.patch"
> +           file://fix-xxx_SHIFT-autoheader.patch \
> +           file://run-ptest \
> +"
>
>  SRC_URI[md5sum] = "75008d8baf7c6c9e27aa7afb34a622de"
>  SRC_URI[sha256sum] =
"0598ac54af7b138cda9e3c141bcf0cc63eeb2ab31f468a772dc3f7eb3896aad0"
> @@ -27,7 +31,7 @@ EXTRA_OECONF += "ac_cv_have_z_modifier=yes
sc_cv_sys_crdly_shift=9 \
>          ac_cv_ispeed_offset=13 \
>  "
>
> -inherit autotools
> +inherit autotools ptest
>
>  do_configure_prepend() {
>      sed '/AC_DEFINE_UNQUOTED(ISPEED_OFFSET/a\AC_DEFINE(OSPEED_OFFSET,\
> @@ -38,3 +42,7 @@ do_install_prepend () {
>      mkdir -p ${D}${bindir}
>      install -d ${D}${bindir} ${D}${mandir}/man1
>  }
> +
> +do_install_ptest() {
> +    cp -r ${S}/*.sh ${D}${PTEST_PATH}
> +}
> --
> 1.8.1.2
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hongxu Jia - Feb. 13, 2014, 3:38 a.m.
On 02/13/2014 11:26 AM, Khem Raj wrote:
>
> -Khem
> On Feb 12, 2014 6:57 PM, "Hongxu Jia" <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>> wrote:
> >
> > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>>
> > ---
> >  meta/recipes-connectivity/socat/socat/run-ptest  |  5 +++++
> >  meta/recipes-connectivity/socat/socat_1.7.2.3.bb 
> <http://socat_1.7.2.3.bb> | 12 ++++++++++--
> >  2 files changed, 15 insertions(+), 2 deletions(-)
> >  create mode 100644 meta/recipes-connectivity/socat/socat/run-ptest
> >
> > diff --git a/meta/recipes-connectivity/socat/socat/run-ptest 
> b/meta/recipes-connectivity/socat/socat/run-ptest
> > new file mode 100644
> > index 0000000..1fffab1
> > --- /dev/null
> > +++ b/meta/recipes-connectivity/socat/socat/run-ptest
> > @@ -0,0 +1,5 @@
> > +#!/bin/bash
>
> is bash really needed ?
>

Yes, I am sure.
The socat's FAQ:
...
  23 Q: I succeeded to configure and make socat, but ./test.sh says 
something
  24 like:
  25 ./test.sh: No such file or directory
  26
  27 A: You need a bash shell, and its location must be correctly 
specified in the
  28 first line of test.sh, e.g. /usr/local/bin/bash instead of /bin/bash.
...

//Hongxu

> > +
> > +export SOCAT="/usr/bin/socat"
> > +
> > +./test.sh
> > diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.3.bb 
> <http://socat_1.7.2.3.bb> 
> b/meta/recipes-connectivity/socat/socat_1.7.2.3.bb 
> <http://socat_1.7.2.3.bb>
> > index 99060b1..2e763bb 100644
> > --- a/meta/recipes-connectivity/socat/socat_1.7.2.3.bb 
> <http://socat_1.7.2.3.bb>
> > +++ b/meta/recipes-connectivity/socat/socat_1.7.2.3.bb 
> <http://socat_1.7.2.3.bb>
> > @@ -7,6 +7,8 @@ SECTION = "console/network"
> >
> >  DEPENDS = "openssl readline"
> >
> > +RDEPENDS_${PN}-ptest += "bash"
> > +
> >  LICENSE = "GPL-2.0+-with-OpenSSL-exception"
> >  LIC_FILES_CHKSUM = 
> "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
> > 
>  file://README;beginline=252;endline=282;md5=79246f11a1db0b6ccec54d1fb711c01e"
> > @@ -14,7 +16,9 @@ LIC_FILES_CHKSUM = 
> "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
> >
> >  SRC_URI = 
> "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 
> <http://www.dest-unreach.org/socat/download/socat-$%7BPV%7D.tar.bz2> \
> >             file://compile.patch \
> > -           file://fix-xxx_SHIFT-autoheader.patch"
> > +           file://fix-xxx_SHIFT-autoheader.patch \
> > +           file://run-ptest \
> > +"
> >
> >  SRC_URI[md5sum] = "75008d8baf7c6c9e27aa7afb34a622de"
> >  SRC_URI[sha256sum] = 
> "0598ac54af7b138cda9e3c141bcf0cc63eeb2ab31f468a772dc3f7eb3896aad0"
> > @@ -27,7 +31,7 @@ EXTRA_OECONF += "ac_cv_have_z_modifier=yes 
> sc_cv_sys_crdly_shift=9 \
> >          ac_cv_ispeed_offset=13 \
> >  "
> >
> > -inherit autotools
> > +inherit autotools ptest
> >
> >  do_configure_prepend() {
> >      sed '/AC_DEFINE_UNQUOTED(ISPEED_OFFSET/a\AC_DEFINE(OSPEED_OFFSET,\
> > @@ -38,3 +42,7 @@ do_install_prepend () {
> >      mkdir -p ${D}${bindir}
> >      install -d ${D}${bindir} ${D}${mandir}/man1
> >  }
> > +
> > +do_install_ptest() {
> > +    cp -r ${S}/*.sh ${D}${PTEST_PATH}
> > +}
> > --
> > 1.8.1.2
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org 
> <mailto:Openembedded-core@lists.openembedded.org>
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
Khem Raj - Feb. 13, 2014, 3:48 a.m.
On Feb 12, 2014, at 7:38 PM, Hongxu Jia <hongxu.jia@windriver.com> wrote:

> On 02/13/2014 11:26 AM, Khem Raj wrote:
>> -Khem
>> On Feb 12, 2014 6:57 PM, "Hongxu Jia" <hongxu.jia@windriver.com> wrote:
>> >
>> > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> > ---
>> >  meta/recipes-connectivity/socat/socat/run-ptest  |  5 +++++
>> >  meta/recipes-connectivity/socat/socat_1.7.2.3.bb | 12 ++++++++++--
>> >  2 files changed, 15 insertions(+), 2 deletions(-)
>> >  create mode 100644 meta/recipes-connectivity/socat/socat/run-ptest
>> >
>> > diff --git a/meta/recipes-connectivity/socat/socat/run-ptest b/meta/recipes-connectivity/socat/socat/run-ptest
>> > new file mode 100644
>> > index 0000000..1fffab1
>> > --- /dev/null
>> > +++ b/meta/recipes-connectivity/socat/socat/run-ptest
>> > @@ -0,0 +1,5 @@
>> > +#!/bin/bash
>> 
>> is bash really needed ?
> 
> Yes, I am sure.
> The socat's FAQ:
> ...
>  23 Q: I succeeded to configure and make socat, but ./test.sh says something
>  24 like:
>  25 ./test.sh: No such file or directory
>  26 
>  27 A: You need a bash shell, and its location must be correctly specified in the
>  28 first line of test.sh, e.g. /usr/local/bin/bash instead of /bin/bash.

OK thx

Patch

diff --git a/meta/recipes-connectivity/socat/socat/run-ptest b/meta/recipes-connectivity/socat/socat/run-ptest
new file mode 100644
index 0000000..1fffab1
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat/run-ptest
@@ -0,0 +1,5 @@ 
+#!/bin/bash
+
+export SOCAT="/usr/bin/socat"
+
+./test.sh
diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.3.bb b/meta/recipes-connectivity/socat/socat_1.7.2.3.bb
index 99060b1..2e763bb 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.2.3.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.2.3.bb
@@ -7,6 +7,8 @@  SECTION = "console/network"
 
 DEPENDS = "openssl readline"
 
+RDEPENDS_${PN}-ptest += "bash"
+
 LICENSE = "GPL-2.0+-with-OpenSSL-exception"
 LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
                     file://README;beginline=252;endline=282;md5=79246f11a1db0b6ccec54d1fb711c01e"
@@ -14,7 +16,9 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \
 
 SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
            file://compile.patch \
-           file://fix-xxx_SHIFT-autoheader.patch"
+           file://fix-xxx_SHIFT-autoheader.patch \
+           file://run-ptest \
+"
 
 SRC_URI[md5sum] = "75008d8baf7c6c9e27aa7afb34a622de"
 SRC_URI[sha256sum] = "0598ac54af7b138cda9e3c141bcf0cc63eeb2ab31f468a772dc3f7eb3896aad0"
@@ -27,7 +31,7 @@  EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \
         ac_cv_ispeed_offset=13 \
 "
 
-inherit autotools
+inherit autotools ptest
 
 do_configure_prepend() {
     sed '/AC_DEFINE_UNQUOTED(ISPEED_OFFSET/a\AC_DEFINE(OSPEED_OFFSET,\
@@ -38,3 +42,7 @@  do_install_prepend () {
     mkdir -p ${D}${bindir}
     install -d ${D}${bindir} ${D}${mandir}/man1
 }
+
+do_install_ptest() {
+    cp -r ${S}/*.sh ${D}${PTEST_PATH}
+}