aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-06-04 14:28:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-06-18 15:10:59 +0300
commit6a6691bbb6f7d4f0b92d76f7e74f4e4c0cb4f849 (patch)
tree6ea6031133da4a5e7d141a163a5ed95ca0bb23e5
parent272dd3d81b1e7f2f0ce98dc19299a84f027e4b59 (diff)
Exclude some test cases for MSYS
-rwxr-xr-xtests/test.sh51
1 files 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
#