[meta-virtualization] [meta-cloud-services][PATCH] python-salttesting: Modify patch to improve ptest output

Bruce Ashfield bruce.ashfield at gmail.com
Mon Jul 10 08:47:15 PDT 2017


merged.

Bruce

On Mon, Jul 10, 2017 at 11:02 AM, Jeffrey Pautler <jeffrey.pautler at ni.com>
wrote:

> Current test case output includes shortDescription and looks like this:
> PASS: [CPU:24.1%|MEM:17.4%] First line of test case doc string
>
> New test case output replaces shortDescription with test name and looks
> like this:
> PASS: test_case_function_name
>
> Signed-off-by: Jeffrey Pautler <jeffrey.pautler at ni.com>
> ---
>  .../0001-Add-ptest-output-option-to-test-suite.patch  | 19
> ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/meta-openstack/recipes-devtools/python/python-
> salttesting/0001-Add-ptest-output-option-to-test-suite.patch
> b/meta-openstack/recipes-devtools/python/python-
> salttesting/0001-Add-ptest-output-option-to-test-suite.patch
> index c297320..e86768a 100644
> --- a/meta-openstack/recipes-devtools/python/python-
> salttesting/0001-Add-ptest-output-option-to-test-suite.patch
> +++ b/meta-openstack/recipes-devtools/python/python-
> salttesting/0001-Add-ptest-output-option-to-test-suite.patch
> @@ -1,4 +1,4 @@
> -From 7e2642530bfd4ac0226b90404e7a4511e44756b6 Mon Sep 17 00:00:00 2001
> +From 1950b943b7173198f345a1cff7b7f771cbac2244 Mon Sep 17 00:00:00 2001
>  From: Collin Richards <collin.richards at ni.com>
>  Date: Tue, 28 Jun 2016 16:02:22 -0500
>  Subject: [PATCH] Add ptest output option to test suite
> @@ -12,12 +12,12 @@ Signed-off-by: Collin Richards <collin.richards at ni.com
> >
>  Natinst-ReviewBoard-ID: 143279
>  ---
>   salttesting/parser/__init__.py |  12 +++
> - salttesting/ptest.py           | 168 ++++++++++++++++++++++++++++++
> +++++++++++
> - 2 files changed, 180 insertions(+)
> + salttesting/ptest.py           | 165 ++++++++++++++++++++++++++++++
> +++++++++++
> + 2 files changed, 177 insertions(+)
>   create mode 100644 salttesting/ptest.py
>
>  diff --git a/salttesting/parser/__init__.py
> b/salttesting/parser/__init__.py
> -index 1e7275b4b65ef29deb89049a70bf6a074e11873d..
> d8cba0cb1e4814b7065b6896186c25300048ec92 100644
> +index 1e7275b..d8cba0c 100644
>  --- a/salttesting/parser/__init__.py
>  +++ b/salttesting/parser/__init__.py
>  @@ -25,6 +25,7 @@ from functools import partial
> @@ -55,10 +55,10 @@ index 1e7275b4b65ef29deb89049a70bf6a074e11873d..
> d8cba0cb1e4814b7065b6896186c2530
>                   stream=sys.stdout,
>  diff --git a/salttesting/ptest.py b/salttesting/ptest.py
>  new file mode 100644
> -index 0000000000000000000000000000000000000000..
> 9780886bc8f9d400aab2e96a33b14af980e64315
> +index 0000000..4c50f57
>  --- /dev/null
>  +++ b/salttesting/ptest.py
> -@@ -0,0 +1,168 @@
> +@@ -0,0 +1,165 @@
>  +# -*- coding: utf-8 -*-
>  +
>  +"""
> @@ -158,10 +158,7 @@ index 0000000000000000000000000000000000000000..
> 9780886bc8f9d400aab2e96a33b14af9
>  +        self.descriptions = descriptions
>  +
>  +    def getDescription(self, test):
> -+        if self.descriptions:
> -+            return test.shortDescription() or str(test)
> -+        else:
> -+            return str(test)
> ++        return str(test)
>  +
>  +    def startTest(self, test):
>  +        TestResult.startTest(self, test)
> @@ -228,5 +225,5 @@ index 0000000000000000000000000000000000000000..
> 9780886bc8f9d400aab2e96a33b14af9
>  +        self.stream.writeln()
>  +        return result
>  --
> -1.9.1
> +2.13.2
>
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20170710/8fd0bf38/attachment.html>


More information about the meta-virtualization mailing list