[Piglit] [PATCH 1/3] Add the shell script identifiers to the tests.

Chad Versace chad.versace at linux.intel.com
Fri Feb 8 11:00:29 PST 2013


The *.tests files are not executables, so they shouldn't contain a shebang (#!)
line. I'm not an emacs user, but I believe it should be possible to accomplish
your goal by adding information to the `-*-` line.

On 02/07/2013 01:10 PM, Kenney Phillis wrote:
> This is extremely useful for distributed testing where the test results are not in the same folder as piglit is. This happens regularly when piglit is installed through packages and then ran in the user home directory.
> ---
>  tests/all.tests                 |    1 +
>  tests/external-glslparser.tests |    1 +
>  tests/glean-fragProg1.tests     |    3 +++
>  tests/glean-glsl1.tests         |    3 +++
>  tests/glean-vertProg1.tests     |    3 +++
>  tests/gtf.tests                 |    3 +++
>  tests/igt.tests                 |    3 +++
>  tests/quick-driver.tests        |    2 ++
>  tests/quick.tests               |    1 +
>  tests/r300.tests                |    2 ++
>  tests/r500.tests                |    2 ++
>  tests/r600.tests                |    2 ++
>  tests/sanity.tests              |    3 +++
>  13 files changed, 29 insertions(+)
> 
> diff --git a/tests/all.tests b/tests/all.tests
> index 3e2d3f8..d76d452 100644
> --- a/tests/all.tests
> +++ b/tests/all.tests
> @@ -1,3 +1,4 @@
> +#!/usr/bin/env python
>  # -*- coding: utf-8 -*-
>  # All tests that come with piglit, using default settings
>  
> diff --git a/tests/external-glslparser.tests b/tests/external-glslparser.tests
> index 4e50173..087807e 100644
> --- a/tests/external-glslparser.tests
> +++ b/tests/external-glslparser.tests
> @@ -1,3 +1,4 @@
> +#!/usr/bin/env python
>  # -*- coding: utf-8 -*-
>  # All tests that come with piglit, using default settings
>  
> diff --git a/tests/glean-fragProg1.tests b/tests/glean-fragProg1.tests
> index 65e1718..fa215f4 100644
> --- a/tests/glean-fragProg1.tests
> +++ b/tests/glean-fragProg1.tests
> @@ -1,3 +1,6 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
>  add_fp1('ABS test')
>  add_fp1('ADD test')
>  add_fp1('ADD with saturation')
> diff --git a/tests/glean-glsl1.tests b/tests/glean-glsl1.tests
> index db091ef..502473c 100644
> --- a/tests/glean-glsl1.tests
> +++ b/tests/glean-glsl1.tests
> @@ -1,3 +1,6 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
>  add_glsl1('Directly set fragment color')
>  add_glsl1('Directly set vertex color')
>  add_glsl1('Pass-through vertex color')
> diff --git a/tests/glean-vertProg1.tests b/tests/glean-vertProg1.tests
> index 6428b06..b1880b0 100644
> --- a/tests/glean-vertProg1.tests
> +++ b/tests/glean-vertProg1.tests
> @@ -1,3 +1,6 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
>  add_vp1('ABS test')
>  add_vp1('ADD test')
>  add_vp1('ARL test')
> diff --git a/tests/gtf.tests b/tests/gtf.tests
> index 1d0070a..1658fc4 100644
> --- a/tests/gtf.tests
> +++ b/tests/gtf.tests
> @@ -1,3 +1,6 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
>  #
>  # Permission is hereby granted, free of charge, to any person
>  # obtaining a copy of this software and associated documentation
> diff --git a/tests/igt.tests b/tests/igt.tests
> index 7890a8a..6cad3ba 100644
> --- a/tests/igt.tests
> +++ b/tests/igt.tests
> @@ -1,3 +1,6 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
>  #
>  # Copyright (c) 2012 Intel Corporation
>  #
> diff --git a/tests/quick-driver.tests b/tests/quick-driver.tests
> index f7c1a0f..64aa3c8 100644
> --- a/tests/quick-driver.tests
> +++ b/tests/quick-driver.tests
> @@ -1,5 +1,7 @@
> +#!/usr/bin/env python
>  # -*- coding: utf-8 -*-
>  
> +
>  import os.path
>  
>  global profile
> diff --git a/tests/quick.tests b/tests/quick.tests
> index 89ba2c3..d1ceeca 100644
> --- a/tests/quick.tests
> +++ b/tests/quick.tests
> @@ -1,3 +1,4 @@
> +#!/usr/bin/env python
>  # -*- coding: utf-8 -*-
>  #
>  # Testing drivers for Radeon hardware
> diff --git a/tests/r300.tests b/tests/r300.tests
> index 78f457f..17596c0 100644
> --- a/tests/r300.tests
> +++ b/tests/r300.tests
> @@ -1,3 +1,5 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
>  #
>  # Testing the r300 DRI driver
>  #
> diff --git a/tests/r500.tests b/tests/r500.tests
> index 6eafa61..34ea9d1 100644
> --- a/tests/r500.tests
> +++ b/tests/r500.tests
> @@ -1,3 +1,5 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
>  #
>  # Testing the r500 DRI driver
>  #
> diff --git a/tests/r600.tests b/tests/r600.tests
> index 5355883..71422d3 100644
> --- a/tests/r600.tests
> +++ b/tests/r600.tests
> @@ -1,3 +1,5 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
>  
>  import os.path
>  
> diff --git a/tests/sanity.tests b/tests/sanity.tests
> index baff0db..d610774 100644
> --- a/tests/sanity.tests
> +++ b/tests/sanity.tests
> @@ -1,3 +1,6 @@
> +#!/usr/bin/env python
> +# -*- coding: utf-8 -*-
> +
>  #
>  # Minimal tests to check whether the installation is working
>  #
> 



More information about the Piglit mailing list