summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc31
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch19
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch57
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch18
-rw-r--r--meta/recipes-core/util-linux/util-linux/ptest.patch17
-rw-r--r--meta/recipes-core/util-linux/util-linux/run-ptest25
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.26.2.bb6
8 files changed, 192 insertions, 1 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 48d7e898f2..318c74ba62 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
17 file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \ 17 file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
18 file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16" 18 file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
19 19
20inherit autotools gettext pkgconfig systemd update-alternatives python-dir 20inherit autotools gettext pkgconfig systemd update-alternatives python-dir ptest
21DEPENDS = "zlib ncurses" 21DEPENDS = "zlib ncurses"
22DEPENDS_append_class-native = " lzo-native" 22DEPENDS_append_class-native = " lzo-native"
23DEPENDS_append_class-nativesdk = " lzo-native" 23DEPENDS_append_class-nativesdk = " lzo-native"
@@ -272,3 +272,32 @@ python populate_packages_prepend() {
272 description='util-linux lib%s', 272 description='util-linux lib%s',
273 extra_depends='', prepend=True, allow_links=True) 273 extra_depends='', prepend=True, allow_links=True)
274} 274}
275
276RDEPENDS_${PN}-ptest = "bash"
277
278do_compile_ptest() {
279 oe_runmake buildtest-TESTS
280}
281
282do_install_ptest() {
283 mkdir -p ${D}${PTEST_PATH}/tests/ts
284 find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
285 cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
286 cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
287 cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
288 cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
289
290 list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf"
291 # The following tests are not installed yet:
292 # blkid scsi_debug module dependent
293 # cramfs gcc dependent
294 # eject gcc dependent
295 # fdisk scsi_debug module and gcc dependent
296 # lscpu gcc dependant
297 # libmount uuidgen dependent
298 # mount gcc dependant
299 # partx blkid dependant
300 for d in $list; do
301 cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
302 done
303}
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
new file mode 100644
index 0000000000..46d4d37650
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -0,0 +1,19 @@
1Ptest needs buildtest-TESTS and runtest-TESTS targets.
2serial-tests is required to generate those targets.
3Revert run.sh script accordingly to serialize running tests
4
5Signed-off-by: Tudor Florea <tudor.florea@enea.com>
6Upstream-Status: Inappropriate
7
8diff -ruN a/configure.ac b/configure.ac
9--- a/configure.ac 2014-05-27 12:37:42.119772658 +0200
10+++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200
11@@ -10,7 +10,7 @@
12 dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
13 dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
14 AC_USE_SYSTEM_EXTENSIONS
15-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
16+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
17
18 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
19 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
new file mode 100644
index 0000000000..a0d5efad0f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
@@ -0,0 +1,57 @@
1Avoid unsupported grep options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers
7--- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200
8+++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200
9@@ -22,35 +22,35 @@
10 ts_init "$*"
11
12 ts_log "test: shm headers"
13-$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT
14-$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT
15-$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT
16+$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT
17+$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT
18+$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT
19 $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT
20 $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT
21 echo >> $TS_OUTPUT
22
23 ts_log "test: mesg headers"
24-$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT
25-$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT
26-$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT
27+$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT
28+$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT
29+$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT
30 $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT
31 $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT
32 echo >> $TS_OUTPUT
33
34 ts_log "test: sem headers"
35-$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT
36-$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT
37-$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT
38+$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT
39+$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT
40+$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT
41 $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT
42 $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT
43 echo >> $TS_OUTPUT
44
45 ts_log "test: all headers"
46-$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT
47+$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT
48
49-$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT
50-$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT
51-$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT
52+$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT
53+$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT
54+$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT
55 $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT
56 $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT
57
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
new file mode 100644
index 0000000000..7a63a4e05d
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
@@ -0,0 +1,20 @@
1Avoid unsupported sleep parameter
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/simple b/simple
7--- a/tests/ts/tailf/simple 2015-11-12 11:34:49.971817130 +0200
8+++ b/tests/ts/tailf/simple 2013-11-12 11:34:37.876325128 +0200
9@@ -27,9 +27,9 @@
10
11 $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
12
13-sleep 0.5
14+sleep 1
15 echo {0..9} >> $INPUT
16-sleep 0.5
17+sleep 1
18
19 rm -f $INPUT
20
diff --git a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
new file mode 100644
index 0000000000..0eb8810855
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
@@ -0,0 +1,18 @@
1Display testname for subtest
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/functions.sh b/functions.sh
7--- a/tests/functions.sh 2015-11-12 21:32:02.434542124 +0100
8+++ b/tests/functions.sh 2015-11-12 21:40:37.095317280 +0100
9@@ -297,7 +297,7 @@
10 if [ "$TS_PARALLEL" == "yes" ]; then
11 TS_TITLE=$(printf "%13s: %-30s ...\n%16s: %-27s ..." "$TS_COMPONENT" "$TS_DESC" "" "$TS_SUBNAME")
12 else
13- TS_TITLE=$(printf "%16s: %-27s ..." "" "$TS_SUBNAME")
14+ TS_TITLE=$(printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME")
15 echo -n "$TS_TITLE"
16 fi
17 }
18
diff --git a/meta/recipes-core/util-linux/util-linux/ptest.patch b/meta/recipes-core/util-linux/util-linux/ptest.patch
new file mode 100644
index 0000000000..837f189341
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/ptest.patch
@@ -0,0 +1,17 @@
1Define TESTS variable
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/Makefile.am b/Makefile.am
7--- a/Makefile.am 2015-11-12 20:29:46.778396936 +0100
8+++ b/Makefile.am 2015-11-12 20:32:24.342450279 +0100
9@@ -48,7 +48,7 @@
10 dist_bashcompletion_DATA =
11 check_PROGRAMS =
12 dist_check_SCRIPTS =
13-TESTS =
14+TESTS = $(check_PROGRAMS)
15
16 PATHFILES =
17
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest
new file mode 100644
index 0000000000..fbc2f9b56a
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -0,0 +1,25 @@
1#!/bin/sh
2
3cd tests || exit 1
4
5comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
6
7
8echo
9echo "-------------------- util-linux regression tests --------------------"
10echo
11echo " For development purpose only. "
12echo " Don't execute on production system! "
13echo
14
15res=0
16count=0
17for ts in $comps;
18do
19 $ts | sed '{
20 s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
21 s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
22 s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
23 }'
24done
25
diff --git a/meta/recipes-core/util-linux/util-linux_2.26.2.bb b/meta/recipes-core/util-linux/util-linux_2.26.2.bb
index e09fdfaf5d..02e42c1c08 100644
--- a/meta/recipes-core/util-linux/util-linux_2.26.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.26.2.bb
@@ -16,6 +16,12 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
16 file://runuser.pamd \ 16 file://runuser.pamd \
17 file://runuser-l.pamd \ 17 file://runuser-l.pamd \
18 ${OLDHOST} \ 18 ${OLDHOST} \
19 file://ptest.patch \
20 file://run-ptest \
21 file://avoid_unsupported_sleep_param.patch \
22 file://avoid_unsupported_grep_opts.patch \
23 file://display_testname_for_subtest.patch \
24 file://avoid_parallel_tests.patch \
19" 25"
20SRC_URI[md5sum] = "9bdf368c395f1b70325d0eb22c7f48fb" 26SRC_URI[md5sum] = "9bdf368c395f1b70325d0eb22c7f48fb"
21SRC_URI[sha256sum] = "0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666" 27SRC_URI[sha256sum] = "0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666"