|
Posted by Jack D on June 26, 2008, 1:01 am
Please log in for more thread options
> Jack D wrote:
>> I see that I have a errors when installing some Tk modules. All the
>> errors have to do with not being able to display the GUI during the "make
>> test" portion of the install.
>>
>> http://ppm.activestate.com/beta/author/DUNNIGANJ.html
>>
>> Errors such as the following:
>>
>> couldn't connect to display ":0" at
>> /home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindow.pm
>> line 55.
>> MainWindow->new() at test.pl line 26
>>
>> How would I bypass running the GUI test if there is no display to connect
>> to so that the install tests show pass instead of fail?
>>
>> Jack
>>
>
> Hi Jack,
>
> you can use Test::More and a SKIP - block, then just test tkinit()
>
> Christoph
>
>
> use Test::More tests => 17;
> BEGIN {use_ok ('Tk');
> use_ok ('Tk::MyModule');
> }
>
> SKIP:{
>
> my $mw = eval{ tkinit()};
>
> skip 'Tk::MainWindow instantiation failed - skipping Tk-MyModule.t',
> 15 if $@;
>
> ## 15 tests
>
> }#end SKIP
>
Perfect! Thanks Christoph.
Do you know if Test::More a core module?
Jack
|