tests: make tests less make dependent

Implement command line argument parsing instead of passing arguments via
environment variables. Add script for running tests without having to
invoke make. Deprecate running tests via make.

Type: improvement
Change-Id: I2e3054a61a2ae25d460e9be00be7d7705fbf943e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
This commit is contained in:
Klement Sekera
2021-05-31 16:08:53 +02:00
committed by Andrew Yourtchenko
parent 8ccc6b3507
commit b23ffd7ef2
48 changed files with 805 additions and 516 deletions

View File

@ -41,18 +41,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)