CI: add option to filter for boards in generate_board_targets

This commit is contained in:
Konrad 2024-11-03 17:01:14 +01:00 committed by Ramon Roche
parent e666b8ddfd
commit 613a4b682e

View File

@ -25,10 +25,16 @@ parser.add_argument('-p', '--pretty', dest='pretty', action='store_true',
help='Pretty output instead of a single line')
parser.add_argument('-g', '--groups', dest='group', action='store_true',
help='Groups targets')
parser.add_argument('-f', '--filter', dest='filter', help='comma separated list of board names to use instead of all')
args = parser.parse_args()
verbose = args.verbose
board_filter = []
if args.filter:
for board in args.filter.split(','):
board_filter.append(board)
build_configs = []
grouped_targets = {}
excluded_boards = ['modalai_voxl2', 'px4_ros2'] # TODO: fix and enable
@ -141,6 +147,10 @@ for manufacturer in os.scandir(os.path.join(source_dir, '../boards')):
label = files.name[:-9]
target_name = manufacturer.name + '_' + board.name + '_' + label
if board_filter and not board_name in board_filter:
if verbose: print(f'excluding board {board_name} ({target_name})')
continue
if board_name in excluded_boards:
if verbose: print(f'excluding board {board_name} ({target_name})')
continue