diff options
| -rw-r--r-- | meta/conf/distro/include/ptest-packagelists.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-extended/findutils/findutils.inc | 6 | ||||
| -rw-r--r-- | meta/recipes-extended/findutils/findutils/run-ptest | 57 | ||||
| -rw-r--r-- | meta/recipes-extended/findutils/findutils_4.8.0.bb | 11 |
4 files changed, 73 insertions, 2 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 3709998f29..2e324f8da4 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc | |||
| @@ -72,6 +72,7 @@ PTESTS_SLOW = "\ | |||
| 72 | coreutils-ptest \ | 72 | coreutils-ptest \ |
| 73 | dbus-test-ptest \ | 73 | dbus-test-ptest \ |
| 74 | e2fsprogs-ptest \ | 74 | e2fsprogs-ptest \ |
| 75 | findutils-ptest \ | ||
| 75 | glib-2.0-ptest \ | 76 | glib-2.0-ptest \ |
| 76 | gstreamer1.0-ptest \ | 77 | gstreamer1.0-ptest \ |
| 77 | libevent-ptest \ | 78 | libevent-ptest \ |
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc index ea8a1b7afe..ddcc05750b 100644 --- a/meta/recipes-extended/findutils/findutils.inc +++ b/meta/recipes-extended/findutils/findutils.inc | |||
| @@ -6,9 +6,11 @@ HOMEPAGE = "http://www.gnu.org/software/findutils/" | |||
| 6 | BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" | 6 | BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils" |
| 7 | SECTION = "console/utils" | 7 | SECTION = "console/utils" |
| 8 | 8 | ||
| 9 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz" | 9 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.xz \ |
| 10 | file://run-ptest \ | ||
| 11 | " | ||
| 10 | 12 | ||
| 11 | inherit autotools gettext texinfo update-alternatives | 13 | inherit autotools gettext texinfo update-alternatives ptest |
| 12 | 14 | ||
| 13 | ALTERNATIVE:${PN} = "find xargs" | 15 | ALTERNATIVE:${PN} = "find xargs" |
| 14 | ALTERNATIVE_PRIORITY = "100" | 16 | ALTERNATIVE_PRIORITY = "100" |
diff --git a/meta/recipes-extended/findutils/findutils/run-ptest b/meta/recipes-extended/findutils/findutils/run-ptest new file mode 100644 index 0000000000..ec71583c51 --- /dev/null +++ b/meta/recipes-extended/findutils/findutils/run-ptest | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # create temporary symlink to workaround missing oldfind | ||
| 4 | ln -s /usr/bin/find /tmp/oldfind | ||
| 5 | # make oldfind visible | ||
| 6 | export PATH="/tmp:${PATH}" | ||
| 7 | |||
| 8 | export built_programs="find xargs locate updatedb" | ||
| 9 | |||
| 10 | # this gets substituted by sed during build | ||
| 11 | export VERSION="__run_ptest_version__" | ||
| 12 | |||
| 13 | # define missing functions for tests/init.sh | ||
| 14 | fu_path_prepend_ () { | ||
| 15 | path_prepend_ $@ | ||
| 16 | } | ||
| 17 | |||
| 18 | print_ver_ () { | ||
| 19 | : | ||
| 20 | } | ||
| 21 | |||
| 22 | skip_if_root_ () { | ||
| 23 | [ $(id -u) = 0 ] && exit 77; | ||
| 24 | } | ||
| 25 | |||
| 26 | require_root_ () { | ||
| 27 | [ $(id -u) = 0 ] || exit 77; | ||
| 28 | } | ||
| 29 | |||
| 30 | expensive_ () { | ||
| 31 | : | ||
| 32 | } | ||
| 33 | |||
| 34 | export -f fu_path_prepend_ | ||
| 35 | export -f print_ver_ | ||
| 36 | export -f skip_if_root_ | ||
| 37 | export -f require_root_ | ||
| 38 | export -f expensive_ | ||
| 39 | |||
| 40 | |||
| 41 | for f in tests/*/*.sh; do | ||
| 42 | bash $f ; | ||
| 43 | case $? in | ||
| 44 | 0 ) | ||
| 45 | echo -n "PASS";; | ||
| 46 | 77 ) | ||
| 47 | echo -n "SKIP";; | ||
| 48 | * ) | ||
| 49 | echo -n "FAIL";; | ||
| 50 | esac | ||
| 51 | echo ": $f" | ||
| 52 | done | ||
| 53 | |||
| 54 | #remove symlink | ||
| 55 | rm -f /tmp/oldfind | ||
| 56 | |||
| 57 | echo | ||
diff --git a/meta/recipes-extended/findutils/findutils_4.8.0.bb b/meta/recipes-extended/findutils/findutils_4.8.0.bb index d8ccf4b8e1..b0e56da159 100644 --- a/meta/recipes-extended/findutils/findutils_4.8.0.bb +++ b/meta/recipes-extended/findutils/findutils_4.8.0.bb | |||
| @@ -13,3 +13,14 @@ PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | |||
| 13 | CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" | 13 | CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes" |
| 14 | 14 | ||
| 15 | EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" | 15 | EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort" |
| 16 | |||
| 17 | RDEPENDS:${PN}-ptest += "bash sed grep" | ||
| 18 | |||
| 19 | do_install_ptest:class-target() { | ||
| 20 | mkdir -p ${D}${PTEST_PATH}/tests/ | ||
| 21 | cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ | ||
| 22 | |||
| 23 | # substitute value in run-ptest with actual version | ||
| 24 | sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest | ||
| 25 | |||
| 26 | } | ||
