[Dancer-users] Failing tests for sessions during Dancer upgrade from 1.3050 to 1.3060

Stefan Oberwahrenbrock oberwahrenbrock at gmx.de
Sat Jun 18 20:41:42 CEST 2011


Hello Carlos,

thanks for your hint! Having in mind, that I could install Dancer 1.3060 
on my Windows system and now knowing, that it installs on Debian 
"unstable", I did some further investigations.

"t/08_session/05_yaml.t" for Dancer 1.3060 introduced some further tests 
using temporary files and directories. Thus, my hope was to find the 
solution for my problem in some platform specific code, that deals with 
these files and directories.

Finally I found out that I "just" had to upgrade my "File::Temp" from 
0.18 to 0.22 - after that, Dancer installations finished successfully!

Concerning the two versions of "File::Temp" there occured some changes 
on output strings ("is not a directory" vs. "does not exist") - Dancer 
installation expected the newer ones. I listed the differences for 
illustration purpose down below ;-)

Greetings,
Stefan

----<start output>----

lenny64:~# grep 'Parent' /root/Temp.pm_0.18
     ${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
     ${$options{ErrStr}} = "Parent directory ($parent) is not writable\n";
       ${$options{ErrStr}} = "Parent directory ($parent) is not safe 
($safeerr)";
       ${$options{ErrStr}} = "Parent directory ($parent) is not safe 
($safeerr)";
but shorter. Parent directory specifications are stripped from the

lenny64:~# grep 'Parent' /root/Temp.pm_0.22
     ${$options{ErrStr}} = "Parent directory ($parent) does not exist";
     ${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
       ${$options{ErrStr}} = "Parent directory ($parent) is not safe 
($safeerr)";
       ${$options{ErrStr}} = "Parent directory ($parent) is not safe 
($safeerr)";
but shorter. Parent directory specifications are stripped from the

----<stop output>----



Am 18.06.2011 05:35, schrieb Carlos Ivan Sosa:
> I can confirm that in Debian unstable, Dancer 1.3060 builts correctly
> without a problem.
> http://www.cpantesters.org/cpan/report/d49c478a-98f1-11e0-bf7b-ec4f2fb29734
>
>
> On Fri, Jun 17, 2011 at 3:00 AM, Stefan Oberwahrenbrock
> <oberwahrenbrock at gmx.de>  wrote:
>> Hello fellow dancers,
>>
>> trying to upgrade Dancer from 1.3050 to 1.3060 on my Debian 5.0 system, I
>> got an error message during "make test" when it came to run tests on Dancer
>> sessions. The relevant output was this:
>>
>> ----<start output>----
>>
>> Failed Test            Stat Wstat Total Fail  List of Failed
>> -------------------------------------------------------------------------------
>> t/08_session/05_yaml.t    1   256    12    1  11
>>
>>
>> t/08_session/05_yaml...........................NOK 11/12
>> #   Failed test 'session dir was not recreated'
>> #   at t/08_session/05_yaml.t line 58.
>> #                   'Error in tempfile() using
>> /tmp/LGNdqcYb9t/sessions/714935461137124675383662533356367296.XXXXXXXX:
>> Parent directory (/tmp/LGNdqcYb9t/sessions/) is not a directory at
>> /root/.cpan/build/Dancer-1.3060-R45rPb/blib/lib/Dancer/Session/YAML.pm line
>> 90
>> # '
>> #     doesn't match '(?-xism:Parent directory .* does not exist)'
>> # Looks like you failed 1 test of 12.
>> t/08_session/05_yaml...........................dubious
>>         Test returned status 1 (wstat 256, 0x100)
>> DIED. FAILED test 11
>>         Failed 1/12 tests, 91.67% okay
>>
>> ----<stop output>----
>>
>> I have to admit, that I don't have any practical knowledge on writing tests
>> - up till now, I only used distributions and never wrote one :-) Trying to
>> interpretate the message it seemed to me, that in the above mentioned
>> message, the expected output just differed a little bit from the one, that
>> really occured during the test ("is not a directory" vs. "does not exist").
>> Optimistically I changed line 58 of "t/08_session/05_yaml.t"
>> from:
>> like ($@, qr/Parent directory .* does not exist/, "session dir was not
>> recreated");
>> to:
>> like ($@, qr/Parent directory .* is not a directory/, "session dir was not
>> recreated");
>>
>> After this alteration, "make test" and "make install" just worked without
>> any errors - Dancer 1.3060 is now available on my system. It would be nice,
>> if anyone could comment my approach - I am not sure, if I did the right
>> thing.
>>
>> Thanks and greetings,
>> Stefan
>> _______________________________________________
>> Dancer-users mailing list
>> Dancer-users at perldancer.org
>> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>>
>


More information about the Dancer-users mailing list