Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use argparse instead of click to fix cifuzz.yml #2635

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- '**.h'
jobs:
Fuzzing:
if: false
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
Expand Down
25 changes: 15 additions & 10 deletions tools/get_deps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import click
import argparse
import sys
import subprocess
from pathlib import Path
Expand Down Expand Up @@ -238,28 +238,33 @@ def find_family(board):
return None


@click.command()
@click.argument('family', nargs=-1, required=False)
@click.option('-b', '--board', multiple=True, default=None, help='Boards to fetch')
def main(family, board):
if len(family) == 0 and len(board) == 0:
def main():
parser = argparse.ArgumentParser()
parser.add_argument('families', nargs='*', default=[], help='Families to fetch')
parser.add_argument('-b', '--board', action='append', default=[], help='Boards to fetch')
args = parser.parse_args()

families = args.families
board = args.board

if len(families) == 0 and len(board) == 0:
print("Please specify family or board to fetch")
return

status = 0
deps = list(deps_mandatory.keys())

if 'all' in family:
if 'all' in families:
deps += deps_optional.keys()
else:
family = list(family)
families = list(families)
if board is not None:
for b in board:
f = find_family(b)
if f is not None:
family.append(f)
families.append(f)

for f in family:
for f in families:
for d in deps_optional:
if f in deps_optional[d][2]:
deps.append(d)
Expand Down
Loading