Ignore:
Timestamp:
Oct 26, 2008, 1:33:24 AM (17 years ago)
Author:
bird
Message:

GNU Make tests: added check for case insensitive file system, fixed default_names so it'll for on HFS+.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/tests/test_driver.pl

    r903 r1937  
    118118  $cwdslash = "";             # $cwd . $pathsep, but "" rather than "./"
    119119
    120   &get_osname;  # sets $osname, $vos, $pathsep, and $short_filenames
     120  &get_osname;  # sets $osname, $vos, $pathsep, $short_filenames,
     121                # and $case_insensitive_fs
    121122
    122123  &set_defaults;  # suite-defined
     
    287288    rmdir (".ostest") || &error ("Couldn't rmdir .ostest: $!\n", 1);
    288289  }
     290
     291  # Check for case insensitive file system (bird)
     292  # The deal is that the 2nd unlink will fail because the first one
     293  # will already have removed the file if the fs ignore case.
     294  $case_insensitive_fs = 0;
     295  my $testfile1 = $short_filenames ? "CaseFs.rmt" : "CaseInSensitiveFs.check";
     296  my $testfile2 = $short_filenames ? "casEfS.rmt" : "casEiNsensitivEfS.Check";
     297  (open (TOUCHFD, "> $testfile1") &&  close (TOUCHFD))
     298    || &error ("Couldn't create $testfile1: $!\n", 1);
     299  (open (TOUCHFD, "> $testfile2") &&  close (TOUCHFD))
     300    || &error ("Couldn't create $testfile2: $!\n", 1);
     301  unlink ($testfile1) || &error ("Couldn't unlink $testfile1: $!\n", 1);
     302  unlink ($testfile2) || ($case_insensitive_fs = 1);
    289303}
    290304
Note: See TracChangeset for help on using the changeset viewer.