Ticket #369 (closed bug: fixed)
Change to Parrot::Configure::Compiler causes uninitialized value warning in config test
Reported by: | jkeenan | Owned by: | fperrad |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | configure | Version: | trunk |
Severity: | low | Keywords: | uninitialized |
Cc: | fperrad | Language: | |
Patch status: | Platform: | all |
Description (last modified by jkeenan) (diff)
In this commit, r36940, we find this change to lib/Parrot/Configure/Compiler.pm:
+ $options{no_simply_expanded_var} = + $conf->data->get('make') eq 'nmake';
This assumes that a value has been initialized for $conf->data->get('make'). That's probably true at the point where Configure.pl encounters this code.
But there are points in testing the configuration system where it is not true. Running perl Configure.pl --test=configure, I encountered uninitialized value warnings in t/configure/034-step.t. Here's the output of prove -v:
$ prove -v t/configure/034-step.t t/configure/034-step.... 1..15 ok 1 - Got expected error message when non-existent file provided as argument to genfile(). Use of uninitialized value in string eq at lib/Parrot/Configure/Compiler.pm line 377. ok 2 - genfile() returned true value with 'file_type' option being set to 'makefile' Use of uninitialized value in string eq at lib/Parrot/Configure/Compiler.pm line 377. ok 3 - genfile() failed due to unrecognized comment type with expected message Use of uninitialized value in string eq at lib/Parrot/Configure/Compiler.pm line 377. ok 4 - genfile() returned true value with false value for 'feature_file' option ok 5 - Error message caught ok 6 - Error message had expected content ok 7 - Bad Perl code caught by genfile() ok 8 - genfile() returned true when warning expected ok 9 - got expected warning ok 10 - genfile() died as expected with replace_slashes option and line ending in trailing slash ok 11 - genfile() did transformation of 'make' 'basename' as expected ok 12 - genfile() did transformation of 'make' 'notdir' as expected ok 13 - genfile() did transformation of 'make' 'addprefix' as expected ok 14 - genfile() did transformation of 'make' 'wildcard' as expected ok 15 - genfile() failed due to unrecognized file type with expected message ok All tests successful. Files=1, Tests=15, 1 wallclock secs ( 0.00 usr 0.00 sys + 0.08 cusr 0.00 csys = 0.08 CPU) Result: PASS
François: Can you take a look at this?
Thank you very much.
kid51
Change History
Note: See
TracTickets for help on using
tickets.