Separate command line parser by function
@@ -262,7 +262,11 @@ def iss_cmp(test_list, iss, output_dir, isa, verbose):
run_cmd(("echo %s >> %s" % (summary, report)))
print("ISS regression report is saved to %s" % report)
+def setup_parser():
+ """Create a command line parser.
+ Returns: The created parser.
+ """
# Parse input arguments
parser = argparse.ArgumentParser()
@@ -312,6 +316,9 @@ parser.set_defaults(co=False)
parser.set_defaults(so=False)
parser.set_defaults(verbose=False)
+ return parser
+
+parser = setup_parser()
args = parser.parse_args()
cwd = os.path.dirname(os.path.realpath(__file__))
