treewide: Disable automatic argparse argument shortening
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
diff --git a/scripts/footprint/compare_footprint b/scripts/footprint/compare_footprint
index 69403c0..058684b 100755
--- a/scripts/footprint/compare_footprint
+++ b/scripts/footprint/compare_footprint
@@ -70,7 +70,8 @@
def parse_args():
parser = argparse.ArgumentParser(
description="Compare footprint apps RAM and ROM sizes. Note: "
- "To run it you need to set up the same environment as twister.")
+ "To run it you need to set up the same environment as twister.",
+ allow_abbrev=False)
parser.add_argument('-b', '--base-commit', default=None,
help="Commit ID to use as base for footprint "
"compare. Default is parent current commit."
diff --git a/scripts/footprint/fpdiff.py b/scripts/footprint/fpdiff.py
index 6f62fc6..fe9c40b 100755
--- a/scripts/footprint/fpdiff.py
+++ b/scripts/footprint/fpdiff.py
@@ -27,7 +27,7 @@
def parse_args():
parser = argparse.ArgumentParser(
- description="Compare footprint sizes of two builds.")
+ description="Compare footprint sizes of two builds.", allow_abbrev=False)
parser.add_argument("file1", help="First file")
parser.add_argument("file2", help="Second file")
diff --git a/scripts/footprint/size_report b/scripts/footprint/size_report
index 7b4ae7d..4263a2c 100755
--- a/scripts/footprint/size_report
+++ b/scripts/footprint/size_report
@@ -705,7 +705,7 @@
"""
global args
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(allow_abbrev=False)
parser.add_argument("-k", "--kernel", required=True,
help="Zephyr ELF binary")
diff --git a/scripts/footprint/track.py b/scripts/footprint/track.py
index 86e76bb..ace95ce 100755
--- a/scripts/footprint/track.py
+++ b/scripts/footprint/track.py
@@ -12,7 +12,8 @@
def parse_args():
parser = argparse.ArgumentParser(
- description="Generate footprint data based on a predefined plan.")
+ description="Generate footprint data based on a predefined plan.",
+ allow_abbrev=False)
parser.add_argument("-p", "--plan", help="Path of test plan", required=True)
return parser.parse_args()
diff --git a/scripts/footprint/upload_data.py b/scripts/footprint/upload_data.py
index 0084656..b684d4c 100755
--- a/scripts/footprint/upload_data.py
+++ b/scripts/footprint/upload_data.py
@@ -51,7 +51,7 @@
global args
parser = argparse.ArgumentParser(
description=__doc__,
- formatter_class=argparse.RawDescriptionHelpFormatter)
+ formatter_class=argparse.RawDescriptionHelpFormatter, allow_abbrev=False)
parser.add_argument("-d", "--data", help="Data Directory")
parser.add_argument("-y", "--dryrun", action="store_true", help="Dry run, do not upload to database")