VirtualBox

Changeset 1937 in kBuild for trunk/src


Ignore:
Timestamp:
Oct 25, 2008 11:33:24 PM (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+.

Location:
trunk/src/kmk/tests
Files:
3 edited

Legend:

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

    r903 r1937  
    264264   print "Port type: $port_type\n" if $debug;
    265265   print "Make path: $make_path\n" if $debug;
     266   print "fs type  : case insensitive\n" if $debug && $case_insensitive_fs;
    266267
    267268   # Find the full pathname of Make.  For DOS systems this is more
  • trunk/src/kmk/tests/scripts/features/default_names

    r969 r1937  
    1313# DOS/WIN32 platforms preserve case, but Makefile is the same file as makefile.
    1414# Just test what we can here (avoid Makefile versus makefile test).
     15# bird: made this generic, darwin is also defaulting to case insensitive fs.
    1516
    16 if ($port_type eq 'UNIX') {
     17if ($port_type eq 'UNIX' && !$case_insensitive_fs) {
    1718  # Create another makefile called "makefile"
    1819  open(MAKEFILE,"> makefile");
     
    3132unlink $makefile;
    3233
    33 if ($port_type eq 'UNIX') {
     34if ($port_type eq 'UNIX' && !$case_insensitive_fs) {
    3435  &run_make_with_options("","",&get_logfile);
    3536  &compare_output("It chose makefile\n",&get_logfile(1));
  • 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.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette