Add a test to check "-w ." is really equivalent to "-w $PWD" + fix PROOT_RAW

Change-Id: Ia15e88edc21b06c9ab5b48c81ea0a9b96dd02adc
This commit is contained in:
Cédric VINCENT 2012-10-19 17:19:52 +02:00
parent fd9527a9e6
commit 3350e82e4c
2 changed files with 7 additions and 1 deletions

View File

@ -21,7 +21,7 @@ check_failure: $(CHECK_TESTS)
@bash -c '! test -e failure'
check-%.sh: %.sh setup
$(Q)env PROOT="$(PROOT)" ROOTFS=$(ROOTFS) sh -ex $< $(silently); $(call check,$*)
$(Q)env PROOT_RAW="$(PROOT_RAW)" PROOT="$(PROOT)" ROOTFS=$(ROOTFS) sh -ex $< $(silently); $(call check,$*)
check-%.c: $(ROOTFS)/bin/% setup
$(call check_c,$*,$(PROOT) -b /proc $(ROOTFS) /bin/$*)

6
tests/test-5bed7142.sh Normal file
View File

@ -0,0 +1,6 @@
if [ ! -x ${ROOTFS}/bin/pwd ] || [ -z `which mkdir` ] || [ -z `which grep` ]; then
exit 125;
fi
mkdir -p ${ROOTFS}/${PWD}
${PROOT} -v 1 -w . ${ROOTFS} pwd | grep ^${PWD}$