summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/e2fsprogs
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry_eremin@mentor.com>2015-04-18 17:58:17 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-21 07:20:24 +0100
commit869a770ba4f5c5d69064c40a7e52a3c3ee8baf3d (patch)
tree29640ad8fe8102bee3f11bc62558f2878474ba4d /meta/recipes-devtools/e2fsprogs
parent8fb1cd85d09cee9dafa77c32c73ffec83fe52ada (diff)
downloadpoky-869a770ba4f5c5d69064c40a7e52a3c3ee8baf3d.tar.gz
e2fsprogs: add ptest
Enable ptest for e2fsprogs by reusing provided testsuite. (From OE-Core rev: 47edd33cf8df3ebbfd5164136fb79ac831f01286) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/e2fsprogs')
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch66
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest11
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb17
3 files changed, 94 insertions, 0 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
new file mode 100644
index 0000000000..b8a53e9133
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -0,0 +1,66 @@
1Index: e2fsprogs-1.42.9/tests/Makefile.in
2===================================================================
3--- e2fsprogs-1.42.9.orig/tests/Makefile.in
4+++ e2fsprogs-1.42.9/tests/Makefile.in
5@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile
6 @echo "#!/bin/sh" > test_one
7 @HTREE_CMT@ @echo "HTREE=y" >> test_one
8 @QUOTA_CMT@ @echo "QUOTA=y" >> test_one
9- @echo "SRCDIR=@srcdir@" >> test_one
10+ @echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_one
11 @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
12 @cat $(srcdir)/test_one.in >> test_one
13 @chmod +x test_one
14@@ -26,7 +26,7 @@ test_one: $(srcdir)/test_one.in Makefile
15 test_script: test_one test_script.in Makefile mke2fs.conf
16 @echo "Creating test_script..."
17 @echo "#!/bin/sh" > test_script
18- @echo "SRCDIR=@srcdir@" >> test_script
19+ @echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_script
20 @cat $(srcdir)/test_script.in >> test_script
21 @chmod +x test_script
22
23Index: e2fsprogs-1.42.9/tests/test_config
24===================================================================
25--- e2fsprogs-1.42.9.orig/tests/test_config
26+++ e2fsprogs-1.42.9/tests/test_config
27@@ -3,23 +3,23 @@
28 #
29
30 unset LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME PAGER
31-FSCK="$USE_VALGRIND ../e2fsck/e2fsck"
32-MKE2FS="$USE_VALGRIND ../misc/mke2fs"
33-DUMPE2FS="$USE_VALGRIND ../misc/dumpe2fs"
34-TUNE2FS="$USE_VALGRIND ../misc/tune2fs"
35-CHATTR="$USE_VALGRIND../misc/chattr"
36-LSATTR="$USE_VALGRIND ../misc/lsattr"
37-E2IMAGE="$USE_VALGRIND ../misc/e2image"
38-E2IMAGE_EXE="../misc/e2image"
39-DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
40-DEBUGFS_EXE="../debugfs/debugfs"
41-TEST_BITS="../debugfs/debugfs"
42-RESIZE2FS_EXE="../resize/resize2fs"
43+FSCK="$USE_VALGRIND e2fsck"
44+MKE2FS="$USE_VALGRIND mke2fs"
45+DUMPE2FS="$USE_VALGRIND dumpe2fs"
46+TUNE2FS="$USE_VALGRIND tune2fs"
47+CHATTR="$USE_VALGRIND chattr"
48+LSATTR="$USE_VALGRIND lsattr"
49+E2IMAGE="$USE_VALGRIND e2image"
50+E2IMAGE_EXE="/sbin/e2image"
51+DEBUGFS="$USE_VALGRIND debugfs"
52+DEBUGFS_EXE="/sbin/debugfs"
53+TEST_BITS="/sbin/debugfs"
54+RESIZE2FS_EXE="/sbin/resize2fs"
55 RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
56-E2UNDO_EXE="../misc/e2undo"
57-TEST_REL=../tests/progs/test_rel
58-TEST_ICOUNT=../tests/progs/test_icount
59-CRCSUM=../tests/progs/crcsum
60+E2UNDO_EXE="/sbin/e2undo"
61+TEST_REL=./progs/test_rel
62+TEST_ICOUNT=./progs/test_icount
63+CRCSUM=./progs/crcsum
64 LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
65 DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
66 export LD_LIBRARY_PATH
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
new file mode 100644
index 0000000000..1ac2513248
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3cd ./test
4./test_script &>../test.log
5if [ $? -eq 0 ]
6then
7 echo "PASS: e2fsprogs"
8 rm test.log
9else
10 echo "FAIL: e2fsprogs"
11fi
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index 66065bc049..67a5ea74f2 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -87,3 +87,20 @@ ALTERNATIVE_${PN} = "chattr"
87ALTERNATIVE_PRIORITY = "100" 87ALTERNATIVE_PRIORITY = "100"
88ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr" 88ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
89ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs" 89ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
90
91inherit ptest
92SRC_URI += "file://run-ptest"
93SRC_URI += "file://ptest.patch"
94
95RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps"
96#RDEPENDS_${PN}-ptest += "expect"
97
98do_compile_ptest() {
99 oe_runmake -C ${B}/tests
100}
101
102do_install_ptest() {
103 cp -a ${B}/tests ${D}${PTEST_PATH}/test
104 cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
105 sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
106}