summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-22 23:30:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-22 23:33:46 +0100
commit5196bfa9639eed2b1e6452f45775551203f8eeb4 (patch)
treeb0280860da997179c0e110b084cc3d440a010e36 /bin
parent5c4179f58a4e04f1c354df5f17d1860eb403f0ac (diff)
downloadbitbake-5196bfa9639eed2b1e6452f45775551203f8eeb4.zip
bitbake-selftest: Add -v option for verbosity
Also document BB_SKIP_NETTESTS=yes parameter in --help output. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake-selftest15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/bitbake-selftest b/bin/bitbake-selftest
index 8db6197d..462eb1b2 100755
--- a/bin/bitbake-selftest
+++ b/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)