daphne-project/daphne

Accept build.sh args in test.sh

开放

#414 创建于 2022年7月19日

 (1 条评论) (0 个反应) (0 位负责人)C++ (84 个派生)auto 404
good first issue

仓库指标

星标
 (80 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南