#742: Parrot::Test::Util::create_tempfile() cannot handle DIR option on Cygwin
---------------------+------------------------------------------------------
Reporter: jkeenan | Owner: jkeenan
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: 1.2.0
Severity: medium | Keywords: test tempfile
Lang: | Patch: applied
Platform: cygwin |
---------------------+------------------------------------------------------
Thanks to smoke tester ksethura++, we are getting steady Smolder reports
on how Parrot builds on Cygwin.
([http://smolder.plusthree.com/app/public_projects/report_details/23175
Example.]) One test file is consistently croaking:
''t/compilers/imcc/syn/file.t''. It fails with a message like this:
{{{
1..14
Error in tempfile() using /cygdrive/parrot/XXXXXXXXXX.pasm:
Parent directory (/cygdrive/parrot/) is not writable
at lib/Parrot/Test/Util.pm line 52
# Looks like your test died before it could output anything.
}}}
In this file `File::Temp::tempfile()` is not called directly. Rather, it
is wrapped by `Parrot::Test::Util::create_tempfile()`. This function is
called in 9 different test files and is called multiple times within
''file.t''. I therefore hypothesized that there was something different
about the way `create_tempfile()` was called in ''file.t'' that was
causing the file to die.
Hypothesis confirmed: In the first instance of `create_tempfile()` in
this file, it is called with a `DIR` key-value pair -- the only such
instance anywhere in our test suite.
{{{
my ($FOO, $temp_pasm) = create_tempfile(
SUFFIX => '.pasm',
DIR => cwd(), # line 36 (rebroken for readability)
UNLINK => 1 );
}}}
Something about `DIR => cwd()` is not appreciated on Cygwin.
I removed that key-value pair and re-ran ''file.t''. The file ran without
incident on Linux/i386 and Darwin/PPC -- the two platforms I have
available. I'm going to go out on a limb and commit this to trunk because
getting it available for ksethura's Smolder testing will probably be the
quickest way of confirming whether my fix is correct.
Patch applied in r39416.
Thank you very much.[[BR]]
kid51
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/742>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets