URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15937>
Summary: default_names test dies on Cygwin; $port_type = 'UNIX'; should be 'W32' Project: make Submitted by: gkeranen Submitted on: Wed 03/01/06 at 04:01 Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Component Version: CVS Platform Version: MS Windows Fixed Release: None _______________________________________________________ Details: --- STEPS TO REPRODUCE: [EMAIL PROTECTED] tests]$ ./run_make_tests features/default_names ------------------------------------------------------------------------------ Running tests for GNU make on CYGWIN_NT-5.1 x2 1.5.19(0.150/4/2) i686 GNU Make 3.81rc1 ------------------------------------------------------------------------------ [...] features/default_names .................................. *** Test died (features/default_names): test_driver.pl: 453: abort at test_drive r.pl line 638. 1 Test in 1 Category Failed (See .diff files in work dir for details) :-( --- CONTENTS OF FILE: default_names.diff.1 *** work/features/default_names.base.1 Mon Feb 27 20:51:06 2006 --- work/features/default_names.log.1 Mon Feb 27 20:51:06 2006 *************** *** 1 **** ! It chose makefile --- 1 ---- ! It chose Makefile --- ANALYSIS: tests/scripts/features/default_names is supposed to test if make can correctly execute GNUmakefile, makefile or Makefile, in the correct order, when present. It does this by creating multiple makefiles and compares expected with actual output. default_names attempts to avoid testing with only makefile and Makefile present on case-insensitive file systems (DOS/WIN32 platforms) by using the test: if ($port_type eq 'UNIX') Unfortunately, Cygwin was set to 'UNIX' (the default assignment) and failed the test. $port_type is set in tests/run_make_tests.pl, as follows: # This is probably not specific enough. # if ($osname =~ /Windows/i || $osname =~ /MINGW32/i) { $port_type = 'W32'; } Debug output shows: OS name = `CYGWIN_NT-5.1 x2 1.5.19(0.150/4/2) i686' Port type: UNIX Unlike MinGW, Cygwin is not assigned the port_type 'W32' and, therefore default_names fails trying to create a file 'Makefile' which already exists, as 'makefile'. Assuming these environments are similar enough, as far as the make test suite is concerned, it seems that we should simply assign Cygwin the same port_type value as MinGW. --- SOLUTION: Modify tests/run_make_tests.pl, as follows: # This is probably not specific enough. # if ($osname =~ /Windows/i || $osname =~ /MINGW32/i || $osname =~ /CYGWIN_NT/i) { $port_type = 'W32'; } --- BUG REGRESSION OUTPUT: [EMAIL PROTECTED] tests]$ ./run_make_tests features/default_names [...] features/default_names .................................. ok (2 passed) 2 Tests in 1 Category Complete ... No Failures :-) --- IMPACT OF CHANGE ON OTHER TESTS: No impact was found. Currently, the only other tests which use $port_type variable are: tests/scripts/functions/foreach test/scripts/options/symlinks Results of these tests are exactly the same before and after change of $port_type logic in run_make_tests.pl RESULTS: options/symlinks ........................................ ok (0 passed) [...] functions/foreach ....................................... ok (4 passed) _______________________________________________________ Carbon-Copy List: CC Address | Comment ------------------------------------+----------------------------- [EMAIL PROTECTED] | _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 03/01/06 at 04:01 Name: run_make_tests.pl Size: 9.87KB By: gkeranen run_make_tests.pl - fixed applied <http://savannah.gnu.org/bugs/download.php?item_id=15937&item_file_id=3455> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15937> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make