On Wednesday, November 13, 2013 07:46:31 PM Damien Lespiau wrote: > On Wed, Nov 13, 2013 at 11:12:24AM -0800, Dylan Baker wrote: > > This uses python's tempfile module to get a platform dependent place to > > put temporary files, which should allow html summary to work even when > > installed somewhere read-only. > > > > Signed-off-by: Dylan Baker <baker.dyla...@gmail.com> > > --- > > > > framework/summary.py | 25 +++++++++++++++---------- > > 1 file changed, 15 insertions(+), 10 deletions(-) > > > > diff --git a/framework/summary.py b/framework/summary.py > > index a587712..bbb423f 100644 > > --- a/framework/summary.py > > +++ b/framework/summary.py > > @@ -24,6 +24,7 @@ import os.path as path > > > > import itertools > > import shutil > > import collections > > > > +import tempfile > > > > from mako.template import Template > > > > # a local variable status exists, prevent accidental overloading by > > renaming> > > @@ -234,6 +235,8 @@ class Summary: > > uses methods to generate various kinds of output. The reference > > implementation is HTML output through mako, aptly named > > generateHTML(). > > """ > > > > + TEMP_DIR = path.join(tempfile.gettempdir(), "piglit/html-summary") > > + TEMPLATE_DIR = path.join(os.environ['PIGLIT_SOURCE_DIR'], > > 'templates') > > I had something a bit less manual here: > > + piglitDir = > path.normpath(path.join(path.dirname(path.realpath(__file__)), os.pardir)) > + templatesDir = path.join(piglitDir, "templates") > > Can we have PIGLIT_SOURCE_DIR as an override of top of this?
PIGLIT_SOURCE_DIR is always set in core.py in an way nearly identical to the way you're looking for piglitDir, which we import, so I don't think this should be an issue
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit