aboutsummaryrefslogtreecommitdiffstats
path: root/test/discover_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/discover_tests.py')
-rwxr-xr-xtest/discover_tests.py28
1 files changed, 7 insertions, 21 deletions
diff --git a/test/discover_tests.py b/test/discover_tests.py
index 1e581a57b6f..dbf23eff12f 100755
--- a/test/discover_tests.py
+++ b/test/discover_tests.py
@@ -4,17 +4,14 @@ import sys
import os
import unittest
import importlib
-import argparse
-def discover_tests(directory, callback, ignore_path):
+def discover_tests(directory, callback):
do_insert = True
for _f in os.listdir(directory):
f = "%s/%s" % (directory, _f)
if os.path.isdir(f):
- if ignore_path is not None and f.startswith(ignore_path):
- continue
- discover_tests(f, callback, ignore_path)
+ discover_tests(f, callback)
continue
if not os.path.isfile(f):
continue
@@ -30,7 +27,11 @@ def discover_tests(directory, callback, ignore_path):
continue
if not issubclass(cls, unittest.TestCase):
continue
- if name == "VppTestCase" or name.startswith("Template"):
+ if (
+ name == "VppTestCase"
+ or name == "VppAsfTestCase"
+ or name.startswith("Template")
+ ):
continue
for method in dir(cls):
if not callable(getattr(cls, method)):
@@ -41,18 +42,3 @@ def discover_tests(directory, callback, ignore_path):
def print_callback(file_name, cls, method):
print("%s.%s.%s" % (file_name, cls.__name__, method))
-
-
-if __name__ == '__main__':
- parser = argparse.ArgumentParser(description="Discover VPP unit tests")
- parser.add_argument("-d", "--dir", action='append', type=str,
- help="directory containing test files "
- "(may be specified multiple times)")
- args = parser.parse_args()
- if args.dir is None:
- args.dir = "."
-
- ignore_path = os.getenv("VENV_PATH", "")
- suite = unittest.TestSuite()
- for d in args.dir:
- discover_tests(d, print_callback, ignore_path)