Clone of official tools
Diff: test.py
- Revision:
- 40:7d3fa6b99b2b
- Parent:
- 38:399953da035d
- Child:
- 41:2a77626a4c21
diff -r c98cb013e99f -r 7d3fa6b99b2b test.py --- a/test.py Wed Jul 19 16:44:30 2017 -0500 +++ b/test.py Tue Oct 10 16:56:30 2017 -0500 @@ -44,12 +44,12 @@ try: # Parse Options parser = get_default_options_parser(add_app_config=True) - + parser.add_argument("-D", action="append", dest="macros", help="Add a macro definition") - + parser.add_argument("-j", "--jobs", type=int, dest="jobs", @@ -76,30 +76,36 @@ parser.add_argument("-f", "--format", dest="format", type=argparse_lowercase_type(format_choices, "format"), default=format_default_choice, help=format_help) - + parser.add_argument("--continue-on-build-fail", action="store_true", dest="continue_on_build_fail", default=None, help="Continue trying to build all tests if a build failure occurs") #TODO validate the names instead of just passing through str parser.add_argument("-n", "--names", dest="names", type=argparse_many(str), default=None, help="Limit the tests to a comma separated list of names") - + parser.add_argument("--test-spec", dest="test_spec", default=None, help="Destination path for a test spec file that can be used by the Greentea automated test tool") - + parser.add_argument("--build-report-junit", dest="build_report_junit", default=None, help="Destination path for a build report in the JUnit xml format") parser.add_argument("--build-data", dest="build_data", default=None, help="Dump build_data to this file") - + parser.add_argument("-v", "--verbose", action="store_true", dest="verbose", default=False, help="Verbose diagnostic output") + parser.add_argument("--stats-depth", + type=int, + dest="stats_depth", + default=2, + help="Depth level for static memory report") + options = parser.parse_args() # Filter tests by path if specified @@ -129,7 +135,7 @@ # Find all tests in the relevant paths for path in all_paths: - all_tests.update(find_tests(path, mcu, toolchain, + all_tests.update(find_tests(path, mcu, toolchain, app_config=options.app_config)) # Filter tests by name if specified @@ -172,7 +178,7 @@ # Default base source path is the current directory if not base_source_paths: base_source_paths = ['.'] - + build_report = {} build_properties = {} @@ -214,8 +220,9 @@ notify=notify, jobs=options.jobs, continue_on_build_fail=options.continue_on_build_fail, - app_config=options.app_config, - build_profile=profile) + app_config=options.app_config, + build_profile=profile, + stats_depth=options.stats_depth) # If a path to a test spec is provided, write it to a file if options.test_spec: