Opened 12 years ago

Last modified 11 years ago

#9739 closed defect

Handle duplicate file basenames when testing multiple files in parallel — at Version 1

Reported by: mpatel Owned by: mvngu
Priority: blocker Milestone: sage-4.7.2
Component: doctest coverage Keywords: doctest scripts race condition unique filenames ptestlong -tp
Cc: drkirkby, jhpalmieri, leif, robertwb, jdemeyer Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mpatel)

When we test


sage-doctest writes


runs the new file through python, and deletes it. This can cause collisions when we test in parallel multiple files with the same basename, e.g., __init__, all, misc, conf, constructor, morphism, index, tests, homset, element, twist, tutorial, sagetex, crystals, cartesian_product, template, ring, etc.

There's a similar problem with testing non-library files, which sage-doctest first effectively copies to SAGE_TESTDIR.

See sage-devel for background.

This ticket may help with some of the doctesting problems discussed on the Sage mailing lists. Related tickets: #9224, #9225, #9449.

Change History (2)

comment:1 Changed 12 years ago by mpatel

  • Description modified (diff)

William Stein suggests:

Could we use the tempfile module instead of using SAGE_TESTDIR.  The
tempfile module makes files and directories by default that are unique
and are *designed* to live on a fast filesystem, which gets cleaned

sage: import tempfile 

Changed 12 years ago by mpatel

Frequency-sorted list of doctest file basenames (includes .py, .pyx, .pxi, .rst, .tex files). Not a patch.

Note: See TracTickets for help on using tickets.