[v2,8/8] dts: add dts executable script

Message ID 20220711145126.295427-9-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series ssh connection to a node |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Juraj Linkeš July 11, 2022, 2:51 p.m. UTC
  The script is an interface to run DTS with standard argument parser.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 dts/main.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100755 dts/main.py
  

Patch

diff --git a/dts/main.py b/dts/main.py
new file mode 100755
index 0000000000..e228604b52
--- /dev/null
+++ b/dts/main.py
@@ -0,0 +1,47 @@ 
+#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2010-2014 Intel Corporation
+# Copyright(c) 2022 PANTHEON.tech s.r.o.
+# Copyright(c) 2022 University of New Hampshire
+#
+
+"""
+A test framework for testing DPDK.
+"""
+
+import argparse
+import logging
+
+from framework import dts
+from framework.settings import DEFAULT_CONFIG_FILE_PATH
+
+
+def main() -> None:
+    # Read cmd-line args
+    parser = argparse.ArgumentParser(description="DPDK test framework.")
+
+    parser.add_argument(
+        "--config-file",
+        default=DEFAULT_CONFIG_FILE_PATH,
+        help="configuration file that describes the test cases, SUTs and targets",
+    )
+
+    parser.add_argument(
+    "-v",
+    "--verbose",
+    action="store_true",
+    help="enable verbose output, all message output on screen",
+)
+
+    args = parser.parse_args()
+
+    dts.run_all(
+        args.config_file,
+        args.verbose,
+    )
+
+
+# Main program begins here
+if __name__ == "__main__":
+    logging.raiseExceptions = True
+    main()