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

[Infra] support passing arguments to build_custom flow #1217

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

alexhornburg-xlnx
Copy link

This enables passing arguments to custom build scripts. e.g. with a build script called test_args.py containing:

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('filename')           # positional argument
parser.add_argument('-c', '--count')      # option that takes a value
parser.add_argument('-v', '--verbose',
                    action='store_true')  # on/off flag
args = parser.parse_args()
print(f"{args.filename=} | {args.count=} | {args.verbose=}")

Can now pass in arguments via run-docker:

./run-docker.sh build_custom .. test_args abc -c 12 -v
...
args.filename='abc' | args.count='12' | args.verbose=True
The program finished and will be restarted

@auphelia auphelia merged commit dd0655b into Xilinx:dev Oct 24, 2024
2 checks passed
@auphelia
Copy link
Collaborator

Thanks @alexhornburg-xlnx !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants