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

Accept build.sh args in test.sh #414

Open
pdamme opened this issue Jul 19, 2022 · 1 comment
Open

Accept build.sh args in test.sh #414

pdamme opened this issue Jul 19, 2022 · 1 comment
Labels
good first issue Non-urgent, simple task with limited scope, suitable for getting started as a contributor.

Comments

@pdamme
Copy link
Collaborator

pdamme commented Jul 19, 2022

Our build script build.sh is used to build any target of the DAPHNE system. It has several command line arguments (see ./build.sh -h). Some of those can be used to turn certain features on or off (e.g., --cuda and --arrow).

Our test script test.sh is used to run the test cases. Internally, it first builds the run_tests target (a catch2 application) by invoking build.sh --target run_tests. test.sh accepts arbitrary arguments and passes them on to the executable run_tests. That way, we can use any catch2 arguments to influence the test execution. For instance, we can use that to run only test cases of kernels and print the names of the executed test cases and durations by ./test.sh [kernels] -d yes.

Unfortunately, test.sh does currently not accept any additional arguments to build.sh. Thus, we cannot run test cases requiring, e.g., --cuda or --arrow.

test.sh should be changed to support both arguments to build.sh and arguments to run_tests. However, for maintainability reasons, test.sh should not need to be aware of the concrete arguments supported by build.sh and run_tests. Some ideas:

# Optional argument --buildargs with a single value (quote if multiple are required):
./test.sh --buildargs "--arrow --cuda" [kernels] -d yes   # pass build.sh args
./test.sh [kernels] -d yes                                # don't pass build.sh args

# Always expect one argument for build.sh (quote if multiple are required):
./test.sh "--arrow --cuda" [kernels] -d yes   # pass build.sh args
./test.sh "" [kernels] -d yes                 # don't pass build args

Alternative suggestions are welcome.

@pdamme pdamme added the good first issue Non-urgent, simple task with limited scope, suitable for getting started as a contributor. label Jul 19, 2022
@corepointer
Copy link
Collaborator

This is partially handled by c5a438b. Didn't notice this issue when I added support for --cuda and a few others. The current solution is a quick fix, so this issue remains valid to pass arbitrary args to build.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Non-urgent, simple task with limited scope, suitable for getting started as a contributor.
Projects
None yet
Development

No branches or pull requests

2 participants