diff options
author | Alejandro del Castillo <alejandro.delcastillo@ni.com> | 2019-04-10 15:54:23 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-12 09:29:06 +0100 |
commit | 6d3a0411f3790e188b182b3c6a1fa102d00edda2 (patch) | |
tree | e7e442f442ee89c537284932decf4d63275922a7 /meta/recipes-devtools/opkg | |
parent | 5ad7d90ee631146eab2286466fec928f418ec20c (diff) | |
download | poky-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/recipes-devtools/opkg')
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 @@ | |||
1 | From 8fb0364bd0e19f35c20616dd1ab10aa00e08fa8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
3 | Date: Wed, 10 Apr 2019 14:49:43 -0500 | ||
4 | Subject: [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 | ||
8 | variable. | ||
9 | |||
10 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
11 | --- | ||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | Makefile.am | 5 +++++ | ||
15 | tests/cfg.py | 2 +- | ||
16 | 2 files changed, 6 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/Makefile.am b/Makefile.am | ||
19 | index 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 | ||
31 | diff --git a/tests/cfg.py b/tests/cfg.py | ||
32 | index 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 | -- | ||
42 | 2.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 @@ | |||
1 | From 5f005830eea7d03c02107a3a3fc58907b0a037bf Mon Sep 17 00:00:00 2001 | ||
2 | From: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
3 | Date: Mon, 8 Apr 2019 11:14:56 -0500 | ||
4 | Subject: [PATCH] regress/issue72.py: resolve paths before comparision | ||
5 | |||
6 | In systems that have a volatile /tmp, the test incorrectly fails since | ||
7 | it doesn't resolve the real path in all cases. | ||
8 | |||
9 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
10 | --- | ||
11 | Upstream-Status: Submitted | ||
12 | |||
13 | tests/regress/issue72.py | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/tests/regress/issue72.py b/tests/regress/issue72.py | ||
17 | index 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 | -- | ||
30 | 2.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 | |||
3 | OPKG_PATH=$(which opkg) | ||
4 | |||
5 | make 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 | ||
20 | SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5" | 23 | SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5" |
21 | SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe" | 24 | SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe" |
22 | 25 | ||
23 | inherit autotools pkgconfig systemd | 26 | inherit autotools pkgconfig systemd ptest |
24 | 27 | ||
25 | target_localstatedir := "${localstatedir}" | 28 | target_localstatedir := "${localstatedir}" |
26 | OPKGLIBDIR = "${target_localstatedir}/lib" | 29 | OPKGLIBDIR = "${target_localstatedir}/lib" |
@@ -49,6 +52,7 @@ do_install_append () { | |||
49 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" | 52 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive" |
50 | RDEPENDS_${PN}_class-native = "" | 53 | RDEPENDS_${PN}_class-native = "" |
51 | RDEPENDS_${PN}_class-nativesdk = "" | 54 | RDEPENDS_${PN}_class-nativesdk = "" |
55 | RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression" | ||
52 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" | 56 | RREPLACES_${PN} = "opkg-nogpg opkg-collateral" |
53 | RCONFLICTS_${PN} = "opkg-collateral" | 57 | RCONFLICTS_${PN} = "opkg-collateral" |
54 | RPROVIDES_${PN} = "opkg-collateral" | 58 | RPROVIDES_${PN} = "opkg-collateral" |