An issue with the use of tmp files during testing came up a week or so ago here, and it may be that a solution in that thread is going to be similar to the solution you will have to employ:

t/CVE-2015-1592.t uses File::Temp to create a temporary directory. Typically this will be in /tmp for linux, or wherever Windows thinks temp directories should go. File::Temp uses File::Spec's tmpdir function to tell it where to put tempfiles and tempdirs. On Windows, File::Spec gets that information from File::Spec::Win32, which has the following semantics:

=item tmpdir Returns a string representation of the first existing directory from the following list: $ENV{TMPDIR} $ENV{TEMP} $ENV{TMP} SYS:/temp C:\system\temp C:/temp /tmp /

In other words, you can set $ENV{TMPDIR} or one of several other environment variables to influence where the temporary directory will be created. By default it will be in SYS:/temp, or C:\system\temp, or C:/temp, or /tmp, or /, in that order. But you could specify an alternate location before running the tests. It's been years since I used Windows in any meaningful way, but Google seems to find for me that set or setx can be used to set the appropriate environment variable. I've found under Linux it's useful to create a ~/tmp/ for times when the systemwide /tmp is not appropriate. For example, on my centos7 box /tmp is mounted without executable set, so tests that must execute something in /tmp will fail (local::lib, for example) unless I hint the system to use a different temp directory with less restrictive execution privileges.


Dave


In reply to Re: Installation of Storable 3.11 fails due to antivirus removing test data by davido
in thread Installation of Storable 3.11 fails due to antivirus removing test data by Lotus1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.