mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #122 from bridadan/test-script-macros
Adding macro option to test.py script
commit
c71e81b371
|
@ -37,6 +37,11 @@ if __name__ == '__main__':
|
||||||
# Parse Options
|
# Parse Options
|
||||||
parser = get_default_options_parser()
|
parser = get_default_options_parser()
|
||||||
|
|
||||||
|
parser.add_option("-D", "",
|
||||||
|
action="append",
|
||||||
|
dest="macros",
|
||||||
|
help="Add a macro definition")
|
||||||
|
|
||||||
parser.add_option("-j", "--jobs",
|
parser.add_option("-j", "--jobs",
|
||||||
type="int",
|
type="int",
|
||||||
dest="jobs",
|
dest="jobs",
|
||||||
|
@ -133,6 +138,7 @@ if __name__ == '__main__':
|
||||||
report=build_report,
|
report=build_report,
|
||||||
properties=build_properties,
|
properties=build_properties,
|
||||||
name="mbed-os",
|
name="mbed-os",
|
||||||
|
macros=options.macros,
|
||||||
archive=False)
|
archive=False)
|
||||||
|
|
||||||
# Build all the tests
|
# Build all the tests
|
||||||
|
@ -141,6 +147,7 @@ if __name__ == '__main__':
|
||||||
clean=options.clean,
|
clean=options.clean,
|
||||||
report=build_report,
|
report=build_report,
|
||||||
properties=build_properties,
|
properties=build_properties,
|
||||||
|
macros=options.macros,
|
||||||
jobs=options.jobs)
|
jobs=options.jobs)
|
||||||
|
|
||||||
# If a path to a test spec is provided, write it to a file
|
# If a path to a test spec is provided, write it to a file
|
||||||
|
|
|
@ -2027,7 +2027,7 @@ def print_tests(tests, format="list"):
|
||||||
|
|
||||||
def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
|
def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
|
||||||
options=None, clean=False, notify=None, verbose=False, jobs=1,
|
options=None, clean=False, notify=None, verbose=False, jobs=1,
|
||||||
silent=False, report=None, properties=None):
|
macros=None, silent=False, report=None, properties=None):
|
||||||
"""Given the data structure from 'find_tests' and the typical build parameters,
|
"""Given the data structure from 'find_tests' and the typical build parameters,
|
||||||
build all the tests and return a test build data structure"""
|
build all the tests and return a test build data structure"""
|
||||||
|
|
||||||
|
@ -2047,6 +2047,7 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
|
||||||
options=options,
|
options=options,
|
||||||
jobs=jobs,
|
jobs=jobs,
|
||||||
clean=clean,
|
clean=clean,
|
||||||
|
macros=macros,
|
||||||
name=test_name,
|
name=test_name,
|
||||||
report=report,
|
report=report,
|
||||||
properties=properties,
|
properties=properties,
|
||||||
|
|
Loading…
Reference in New Issue