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>
This commit is contained in:
Genaro Saucedo Tejada 2016-10-24 18:00:58 -05:00 committed by Anas Nashif
commit 28bba92dc0
3 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,3 @@
--inline-logs
--all
--enable-slow

View file

@ -0,0 +1,3 @@
--inline-logs
--exclude-tag
footprint

View file

@ -150,6 +150,10 @@ Metrics (such as pass/fail state and binary size) for the last code
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 @@ def parse_arguments():
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 "