aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro-integration/recipes-overlayed/udev/udev/add-install-ptest.patch
blob: 0f8e9b6588e20e0199f5cc85e7b7f5dac7905995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Adjustements for ptest:

- Add 'install-ptest' rule.
- Print a standard result line for each test.
- Replace the use of "tree" with "find".

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Alexandra Safta <alst@enea.com>
Upstream-Status: Pending

--- a/Makefile.am	2012-03-18 16:28:14.000000000 +0100
+++ b/Makefile.am	2013-02-18 10:03:36.531101244 +0100
@@ -708,3 +708,11 @@
 	for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
 	for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
 	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
+
+install-ptest:
+	install test-udev $(DESTDIR)
+	cp Makefile $(DESTDIR)
+	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+	$(MKDIR_P) $(DESTDIR)/test
+	(cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test)
+	tar -C $(DESTDIR)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
--- a/test/udev-test.pl	2012-03-18 16:43:36.000000000 +0100
+++ b/test/udev-test.pl	2013-02-18 10:31:29.706357321 +0100
@@ -1459,11 +1459,13 @@
                 print "add:         error";
                 if ($rules->{exp_add_error}) {
                         print " as expected\n";
+                        print "XFAIL: TEST $number: $rules->{desc}: add\n";
                 } else {
                         print "\n";
-                        system("tree $udev_root");
+                        system("find $udev_root");
                         print "\n";
                         $error++;
+                        print "FAIL: TEST $number: $rules->{desc}: add\n";
                         sleep(1);
                 }
         }
@@ -1479,15 +1481,18 @@
                 print "remove:      error";
                 if ($rules->{exp_rem_error}) {
                         print " as expected\n";
+                        print "XFAIL: TEST $number: $rules->{desc}: remove\n";
                 } else {
                         print "\n";
-                        system("tree $udev_root");
+                        system("find $udev_root");
                         print "\n";
                         $error++;
+                        print "FAIL: TEST $number: $rules->{desc}: remove\n";
                         sleep(1);
                 }
         } else {
                 print "remove:      ok\n";
+                print "PASS: TEST $number: $rules->{desc}: remove\n";
         }
 
         print "\n";
--- a/configure.ac      2013-11-28 09:14:02.814248826 +0100
+++ b/configure.ac      2013-11-28 09:14:34.260874296 +0100
@@ -6,7 +6,7 @@
        [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html])
 AC_CONFIG_SRCDIR([src/udevd.c])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
+AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
 AC_CONFIG_MACRO_DIR([m4])