#9739: Handle duplicate file basenames when testing multiple files in parallel
-------------------------------+--------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-4.7.1
Component: doctest | Keywords: doctest scripts
Work_issues: | Upstream: N/A
Reviewer: Robert Bradshaw | Author: Mitesh Patel, John Palmieri
Merged: | Dependencies:
-------------------------------+--------------------------------------------
Comment(by jhpalmieri):
Replying to [comment:56 leif]:
> At this point just a comment on the naming / mangling:
>
> * To me, it doesn't make any sense to create "hidden" files, so I would
omit the leading period.
Okay, not a high priority and outside the scope of this ticket, but
harmless enough. Done. (We could do the same thing with the files
recording timing data, but that's for another ticket.)
> * We should perhaps apply some character substitutions to
`socket.gethostname()` as well, like `sage.misc.misc` does (see quote
above).
Done.
> * Thinking more about it, I would replace slashs (`os.path.sep`) by
periods (and not double-underscores or, as currently, dashs), since that
way the temporary filenames resemble (at least partially) fully qualified
Python module names.
Done.
>
> (As discussed, I'd also change the ''default'' for `SAGE_TESTDIR`, e.g.
to `tempfile.gettempdir()`.)
I know that I was suggesting this earlier, but on further reflection, we
shouldn't do this here: for example, there may be users who expect the
doctesting files to be in `.sage/tmp/`, and changing this may therefore
make people unhappy. I think it's a good idea, but it should be on
another ticket. (I'm agreeing with Dave's point that we should try to fix
just the bug here, and then we can work on other improvement separately.)
> We could make sure once that the temporary directory
(`${SAGE_TESTDIR}/${hostname}-${pid}/`) is writable by the user. I think
we should also clean it up in case it already exists, as anything left
there is potentially very old and unrelated to the current test run. We
''might'' also adjust the permissions of the directory.
Done.
> Looking only at your (John's) patch, is `temp_py_file` defined anywhere?
(I only see it gets added to `tmpfiles`.)
That was a mistake, which I think I've fixed.
> P.S.: Why not base the patch on Mitesh's? (Which AFAIR only needed two
changes.)
No good reason.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9739#comment:57>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.