From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/
Date: Mon, 10 Oct 2011 02:22:08 +0000 (UTC) [thread overview]
Message-ID: <93b7bbebd96c1cca24a53659657033d621e5c1f4.zmedico@gentoo> (raw)
commit: 93b7bbebd96c1cca24a53659657033d621e5c1f4
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 10 02:21:54 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 02:21:54 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93b7bbeb
tests/__init__: return int from main()
---
pym/portage/tests/__init__.py | 13 ++++++++-----
pym/portage/tests/runTests | 4 +---
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py
index fedb7e6..492ece4 100644
--- a/pym/portage/tests/__init__.py
+++ b/pym/portage/tests/__init__.py
@@ -34,15 +34,18 @@ def main():
testsubdir = os.path.basename(mydir)
for name in getTestNames(mydir):
print("%s/%s/%s.py" % (testdir, testsubdir, name))
- sys.exit(0)
+ return os.EX_OK
if len(args) > 1:
suite.addTests(getTestFromCommandLine(args[1:], basedir))
- return TextTestRunner(verbosity=2).run(suite)
+ else:
+ for mydir in getTestDirs(basedir):
+ suite.addTests(getTests(os.path.join(basedir, mydir), basedir))
- for mydir in getTestDirs(basedir):
- suite.addTests(getTests(os.path.join(basedir, mydir), basedir) )
- return TextTestRunner(verbosity=2).run(suite)
+ result = TextTestRunner(verbosity=2).run(suite)
+ if not result.wasSuccessful():
+ return 1
+ return os.EX_OK
def my_import(name):
mod = __import__(name)
diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests
index 146f7d4..4c10087 100755
--- a/pym/portage/tests/runTests
+++ b/pym/portage/tests/runTests
@@ -41,6 +41,4 @@ del path
if __name__ == "__main__":
- result = tests.main()
- if not result.wasSuccessful():
- sys.exit(1)
+ sys.exit(tests.main())
next reply other threads:[~2011-10-10 2:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 2:22 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-07 0:27 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/ Zac Medico
2014-09-29 22:27 Brian Dolbec
2013-10-21 2:20 Mike Frysinger
2013-10-17 7:31 Mike Frysinger
2013-08-03 1:37 Zac Medico
2013-03-19 8:36 Zac Medico
2013-03-13 4:10 Arfrever Frehtes Taifersar Arahesis
2013-01-31 19:56 Zac Medico
2013-01-03 23:31 Zac Medico
2011-12-16 2:42 Zac Medico
2011-10-10 1:55 Zac Medico
2011-10-09 20:41 Mike Frysinger
2011-10-09 20:41 Mike Frysinger
2011-10-09 20:41 Mike Frysinger
2011-10-08 21:54 Mike Frysinger
2011-08-29 2:59 Zac Medico
2011-08-26 6:13 Zac Medico
2011-08-25 21:54 Zac Medico
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=93b7bbebd96c1cca24a53659657033d621e5c1f4.zmedico@gentoo \
--to=zmedico@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