aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Pautler <jeffrey.pautler@ni.com>2017-07-10 10:02:19 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-07-10 11:46:15 -0400
commitd95b0b5d0de99c3d40f164eb5953efae3df3e5f8 (patch)
treea644df9ab472b84fee08e712223372cca207b8f3
parent6535b4a3ec1f2c2c62dd394f17227a6fa18d03cb (diff)
downloadmeta-cloud-services-d95b0b5d0de99c3d40f164eb5953efae3df3e5f8.tar.gz
meta-cloud-services-d95b0b5d0de99c3d40f164eb5953efae3df3e5f8.tar.bz2
meta-cloud-services-d95b0b5d0de99c3d40f164eb5953efae3df3e5f8.zip
python-salttesting: Modify patch to improve ptest output
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@ni.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta-openstack/recipes-devtools/python/python-salttesting/0001-Add-ptest-output-option-to-test-suite.patch19
1 files 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 c2973201..e86768a1 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@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@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