summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-28 02:43:29 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-02 14:30:41 +0000
commit3f8a8f7736c6a6ef41c0a1572488acbafdbc35e2 (patch)
tree50873489e90941699623c5d0a4b8a95ed1abaf49
parent0436e42472a48a91cc6f743b3bca3f09a2ffd490 (diff)
vty tests: allow picking specific tests to run by name
-rw-r--r--openbsc/tests/vty_test_runner.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 5836cd4..0678ec3 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -1340,6 +1340,7 @@ if __name__ == '__main__':
help="searchpath for config")
parser.add_argument("-w", "--workdir", dest="w",
help="Working directory")
+ parser.add_argument("test_name", nargs="*", help="(parts of) test names to run, case-insensitive")
args = parser.parse_args()
verbose_level = 1
@@ -1362,6 +1363,10 @@ if __name__ == '__main__':
add_nat_test(suite, workdir)
add_gbproxy_test(suite, workdir)
add_sgsn_test(suite, workdir)
+
+ if args.test_name:
+ osmoutil.pick_tests(suite, *args.test_name)
+
res = unittest.TextTestRunner(verbosity=verbose_level, stream=sys.stdout).run(suite)
sys.exit(len(res.errors) + len(res.failures))