Subject: | Test broken on Win32 |
Below is the output from a recent test run:
C:\.cpanplus\5.6.1\build\Class-MethodMaker-2.08>nmake test
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl
ib\lib', 'blib\arch')" t\0-signature.t t\array.t t\basic.t t\diffclass.t t\hash.
t t\new.t t\redefine-warnings.t t\scalar.t t\v1_abstract.t t\v1_boolean.t t\v1_c
ode.t t\v1_copy.t t\v1_counter.t t\v1_get_concat.t t\v1_get_set.t t\v1_get_set_h
i.t t\v1_hash.t t\v1_key_attrib.t t\v1_key_with_create.t t\v1_list.t t\v1_method
.t t\v1_new.t t\v1_new_hash_with_init.t t\v1_object.t t\v1_object_list.t t\v1_ob
ject_tie_hash.t t\v1_object_tie_list.t t\v1_set_once.t t\v1_set_once_static.t t\
v1_singleton.t t\v1_static_get_set.t t\v1_static_hash.t t\v1_static_list.t t\v1_
tie_hash.t t\v1_tie_list.t t\v1_tie_scalar.t
t\0-signature..............ok
1/1 skipped: Next time around, consider install Module::Signature,
t\array....................ok
t\basic....................ok
t\diffclass................ok
t\hash.....................ok
t\new......................ok
t\redefine-warnings........ok 1/2Can't unlink(\s200.1): Permission denied at t\r
edefine-warnings.t line 48
t\redefine-warnings........dubious
Test returned status 13 (wstat 3328, 0xd00)
DIED. FAILED test 2
Failed 1/2 tests, 50.00% okay
t\scalar...................ok 202/314Can't unlink(\s1tk.1): Permission denied at
t\scalar.t line 575
t\scalar...................dubious
Test returned status 13 (wstat 3328, 0xd00)
DIED. FAILED tests 203-314
Failed 112/314 tests, 64.33% okay
t\v1_abstract..............ok
t\v1_boolean...............ok
t\v1_code..................ok
t\v1_copy..................ok
t\v1_counter...............ok
t\v1_get_concat............ok
t\v1_get_set...............ok
t\v1_get_set_hi............ok
t\v1_hash..................ok
t\v1_key_attrib............ok
t\v1_key_with_create.......ok
t\v1_list..................ok
t\v1_method................ok
t\v1_new...................ok
t\v1_new_hash_with_init....ok
t\v1_object................ok
t\v1_object_list...........ok
t\v1_object_tie_hash.......ok
t\v1_object_tie_list.......ok
t\v1_set_once..............ok
t\v1_set_once_static.......ok
t\v1_singleton.............ok
t\v1_static_get_set........ok
t\v1_static_hash...........ok
t\v1_static_list...........ok
t\v1_tie_hash..............ok
t\v1_tie_list..............ok
t\v1_tie_scalar............ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t\redefine-warnings.t 13 3328 2 2 100.00% 2
t\scalar.t 13 3328 314 224 71.34% 203-314
1 subtest skipped.
Failed 2/36 test scripts, 94.44% okay. 113/1755 subtests failed, 93.56% okay.
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0xff'
Stop.
The failures are because of the way you try and delete an open file in save_output() within your hand rolled test.pm. This absolutely will not work on Win32 machines, as the OS will refuse to remove a file that is being accessed. I suggest you skip these tests if you're on a Win32 platform, or find an alternative method to create this kind of file handle.