#13928: Problematic file filter in skip() from sage-ptest
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: mvngu
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: doctest | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nathann Cohen | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by nbruin):
Perhaps there's a middle way that satisfies both leif and nathan: I can
see why filenames starting with a "." should be skipped during discovery
and recursion, but if a dotted filename gets explicitly included in the
pathname, the user is clearly asking for testing that file, so why not?
Compare the behaviour of `ls -R <path name>`, for instance. It won't
list/recurse into any dotted files ''within'' `<path name>`, but it will
happily work if any of the components of `<path name>` have a dot in them.
I don't know where/how `make ptest` gets a list of to-be-tested files, but
I'd think that you want to filter out dotted files there (i.e., when
you're discovering new leafs/nodes), rather than when you've assembled a
full path name already. That basically means: let `populatefilelist` do
the hard work, not `skip` (in fact, shouldn't everything of skip be
absorbed in there?)
(But really ... why ''would'' you want to install software in a dotted
directory? Do you want to hide it from your sysadmin?)
Anyway, your current patch is fragile and not an improvement (other than
that it apparently fixes your particular problem). Any time you require a
`realpath` you're probably doing something wrong. It's a very expensive
operation and it's fragile. You should really work with file paths as
presented to you. The user probably had a reason for presenting the path
to you in the way he/she did. Don't second-guess him/her. In fact, with
remounting and loop mounting, files might not ''have'' a canonical
`realpath` anyway, showing that relying on it is a logical flaw.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13928#comment:14>
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.