sanity: Load arguments from files
Python module argparse has a feature to load arguments from a file.
This commit enables such feature on sanitycheck script so files
prefixed by + (plus sign) are loaded during argument parsing stage
and included as arguments to such script.
Jira: ZEP-122
Change-Id: Ibb0a6e8464218a4f58ce4044a5a0860dc5b32480
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index beaae8c..2af518f 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -150,6 +150,10 @@
release are stored in scripts/sanity_chk/sanity_last_release.csv.
To update this, pass the --all --release options.
+To load arguments from a file, write '+' before the file name, e.g.,
++file_name. File content must be one or more valid arguments separated by
+line break instead of white spaces.
+
Most everyday users will run with no arguments.
"""
@@ -1607,6 +1611,7 @@
parser = argparse.ArgumentParser(description = __doc__,
formatter_class = argparse.RawDescriptionHelpFormatter)
+ parser.fromfile_prefix_chars = "+"
parser.add_argument("-p", "--platform", action="append",
help="Platform filter for testing. This option may be used multiple "