From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] bitbake-selftest: Add -v option for verbosity
Date: Wed, 22 Jul 2015 23:30:15 +0100 [thread overview]
Message-ID: <1437604215.821.82.camel@linuxfoundation.org> (raw)
Also document BB_SKIP_NETTESTS=yes parameter in --help output.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/bitbake/bin/bitbake-selftest b/bitbake/bin/bitbake-selftest
index 8db6197..462eb1b 100755
--- a/bitbake/bin/bitbake-selftest
+++ b/bitbake/bin/bitbake-selftest
@@ -26,14 +26,19 @@ except RuntimeError as exc:
sys.exit(str(exc))
def usage():
- print('usage: %s [testname1 [testname2]...]' % os.path.basename(sys.argv[0]))
+ print('usage: [BB_SKIP_NETTESTS=yes] %s [-v] [testname1 [testname2]...]' % os.path.basename(sys.argv[0]))
-if len(sys.argv) > 1:
+verbosity = 1
+
+tests = sys.argv[1:]
+if '-v' in sys.argv:
+ tests.remove('-v')
+ verbosity = 2
+
+if tests:
if '--help' in sys.argv[1:]:
usage()
sys.exit(0)
-
- tests = sys.argv[1:]
else:
tests = ["bb.tests.codeparser",
"bb.tests.cow",
@@ -46,5 +51,5 @@ for t in tests:
t = '.'.join(t.split('.')[:3])
__import__(t)
-unittest.main(argv=["bitbake-selftest"] + tests)
+unittest.main(argv=["bitbake-selftest"] + tests, verbosity=verbosity)
reply other threads:[~2015-07-22 22:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1437604215.821.82.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.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