[Piglit] [PATCH 15/15] framework: add boilerplate to turn off process isolation

Marek Olšák maraeo at gmail.com
Mon Sep 12 13:39:20 UTC 2016


On Fri, Sep 9, 2016 at 9:18 PM, Dylan Baker <dylan at pnwbakers.com> wrote:
> This adds a switch to to turn off process isolation (it is normally on),
> for now this only affects shader_runner, but in the future could affect
> more tests, like glslparsertest or dEQP.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  framework/options.py      |  1 +
>  framework/programs/run.py | 22 ++++++++++++++++++++++
>  piglit.conf.example       |  7 +++++++
>  tests/all.py              | 34 +++++++++++++++++++++++++++++-----
>  tests/shader.py           |  4 ++--
>  5 files changed, 61 insertions(+), 7 deletions(-)
>
> diff --git a/framework/options.py b/framework/options.py
> index 94a8084..5cb88aa 100644
> --- a/framework/options.py
> +++ b/framework/options.py
> @@ -197,6 +197,7 @@ class _Options(object):  # pylint: disable=too-many-instance-attributes
>          self.monitored = False
>          self.sync = False
>          self.deqp_mustpass = False
> +        self.process_isolation = True
>
>          # env is used to set some base environment variables that are not going
>          # to change across runs, without sending them to os.environ which is
> diff --git a/framework/programs/run.py b/framework/programs/run.py
> index f531b37..2f0e9dc 100644
> --- a/framework/programs/run.py
> +++ b/framework/programs/run.py
> @@ -41,6 +41,16 @@ __all__ = ['run',
>             'resume']
>
>
> +def booltype(val):
> +    if val.lower() in ['false', 'no', '0']:
> +        return False
> +    elif val.lower() in ['true', 'yes', '1']:
> +        return True
> +    raise argparse.ArgumentTypeError(
> +        'Case insensitve values of "yes", "no", "false", "true", and "0" or '
> +        '"1" are accepted.')
> +
> +
>  def _default_platform():
>      """ Logic to determine the default platform to use
>
> @@ -183,6 +193,16 @@ def _run_parser(input_):
>                          help='Run only the tests in the deqp mustpass list '
>                               'when running a deqp gles{2,3,31} profile, '
>                               'otherwise run all tests.')
> +    parser.add_argument('--process-isolation',
> +                        dest='process_isolation',
> +                        action='store',
> +                        type=booltype,
> +                        default=core.PIGLIT_CONFIG.safe_get(
> +                            'core', 'process isolation', 'true'),
> +                        help='Set this to allow tests to run without process '
> +                             'isolation. This allows, but does not require, '
> +                             'tests to run multiple tests per process.

Missing ' at the end of the line.

Marek


More information about the Piglit mailing list