summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/bitbake-selftest30
1 files changed, 8 insertions, 22 deletions
diff --git a/bitbake/bin/bitbake-selftest b/bitbake/bin/bitbake-selftest
index 1e6f35ef0c..1e615ccf7d 100755
--- a/bitbake/bin/bitbake-selftest
+++ b/bitbake/bin/bitbake-selftest
@@ -25,31 +25,17 @@ try:
25except RuntimeError as exc: 25except RuntimeError as exc:
26 sys.exit(str(exc)) 26 sys.exit(str(exc))
27 27
28def usage(): 28tests = ["bb.tests.codeparser",
29 print('usage: [BB_SKIP_NETTESTS=yes] %s [-v] [testname1 [testname2]...]' % os.path.basename(sys.argv[0])) 29 "bb.tests.cow",
30 30 "bb.tests.data",
31verbosity = 1 31 "bb.tests.fetch",
32 32 "bb.tests.parse",
33tests = sys.argv[1:] 33 "bb.tests.utils"]
34if '-v' in sys.argv:
35 tests.remove('-v')
36 verbosity = 2
37
38if tests:
39 if '--help' in sys.argv[1:]:
40 usage()
41 sys.exit(0)
42else:
43 tests = ["bb.tests.codeparser",
44 "bb.tests.cow",
45 "bb.tests.data",
46 "bb.tests.fetch",
47 "bb.tests.parse",
48 "bb.tests.utils"]
49 34
50for t in tests: 35for t in tests:
51 t = '.'.join(t.split('.')[:3]) 36 t = '.'.join(t.split('.')[:3])
52 __import__(t) 37 __import__(t)
53 38
54unittest.main(argv=["bitbake-selftest"] + tests, verbosity=verbosity)
55 39
40if __name__ == '__main__':
41 unittest.main(defaultTest=tests)