public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/standard/, pmstestsuite/library/, pmstestsuite/
Date: Wed,  3 Aug 2011 20:17:03 +0000 (UTC)	[thread overview]
Message-ID: <417cc44cec713c41b91ee19281b8f13b88a931e7.mgorny@gentoo> (raw)

commit:     417cc44cec713c41b91ee19281b8f13b88a931e7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  3 20:02:32 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug  3 20:02:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=417cc44c

Drop bool return in check_results() backwards compat.

---
 pmstestsuite/cli.py                        |   18 +++++-------------
 pmstestsuite/library/case.py               |    1 -
 pmstestsuite/library/depend_case.py        |   10 ++++------
 pmstestsuite/library/standard/dbus_case.py |   14 +++++++-------
 4 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py
index 155dc2c..f21c7a9 100644
--- a/pmstestsuite/cli.py
+++ b/pmstestsuite/cli.py
@@ -129,21 +129,13 @@ class PMSTestSuiteCLI(object):
 		self.failed = []
 		for t in self.test_library:
 			try:
-				res = t.check_result(self.pm)
-			except AssertionError:
-				res = False
-				outc = 'F'
-			except Exception:
-				res = False
-				outc = 'E'
-				# XXX: store exception details somewhere
+				t.check_result(self.pm)
+			except Exception as e:
+				outc = 'F' if isinstance(e, AssertionError) else 'E'
+				self.failed.append(t)
+				# XXX: store exception details somewhere?
 			else:
 				outc = '.'
-				# forward compat
-				if res is None:
-					res = True
-			if not res:
-				self.failed.append(t)
 			t.clean(self.pm)
 			print(outc, end='')
 		print('')

diff --git a/pmstestsuite/library/case.py b/pmstestsuite/library/case.py
index 9ff757a..6b74fc6 100644
--- a/pmstestsuite/library/case.py
+++ b/pmstestsuite/library/case.py
@@ -480,4 +480,3 @@ class EbuildTestCase(TestCase):
 		merged = self.atom(pm) in pm.installed
 		self.assertBool(not self.expect_failure, merged,
 				'package merged')
-		return True

diff --git a/pmstestsuite/library/depend_case.py b/pmstestsuite/library/depend_case.py
index f5f7327..793d7ce 100644
--- a/pmstestsuite/library/depend_case.py
+++ b/pmstestsuite/library/depend_case.py
@@ -66,10 +66,9 @@ class EbuildDependencyTestCase(EbuildTestCase):
 		return of
 
 	def check_result(self, pm):
-		res = EbuildTestCase.check_result(self, pm)
+		EbuildTestCase.check_result(self, pm)
 		for o in self.dependant_ebuilds:
-			res &= o.check_result(pm)
-		return res
+			o.check_result(pm)
 
 class EclassDependencyTestCase(EclassTestCase, EbuildDependencyTestCase):
 	"""
@@ -151,7 +150,6 @@ class EclassDependencyTestCase(EclassTestCase, EbuildDependencyTestCase):
 		return of
 
 	def check_result(self, pm):
-		res = EclassTestCase.check_result(self, pm)
+		EclassTestCase.check_result(self, pm)
 		for o in self.dependant_ebuilds:
-			res &= o.check_result(pm)
-		return res
+			o.check_result(pm)

diff --git a/pmstestsuite/library/standard/dbus_case.py b/pmstestsuite/library/standard/dbus_case.py
index e0cd09c..97462fb 100644
--- a/pmstestsuite/library/standard/dbus_case.py
+++ b/pmstestsuite/library/standard/dbus_case.py
@@ -104,7 +104,7 @@ class DBusBaseTestCase(object):
 
 	def check_result(self, pm):
 		self.assertTrue(self.dbus_started, 'build started')
-		return self.check_dbus_result(self.dbus_output, pm)
+		self.check_dbus_result(self.dbus_output, pm)
 
 class DBusEbuildTestCase(DBusBaseTestCase, EbuildTestCase):
 	""" D-Bus capable base test case. """
@@ -115,7 +115,7 @@ class DBusEbuildTestCase(DBusBaseTestCase, EbuildTestCase):
 		DBusBaseTestCase.__init__(self)
 
 	def check_dbus_result(self, output, pm):
-		return EbuildTestCase.check_result(self, pm)
+		EbuildTestCase.check_result(self, pm)
 
 class DBusEclassTestCase(DBusBaseTestCase, EclassTestCase):
 	""" D-Bus capable eclass test case. """
@@ -126,7 +126,7 @@ class DBusEclassTestCase(DBusBaseTestCase, EclassTestCase):
 		DBusBaseTestCase.__init__(self)
 
 	def check_dbus_result(self, output, pm):
-		return EclassTestCase.check_result(self, pm)
+		EclassTestCase.check_result(self, pm)
 
 class DBusEbuildDependencyTestCase(DBusBaseTestCase, EbuildDependencyTestCase):
 	""" D-Bus capable dependency test case. """
@@ -137,12 +137,12 @@ class DBusEbuildDependencyTestCase(DBusBaseTestCase, EbuildDependencyTestCase):
 		DBusBaseTestCase.__init__(self)
 
 	def check_dbus_result(self, output, pm):
-		return EbuildDependencyTestCase.check_result(self, pm)
+		EbuildDependencyTestCase.check_result(self, pm)
 
 	def check_result(self, pm):
 		self.assertBool(not self.expect_failure, self.dbus_started,
 				'build started')
-		return self.check_dbus_result(self.dbus_output, pm)
+		self.check_dbus_result(self.dbus_output, pm)
 
 class DBusEclassDependencyTestCase(DBusBaseTestCase, EclassDependencyTestCase):
 	""" D-Bus capable eclass dependency test case. """
@@ -153,9 +153,9 @@ class DBusEclassDependencyTestCase(DBusBaseTestCase, EclassDependencyTestCase):
 		DBusBaseTestCase.__init__(self)
 
 	def check_dbus_result(self, output, pm):
-		return EclassDependencyTestCase.check_result(self, pm)
+		EclassDependencyTestCase.check_result(self, pm)
 
 	def check_result(self, pm):
 		self.assertBool(not self.expect_failure, self.dbus_started,
 				'build started')
-		return self.check_dbus_result(self.dbus_output, pm)
+		self.check_dbus_result(self.dbus_output, pm)



             reply	other threads:[~2011-08-03 20:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03 20:17 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-28 17:15 [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/standard/, pmstestsuite/library/, pmstestsuite/ Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=417cc44cec713c41b91ee19281b8f13b88a931e7.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox