diff options
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-selftest | 30 |
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: | |||
25 | except RuntimeError as exc: | 25 | except RuntimeError as exc: |
26 | sys.exit(str(exc)) | 26 | sys.exit(str(exc)) |
27 | 27 | ||
28 | def usage(): | 28 | tests = ["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", | |
31 | verbosity = 1 | 31 | "bb.tests.fetch", |
32 | 32 | "bb.tests.parse", | |
33 | tests = sys.argv[1:] | 33 | "bb.tests.utils"] |
34 | if '-v' in sys.argv: | ||
35 | tests.remove('-v') | ||
36 | verbosity = 2 | ||
37 | |||
38 | if tests: | ||
39 | if '--help' in sys.argv[1:]: | ||
40 | usage() | ||
41 | sys.exit(0) | ||
42 | else: | ||
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 | ||
50 | for t in tests: | 35 | for t in tests: |
51 | t = '.'.join(t.split('.')[:3]) | 36 | t = '.'.join(t.split('.')[:3]) |
52 | __import__(t) | 37 | __import__(t) |
53 | 38 | ||
54 | unittest.main(argv=["bitbake-selftest"] + tests, verbosity=verbosity) | ||
55 | 39 | ||
40 | if __name__ == '__main__': | ||
41 | unittest.main(defaultTest=tests) | ||