diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-04-11 15:02:33 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-12 09:29:06 +0100 |
commit | dcfef9fef02f7d122a21c9df47c906fdf1ca0097 (patch) | |
tree | 88258045f3d460a3a1f8ed162d86a7e32487d419 /meta | |
parent | 99ec53a051b4118631f91250775e1ca16ccb315b (diff) | |
download | poky-dcfef9fef02f7d122a21c9df47c906fdf1ca0097.tar.gz |
ruby: add ptest
(From OE-Core rev: 46f47b700ef7f58c8095db9bd3b4b867a6447360)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/ruby/ruby.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/ruby/ruby/run-ptest | 13 | ||||
-rw-r--r-- | meta/recipes-devtools/ruby/ruby_2.5.3.bb | 10 |
3 files changed, 24 insertions, 1 deletions
diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc index 28e21fee9c..1ecd087d7d 100644 --- a/meta/recipes-devtools/ruby/ruby.inc +++ b/meta/recipes-devtools/ruby/ruby.inc | |||
@@ -24,7 +24,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ | |||
24 | " | 24 | " |
25 | UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" | 25 | UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" |
26 | 26 | ||
27 | inherit autotools | 27 | inherit autotools ptest |
28 | 28 | ||
29 | 29 | ||
30 | # This snippet lets compiled extensions which rely on external libraries, | 30 | # This snippet lets compiled extensions which rely on external libraries, |
diff --git a/meta/recipes-devtools/ruby/ruby/run-ptest b/meta/recipes-devtools/ruby/ruby/run-ptest new file mode 100644 index 0000000000..de7c415aba --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/run-ptest | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | test_fullname=`find test -name test_*.rb` | ||
4 | |||
5 | for i in ${test_fullname}; do | ||
6 | ruby ./test/runner.rb ${i} 2>&1 > /dev/null | ||
7 | ret=$? | ||
8 | if [ $ret != 0 ]; then | ||
9 | echo "FAIL: ${i}" | ||
10 | else | ||
11 | echo "PASS: ${i}" | ||
12 | fi | ||
13 | done | ||
diff --git a/meta/recipes-devtools/ruby/ruby_2.5.3.bb b/meta/recipes-devtools/ruby/ruby_2.5.3.bb index 173b44b377..519daf294f 100644 --- a/meta/recipes-devtools/ruby/ruby_2.5.3.bb +++ b/meta/recipes-devtools/ruby/ruby_2.5.3.bb | |||
@@ -3,6 +3,7 @@ require ruby.inc | |||
3 | SRC_URI += " \ | 3 | SRC_URI += " \ |
4 | file://ruby-CVE-2017-9226.patch \ | 4 | file://ruby-CVE-2017-9226.patch \ |
5 | file://ruby-CVE-2017-9228.patch \ | 5 | file://ruby-CVE-2017-9228.patch \ |
6 | file://run-ptest \ | ||
6 | " | 7 | " |
7 | 8 | ||
8 | SRC_URI[md5sum] = "20c85b67846d49622ef3b24230803fef" | 9 | SRC_URI[md5sum] = "20c85b67846d49622ef3b24230803fef" |
@@ -55,6 +56,13 @@ do_install_append_class-target () { | |||
55 | 56 | ||
56 | } | 57 | } |
57 | 58 | ||
59 | do_install_ptest () { | ||
60 | cp -rf ${S}/test ${D}${PTEST_PATH}/ | ||
61 | cp -r ${S}/include ${D}/${libdir}/ruby/ | ||
62 | test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` | ||
63 | sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb | ||
64 | } | ||
65 | |||
58 | PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" | 66 | PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" |
59 | 67 | ||
60 | SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" | 68 | SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" |
@@ -67,4 +75,6 @@ FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" | |||
67 | 75 | ||
68 | FILES_${PN} += "${datadir}/rubygems" | 76 | FILES_${PN} += "${datadir}/rubygems" |
69 | 77 | ||
78 | FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include" | ||
79 | |||
70 | BBCLASSEXTEND = "native" | 80 | BBCLASSEXTEND = "native" |