From 6a6691bbb6f7d4f0b92d76f7e74f4e4c0cb4f849 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 4 Jun 2016 14:28:24 +0300 Subject: Exclude some test cases for MSYS --- tests/test.sh | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/tests/test.sh b/tests/test.sh index 4752698..d248650 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -654,27 +654,36 @@ rm -r $cfg/libhello-1.0.0+1 test pkg-purge -f libhello stat libhello unknown -# configure failed but disfigure succeeds -# -test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1 -mkdir -p $cfg/libhello-1.0.0+1/build -chmod 555 $cfg/libhello-1.0.0+1/build -fail pkg-configure libhello -stat libhello "unpacked 1.0.0+1" -test pkg-purge libhello -stat libhello unknown - -# configure and disfigure both failed -# -test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1 -mkdir -p $cfg/libhello-1.0.0+1/build -chmod 555 $cfg/libhello-1.0.0+1 $cfg/libhello-1.0.0+1/build # Trip both con/dis. -fail pkg-configure libhello -stat libhello/1.0.0+1 broken -chmod 755 $cfg/libhello-1.0.0+1 $cfg/libhello-1.0.0+1/build -rm -r $cfg/libhello-1.0.0+1 -test pkg-purge -f libhello -stat libhello unknown +# While it's forbidden to delete a directory with write permissions being +# revoked with the 'chmod 555' command in MSYS, it's still allowed to create +# subdirectories and files inside such a directory. This is why the following +# 'fail pkg-configure libhello' test cases undesirably succeed in MSYS. +# +if [ "$msys" != "y" ]; then + # configure failed but disfigure succeeds + # + test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1 + mkdir -p $cfg/libhello-1.0.0+1/build + chmod 555 $cfg/libhello-1.0.0+1/build + fail pkg-configure libhello + stat libhello "unpacked 1.0.0+1" + test pkg-purge libhello + stat libhello unknown + + # configure and disfigure both failed + # + test pkg-unpack -e pkg/1/build2.org/common/libhello-1.0.0+1 + mkdir -p $cfg/libhello-1.0.0+1/build + # Trip both con/dis. + # + chmod 555 $cfg/libhello-1.0.0+1 $cfg/libhello-1.0.0+1/build + fail pkg-configure libhello + stat libhello/1.0.0+1 broken + chmod 755 $cfg/libhello-1.0.0+1 $cfg/libhello-1.0.0+1/build + rm -r $cfg/libhello-1.0.0+1 + test pkg-purge -f libhello + stat libhello unknown +fi # dependency management # -- cgit v1.1