SYN SYN
[p5sagit/p5-mst-13.2.git] / t / op / stat.t
index 9c76e8b..1317ba8 100755 (executable)
@@ -4,7 +4,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    @INC = '../lib';
 }
 
 use Config;
@@ -32,17 +32,22 @@ if (open(FOO, ">Op.stat.tmp")) {
   else {
     print "# res=$res, nlink=$nlink.\nnot ok 1\n";
   }
-  if ($Is_MSWin32 or $Is_Cygwin || ($mtime && $mtime == $ctime)) {
+  if ($Is_MSWin32 or $Is_Cygwin or $Is_Dos || ($mtime && $mtime == $ctime)) {
     print "ok 2\n";
   }
   else {
     print "# |$mtime| vs |$ctime|\nnot ok 2\n";
   }
 
-  sleep 3;
+  my $funky_FAT_timestamps = $Is_Cygwin;
+
+  sleep 3 if $funky_FAT_timestamps;
+
   print FOO "Now is the time for all good men to come to.\n";
   close(FOO);
 
+  sleep 2 unless $funky_FAT_timestamps;
+
 } else {
   print "# open failed: $!\nnot ok 1\nnot ok 2\n";
 }
@@ -62,7 +67,8 @@ elsif ($nlink == 2)
 else {print "# \$nlink is |$nlink|\nnot ok 3\n";}
 
 if (   $Is_Dosish
-       || ($cwd =~ m#^/tmp# and $mtime && $mtime==$ctime) # Solaris tmpfs bug
+        # Solaris tmpfs bug
+       || ($cwd =~ m#^/tmp# and $mtime && $mtime==$ctime && $^O eq 'solaris')
        || $cwd =~ m#/afs/#
        || $^O eq 'amigaos') {
     print "ok 4 # skipped: different semantic of mtime/ctime\n";
@@ -74,6 +80,7 @@ else {
     print "not ok 4\n";
     print "#4 If test op/stat.t fails test 4, check if you are on a tmpfs\n";
     print "#4 of some sort.  Building in /tmp sometimes has this problem.\n";
+    print "#4 Also building on the ClearCase VOBS filesystem may cause this failure.\n";
 }
 print "#4      :$mtime: should != :$ctime:\n";