mirror of https://github.com/ARMmbed/mbed-os.git
Added simple filtering switch for -S option. This can be extended in the future to other switches like -r / -R
parent
d28da8ec83
commit
d71e2713dd
|
|
@ -74,7 +74,7 @@ if __name__ == '__main__':
|
|||
default=False,
|
||||
help="Compile the DSP library")
|
||||
|
||||
parser.add_option("-f", "--fat",
|
||||
parser.add_option("-F", "--fat",
|
||||
action="store_true",
|
||||
dest="fat",
|
||||
default=False,
|
||||
|
|
@ -103,6 +103,11 @@ if __name__ == '__main__':
|
|||
default=False,
|
||||
help="Forces 'cppcheck' static code analysis")
|
||||
|
||||
parser.add_option('-f', '--filter',
|
||||
dest='general_filter_regex',
|
||||
default=None,
|
||||
help='For some commands you can use filter to filter out results')
|
||||
|
||||
parser.add_option("-v", "--verbose",
|
||||
action="store_true",
|
||||
dest="verbose",
|
||||
|
|
@ -119,7 +124,7 @@ if __name__ == '__main__':
|
|||
|
||||
# Only prints matrix of supported toolchains
|
||||
if options.supported_toolchains:
|
||||
print mcu_toolchain_matrix()
|
||||
print mcu_toolchain_matrix(platform_filter=options.general_filter_regex)
|
||||
exit(0)
|
||||
|
||||
# Get target list
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
"""
|
||||
|
||||
import tempfile
|
||||
import re
|
||||
from os.path import join, exists, basename
|
||||
from shutil import rmtree
|
||||
from types import ListType
|
||||
|
|
@ -242,7 +243,7 @@ def get_unique_supported_toolchains():
|
|||
return unique_supported_toolchains
|
||||
|
||||
|
||||
def mcu_toolchain_matrix(verbose_html=False):
|
||||
def mcu_toolchain_matrix(verbose_html=False, platform_filter=None):
|
||||
""" Shows target map using prettytable """
|
||||
unique_supported_toolchains = get_unique_supported_toolchains()
|
||||
from prettytable import PrettyTable # Only use it in this function so building works without extra modules
|
||||
|
|
@ -257,6 +258,11 @@ def mcu_toolchain_matrix(verbose_html=False):
|
|||
|
||||
perm_counter = 0
|
||||
for target in sorted(TARGET_NAMES):
|
||||
if platform_filter is not None:
|
||||
# FIlter out platforms using regex
|
||||
if re.search(platform_filter, target) is None:
|
||||
continue
|
||||
|
||||
row = [target] # First column is platform name
|
||||
default_toolchain = TARGET_MAP[target].default_toolchain
|
||||
for unique_toolchain in unique_supported_toolchains:
|
||||
|
|
|
|||
|
|
@ -1052,6 +1052,11 @@ if __name__ == '__main__':
|
|||
default=None,
|
||||
help='Shuffle seed (If you want to reproduce your shuffle order please use seed provided in test summary)')
|
||||
|
||||
parser.add_option('-f', '--filter',
|
||||
dest='general_filter_regex',
|
||||
default=None,
|
||||
help='For some commands you can use filter to filter out results')
|
||||
|
||||
parser.add_option('', '--verbose-skipped',
|
||||
dest='verbose_skipped_tests',
|
||||
default=False,
|
||||
|
|
@ -1088,7 +1093,7 @@ if __name__ == '__main__':
|
|||
|
||||
# Only prints matrix of supported toolchains
|
||||
if opts.supported_toolchains:
|
||||
mcu_toolchain_matrix()
|
||||
print mcu_toolchain_matrix(platform_filter=opts.general_filter_regex)
|
||||
exit(0)
|
||||
|
||||
# Open file with test specification
|
||||
|
|
|
|||
Loading…
Reference in New Issue