Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/
Date: Wed, 03 Aug 2011 20:17:22
Message-Id: fa2208e60417359419d02dd1ae4bbfa57927040d.mgorny@gentoo
1 commit: fa2208e60417359419d02dd1ae4bbfa57927040d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 3 19:33:46 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 3 19:33:46 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=fa2208e6
7
8 Print [.EF] when checking test results, alike unittests.
9
10 ---
11 pmstestsuite/cli.py | 10 +++++++++-
12 1 files changed, 9 insertions(+), 1 deletions(-)
13
14 diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py
15 index 9a44796..155dc2c 100644
16 --- a/pmstestsuite/cli.py
17 +++ b/pmstestsuite/cli.py
18 @@ -130,15 +130,23 @@ class PMSTestSuiteCLI(object):
19 for t in self.test_library:
20 try:
21 res = t.check_result(self.pm)
22 - except AssertionError as e:
23 + except AssertionError:
24 res = False
25 + outc = 'F'
26 + except Exception:
27 + res = False
28 + outc = 'E'
29 + # XXX: store exception details somewhere
30 else:
31 + outc = '.'
32 # forward compat
33 if res is None:
34 res = True
35 if not res:
36 self.failed.append(t)
37 t.clean(self.pm)
38 + print(outc, end='')
39 + print('')
40
41 if self.pm.has_pending_actions:
42 print('-> Unmerging test ebuilds...')