Dylan Baker <[email protected]> writes:

> These hooks no-op in the default TestProfile class, however they are
> intended to give versatility and power to external test suites, which
> may have specific environment requirements, setup requirements, or
> teardown requirements, by allowing them to subclass TestProfile and set
> these methods.
> ---
>  framework/core.py | 24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/framework/core.py b/framework/core.py
> index 5238f60..48dd9b0 100644
> --- a/framework/core.py
> +++ b/framework/core.py
> @@ -474,14 +474,34 @@ class TestProfile(object):
>          self.test_list = dict(item for item in self.test_list.iteritems()
>                                if check_all(item))
>  
> +    def pre_run_hook(self):
> +        """ Hook executed at the start of TestProfile.run
> +
> +        To make use of this hook one will need to subclass TestProfile, and
> +        set this to do something, as be dfault it will no-op
> +
> +        """
> +        pass
> +
> +    def post_run_hook(self):
> +        """ Hook executed at the end of TestProfile.run
> +
> +        To make use of this hook one will need to subclass TestProfile, and
> +        set this to do something, as be dfault it will no-op

"by default" (both times)

Attachment: pgpUrnUpJ6oT1.pgp
Description: PGP signature

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to