Wed 01 Mar 2006 04:01:54 AM UTC, original submission:
--- STEPS TO REPRODUCE:
[greg@x2 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
***************
! 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:
[greg@x2 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)
|