summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox.inc
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-11-23 10:16:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-23 23:35:19 +0000
commitf72e95df33a528f7d00c152d55108ac850faf197 (patch)
tree5cd071fa0fdd8ad2d8b87afea8dbb711bb77795b /meta/recipes-core/busybox/busybox.inc
parent41e772d72693d3fda4e7821a65ea96e2b873d96b (diff)
downloadpoky-f72e95df33a528f7d00c152d55108ac850faf197.tar.gz
busybox: ship a symlink farm for ptest
Ship a symlink farm for busybox, which correctly considers SUID split. This ensures that all utilities used in busybox's test cases will first use that ones that are provided by busybox. Modify run-ptest to prepend the directory to PATH, and also change variable name from current_dir to current_path, as the former is a little misleading. `readlink -f $0' gets a path to the current script instead of the current directory. (From OE-Core rev: 7ef8f96941ed52b2a00cbe8f57511a8891b39698) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r--meta/recipes-core/busybox/busybox.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 6abbb5492f..f7455d301f 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -349,6 +349,20 @@ do_install_ptest () {
349 cp -r ${B}/testsuite ${D}${PTEST_PATH}/ 349 cp -r ${B}/testsuite ${D}${PTEST_PATH}/
350 cp ${B}/.config ${D}${PTEST_PATH}/ 350 cp ${B}/.config ${D}${PTEST_PATH}/
351 ln -s /bin/busybox ${D}${PTEST_PATH}/busybox 351 ln -s /bin/busybox ${D}${PTEST_PATH}/busybox
352
353 mkdir ${D}${PTEST_PATH}/bin
354 if [ "${BUSYBOX_SPLIT_SUID}" = "1" ]; then
355 while read link; do
356 ln -s ${base_bindir}/busybox.suid ${D}${PTEST_PATH}/bin/$(basename $link)
357 done <${D}${sysconfdir}/busybox.links.suid
358 while read link; do
359 ln -s ${base_bindir}/busybox.nosuid ${D}${PTEST_PATH}/bin/$(basename $link)
360 done <${D}${sysconfdir}/busybox.links.nosuid
361 else
362 while read link; do
363 ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/bin/$(basename $link)
364 done <${D}${sysconfdir}/busybox.links
365 fi
352} 366}
353 367
354inherit update-alternatives 368inherit update-alternatives