summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>2019-04-10 15:54:23 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-12 09:29:06 +0100
commit6d3a0411f3790e188b182b3c6a1fa102d00edda2 (patch)
treee7e442f442ee89c537284932decf4d63275922a7 /meta
parent5ad7d90ee631146eab2286466fec928f418ec20c (diff)
downloadpoky-6d3a0411f3790e188b182b3c6a1fa102d00edda2.tar.gz
opkg: add ptest
Install opkg test suite and run it as ptest. (From OE-Core rev: 6b9963a58eec9f5f5fe72021d13e3c89461a9649) Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch43
-rw-r--r--meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch31
-rw-r--r--meta/recipes-devtools/opkg/opkg/run-ptest5
-rw-r--r--meta/recipes-devtools/opkg/opkg_0.4.0.bb6
4 files changed, 84 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch b/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch
new file mode 100644
index 0000000000..951c186767
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-opkg-add-target-for-testsuite-installation.patch
@@ -0,0 +1,43 @@
1From 8fb0364bd0e19f35c20616dd1ab10aa00e08fa8f Mon Sep 17 00:00:00 2001
2From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
3Date: Wed, 10 Apr 2019 14:49:43 -0500
4Subject: [PATCH] opkg: add target for testsuite installation
5
6- Add target to install testsuite
7- Add override of opkg binary used during test via OPKG_PATH environment
8variable.
9
10Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
11---
12Upstream-Status: Submitted
13
14 Makefile.am | 5 +++++
15 tests/cfg.py | 2 +-
16 2 files changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/Makefile.am b/Makefile.am
19index 90cfcae..1f6a784 100644
20--- a/Makefile.am
21+++ b/Makefile.am
22@@ -18,3 +18,8 @@ run-tests:
23 $(MAKE) -C tests DATADIR=@datadir@ SYSCONFDIR=@sysconfdir@ VARDIR=@localstatedir@
24
25 check: run-tests
26+
27+install-ptest:
28+ cp -r $(srcdir)/tests $(DESTDIR)
29+ cp Makefile $(DESTDIR)
30+ sed -e 's/^Makefile/_Makefile/' < Makefile > $(DESTDIR)/Makefile
31diff --git a/tests/cfg.py b/tests/cfg.py
32index 4efaff6..ca59d03 100644
33--- a/tests/cfg.py
34+++ b/tests/cfg.py
35@@ -2,4 +2,4 @@ import os
36
37 opkdir = "/tmp/opk"
38 offline_root = "/tmp/opkg"
39-opkgcl = os.path.realpath("../src/opkg")
40+opkgcl = os.getenv('OPKG_PATH', os.path.realpath("../src/opkg"))
41--
422.20.1
43
diff --git a/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch b/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
new file mode 100644
index 0000000000..75ecb5fb42
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-regress-issue72.py-resolve-paths-before-comparision.patch
@@ -0,0 +1,31 @@
1From 5f005830eea7d03c02107a3a3fc58907b0a037bf Mon Sep 17 00:00:00 2001
2From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
3Date: Mon, 8 Apr 2019 11:14:56 -0500
4Subject: [PATCH] regress/issue72.py: resolve paths before comparision
5
6In systems that have a volatile /tmp, the test incorrectly fails since
7it doesn't resolve the real path in all cases.
8
9Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
10---
11Upstream-Status: Submitted
12
13 tests/regress/issue72.py | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/tests/regress/issue72.py b/tests/regress/issue72.py
17index 1626877..2f24dec 100755
18--- a/tests/regress/issue72.py
19+++ b/tests/regress/issue72.py
20@@ -56,7 +56,7 @@ if not os.path.lexists("{}/{}".format(cfg.offline_root, long_filename2)):
21 "not created.")
22
23 linky = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename2))
24-linky_dst = "{}/{}".format(cfg.offline_root, long_filename)
25+linky_dst = os.path.realpath("{}/{}".format(cfg.offline_root, long_filename))
26 if linky != linky_dst:
27 opk.fail("symlink path truncated.")
28
29--
302.20.1
31
diff --git a/meta/recipes-devtools/opkg/opkg/run-ptest b/meta/recipes-devtools/opkg/opkg/run-ptest
new file mode 100644
index 0000000000..5fb7077eec
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3OPKG_PATH=$(which opkg)
4
5make OPKG_PATH=$OPKG_PATH run-tests
diff --git a/meta/recipes-devtools/opkg/opkg_0.4.0.bb b/meta/recipes-devtools/opkg/opkg_0.4.0.bb
index a2329d3e71..20c2e0b72a 100644
--- a/meta/recipes-devtools/opkg/opkg_0.4.0.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.4.0.bb
@@ -15,12 +15,15 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
15 file://opkg.conf \ 15 file://opkg.conf \
16 file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ 16 file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
17 file://0001-libopkg-add-add-ignore-recommends-option.patch \ 17 file://0001-libopkg-add-add-ignore-recommends-option.patch \
18 file://0001-regress-issue72.py-resolve-paths-before-comparision.patch \
19 file://0001-opkg-add-target-for-testsuite-installation.patch \
20 file://run-ptest \
18" 21"
19 22
20SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5" 23SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5"
21SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe" 24SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe"
22 25
23inherit autotools pkgconfig systemd 26inherit autotools pkgconfig systemd ptest
24 27
25target_localstatedir := "${localstatedir}" 28target_localstatedir := "${localstatedir}"
26OPKGLIBDIR = "${target_localstatedir}/lib" 29OPKGLIBDIR = "${target_localstatedir}/lib"
@@ -49,6 +52,7 @@ do_install_append () {
49RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" 52RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
50RDEPENDS_${PN}_class-native = "" 53RDEPENDS_${PN}_class-native = ""
51RDEPENDS_${PN}_class-nativesdk = "" 54RDEPENDS_${PN}_class-nativesdk = ""
55RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
52RREPLACES_${PN} = "opkg-nogpg opkg-collateral" 56RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
53RCONFLICTS_${PN} = "opkg-collateral" 57RCONFLICTS_${PN} = "opkg-collateral"
54RPROVIDES_${PN} = "opkg-collateral" 58RPROVIDES_${PN} = "opkg-collateral"