diff options
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r-- | meta/recipes-core/udev/udev.inc | 8 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev/add-install-ptest.patch | 73 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev/run-ptest | 3 |
3 files changed, 83 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc index db09c54843..3190731a6a 100644 --- a/meta/recipes-core/udev/udev.inc +++ b/meta/recipes-core/udev/udev.inc | |||
@@ -26,9 +26,12 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ | |||
26 | file://local.rules \ | 26 | file://local.rules \ |
27 | file://udev-cache \ | 27 | file://udev-cache \ |
28 | file://udev-cache.default \ | 28 | file://udev-cache.default \ |
29 | file://add-install-ptest.patch \ | ||
30 | file://run-ptest \ | ||
29 | file://init" | 31 | file://init" |
30 | 32 | ||
31 | inherit autotools pkgconfig update-rc.d | 33 | inherit autotools pkgconfig update-rc.d ptest |
34 | +RDEPENDS_${PN}-ptest += "make" | ||
32 | 35 | ||
33 | libexecdir = "${base_libdir}" | 36 | libexecdir = "${base_libdir}" |
34 | EXTRA_OECONF = "--disable-introspection \ | 37 | EXTRA_OECONF = "--disable-introspection \ |
@@ -99,3 +102,6 @@ python () { | |||
99 | if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): | 102 | if oe.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): |
100 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") | 103 | raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") |
101 | } | 104 | } |
105 | do_compile_ptest() { | ||
106 | oe_runmake test-udev | ||
107 | } | ||
diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch new file mode 100644 index 0000000000..44365c69e6 --- /dev/null +++ b/meta/recipes-core/udev/udev/add-install-ptest.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | Adjustements for ptest: | ||
2 | |||
3 | - Add 'install-ptest' rule. | ||
4 | - Print a standard result line for each test. | ||
5 | - Replace the use of "tree" with "find". | ||
6 | |||
7 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
8 | Signed-off-by: Alexandra Safta <alst@enea.com> | ||
9 | Upstream-status: Pending | ||
10 | |||
11 | --- a/Makefile.am 2012-03-18 16:28:14.000000000 +0100 | ||
12 | +++ b/Makefile.am 2013-02-18 10:03:36.531101244 +0100 | ||
13 | @@ -708,3 +708,11 @@ | ||
14 | for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done | ||
15 | for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done | ||
16 | for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done | ||
17 | + | ||
18 | +install-ptest: | ||
19 | + install test-udev $(DESTDIR) | ||
20 | + cp Makefile $(DESTDIR) | ||
21 | + sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile | ||
22 | + $(MKDIR_P) $(DESTDIR)/test | ||
23 | + (cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test) | ||
24 | + tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz | ||
25 | --- a/test/udev-test.pl 2012-03-18 16:43:36.000000000 +0100 | ||
26 | +++ b/test/udev-test.pl 2013-02-18 10:31:29.706357321 +0100 | ||
27 | @@ -1459,11 +1459,13 @@ | ||
28 | print "add: error"; | ||
29 | if ($rules->{exp_add_error}) { | ||
30 | print " as expected\n"; | ||
31 | + print "XFAIL: TEST $number: $rules->{desc}: add\n"; | ||
32 | } else { | ||
33 | print "\n"; | ||
34 | - system("tree $udev_root"); | ||
35 | + system("find $udev_root"); | ||
36 | print "\n"; | ||
37 | $error++; | ||
38 | + print "FAIL: TEST $number: $rules->{desc}: add\n"; | ||
39 | sleep(1); | ||
40 | } | ||
41 | } | ||
42 | @@ -1479,15 +1481,18 @@ | ||
43 | print "remove: error"; | ||
44 | if ($rules->{exp_rem_error}) { | ||
45 | print " as expected\n"; | ||
46 | + print "XFAIL: TEST $number: $rules->{desc}: remove\n"; | ||
47 | } else { | ||
48 | print "\n"; | ||
49 | - system("tree $udev_root"); | ||
50 | + system("find $udev_root"); | ||
51 | print "\n"; | ||
52 | $error++; | ||
53 | + print "FAIL: TEST $number: $rules->{desc}: remove\n"; | ||
54 | sleep(1); | ||
55 | } | ||
56 | } else { | ||
57 | print "remove: ok\n"; | ||
58 | + print "PASS: TEST $number: $rules->{desc}: remove\n"; | ||
59 | } | ||
60 | |||
61 | print "\n"; | ||
62 | --- a/configure.ac 2013-11-28 09:14:02.814248826 +0100 | ||
63 | +++ b/configure.ac 2013-11-28 09:14:34.260874296 +0100 | ||
64 | @@ -6,7 +6,7 @@ | ||
65 | [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html]) | ||
66 | AC_CONFIG_SRCDIR([src/udevd.c]) | ||
67 | AC_CONFIG_AUX_DIR([build-aux]) | ||
68 | -AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects]) | ||
69 | +AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects serial-tests]) | ||
70 | AC_USE_SYSTEM_EXTENSIONS | ||
71 | AC_SYS_LARGEFILE | ||
72 | AC_CONFIG_MACRO_DIR([m4]) | ||
73 | |||
diff --git a/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest new file mode 100644 index 0000000000..6817ef70e6 --- /dev/null +++ b/meta/recipes-core/udev/udev/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make -k check-TESTS \ No newline at end of file | ||