Passing arguments in xmake test
#6951
Closed
Mick235711
started this conversation in
Ideas
Replies: 2 comments
-
|
不考虑,目前原本每个 tests 都可以单独设置 args ,又不是依赖 set_runargs 和 group xmake/tests/actions/test/xmake.lua Line 11 in 405221a 想要命令行控制,只需要自定义几个 options,然后设置进去就行了 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Sure. The original motivation is that enumerating every single combination of arguments are tedious, but I guess it's still doable anyways. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
xmake testcan only run the test programs without any command-line arguments. The only way to add arguments is by usingset_runargsinxmake.lua. However, this requires setting up a new group/target, which is impractical to do for all the different kinds of possible command-line arguments.One possible use case is to run Catch2 test cases. These programs can accept command-line arguments like
[!benchmark]to run all test cases in thebenchmarkgroup.My envisioned implementation for this is to pass command-like arguments through
--args, e.g.:In addition, these kinds of multi-arg options are also beneficial for other existing arguments. For example,
-gforxmake run/test/install/uninstallcurrently can only run one group of programs. Even though it have glob support, adding multi-arg support enables use cases likexmake run -g 'a*' -g 'b*'to run all programs in groups starting with either a or b, which may be useful.If the maintainers are interested in adding this feature, I can prepare an implementation.
Beta Was this translation helpful? Give feedback.
All reactions