From b3ac9a4bdeba6cdd9918c70e65e72bf969866ffc Mon Sep 17 00:00:00 2001 From: Seth Grover Date: Mon, 2 Dec 2024 21:34:10 -0700 Subject: [PATCH] require pcap path --- pyproject.toml | 4 ++-- src/maltest/maltest.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e5c7d09..38ba2bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "malcolm-test" -version = "0.6.0" +version = "0.6.1" authors = [ { name="Seth Grover", email="mero.mero.guero@gmail.com" }, ] @@ -20,7 +20,7 @@ dependencies = [ 'mmguero', 'elasticsearch-dsl==8.16.0', 'elasticsearch==8.16.0', - 'opensearch-py==2.6.0', + 'opensearch-py==2.8.0', 'petname==2.6', 'psutil==6.1.0', 'pytest==8.3.3', diff --git a/src/maltest/maltest.py b/src/maltest/maltest.py index b3abb40..84e1911 100755 --- a/src/maltest/maltest.py +++ b/src/maltest/maltest.py @@ -295,7 +295,7 @@ def main(): dest='pcapPath', metavar='', type=str, - default=os.getenv('MALCOLM_PCAP_PATH', os.getcwd()), + default=os.getenv('MALCOLM_PCAP_PATH', ''), help=f'Path containing PCAP files used by tests (UPLOAD_ARTIFACTS in tests should resolve relative to this path)', ) testArgGroup.add_argument( @@ -340,6 +340,10 @@ def main(): mmguero.eprint(f'{MALTEST_PROJECT_NAME} v{importlib.metadata.version(MALTEST_PROJECT_NAME)}') return 0 + if not os.path.isdir(args.pcapPath): + logging.error('PCAP path must be specified with -p/--pcap-path or MALCOLM_PCAP_PATH') + return 1 + # the whole thing runs on virter, so if we don't have that what are we even doing here err, _ = mmguero.RunProcess(['virter', 'version']) if err != 0: