[Piglit] [PATCH 01/13] summary.py: Dont us os.environ to set the template directory
Ilia Mirkin
imirkin at alum.mit.edu
Sat Jun 21 06:14:00 PDT 2014
Subject has two typos: "Don't use ...". Otherwise,
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Sat, Jun 21, 2014 at 8:06 AM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> This makes summary more robust, since it doesn't rely on
> PIGLIT_SOURCE_DIR being set correctly in the environment.
>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> ---
> framework/summary.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/framework/summary.py b/framework/summary.py
> index e5eb156..7b88c96 100644
> --- a/framework/summary.py
> +++ b/framework/summary.py
> @@ -271,7 +271,8 @@ class Summary:
> 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')
> + TEMPLATE_DIR = path.abspath(
> + path.join(path.dirname(__file__), '..', 'templates'))
>
> def __init__(self, resultfiles):
> """
> --
> 2.0.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list