Reviewed-by: Mark Janes <[email protected]>

[email protected] writes:

> From: Dylan Baker <[email protected]>
>
> This calculates the group totals on load (this is stored in the json),
> which is required to get proper totals information.
> ---
>  framework/backends/junit.py             | 2 ++
>  framework/tests/junit_backends_tests.py | 4 ++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/framework/backends/junit.py b/framework/backends/junit.py
> index ce6a27a..15c6c0b 100644
> --- a/framework/backends/junit.py
> +++ b/framework/backends/junit.py
> @@ -278,6 +278,8 @@ def _load(results_file):
>  
>          run_result.tests[name] = result
>  
> +    run_result.calculate_group_totals()
> +
>      return run_result
>  
>  
> diff --git a/framework/tests/junit_backends_tests.py 
> b/framework/tests/junit_backends_tests.py
> index 1a4be0e..7d5a3fc 100644
> --- a/framework/tests/junit_backends_tests.py
> +++ b/framework/tests/junit_backends_tests.py
> @@ -266,6 +266,10 @@ class TestJUnitLoad(utils.StaticDirectory):
>          nt.eq_(
>              test, 'this is stderr\n\ntime start: 1.0\ntime end: 4.5\n        
> ')
>  
> +    def test_totals(self):
> +        """backends.junit._load: Totals are calculated."""
> +        nt.ok_(bool(self.xml()))
> +
>  
>      @utils.no_error
>      def test_load_file(self):
> -- 
> 2.6.1
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to