<p dir="ltr"><br>
On Aug 30, 2014 3:23 PM, "Dylan Baker" <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>> wrote:<br>
><br>
> I'll need to think about it and read the code to be sure, I think that<br>
> using '/' in test run names may cause some strange behavior in the html<br>
> pages because of assumptions. There's also the windows '\\' issue to<br>
> think about.</p>
<p dir="ltr">Yeah, just letting paths be paths is probably not the solution. Does python provide a nice way to sanatize names for this sort of thing? I'm not a fan of adding silly restrictions to things that are otherwise arbitrary strings. Let me know what you think.</p>
<p dir="ltr">If I have to, I can munge things in my shell script before passing the name to piglit but then they're munged in the table labels in the HTML.<br>
--Jason</p>
<p dir="ltr">> But, either way you need to put makedirs in a try/except block<br>
> try:<br>
> os.makedirs(...)<br>
> except OSError:<br>
> pass</p>
<p dir="ltr">Yup</p>
<p dir="ltr">> On Saturday, August 30, 2014 11:49:51 AM Jason Ekstrand wrote:<br>
> > This way test names can contain "/" characters. I to name tests after git<br>
> > branches and I tend to have git branches named wip/whatever. This prevents<br>
> > piglit from crashing.<br>
> > ---<br>
> > framework/summary.py | 2 +-<br>
> > 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/framework/summary.py b/framework/summary.py<br>
> > index 332aa40..1815dc7 100644<br>
> > --- a/framework/summary.py<br>
> > +++ b/framework/summary.py<br>
> > @@ -454,7 +454,7 @@ class Summary:<br>
> ><br>
> > # Iterate across the tests creating the various test specific files<br>
> > for each in self.results:<br>
> > - os.mkdir(path.join(destination, <a href="http://each.name">each.name</a>))<br>
> > + os.makedirs(path.join(destination, <a href="http://each.name">each.name</a>))<br>
> ><br>
> > if each.time_elapsed is not None:<br>
> > time = datetime.timedelta(0, each.time_elapsed)<br>
> > --<br>
> > 2.1.0<br>
> ><br>
> > _______________________________________________<br>
> > Piglit mailing list<br>
> > <a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
> > <a href="http://lists.freedesktop.org/mailman/listinfo/piglit">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</p>