Skip to content

Conversation

@cjwaldeck
Copy link
Contributor

Currently the user has to specify a list of test cases to run in the
test module. In some scenarios it would be benefitial to run all
test cases, e.g. when debugging testcases in an environment where
gdbserver is not available.

Add option "--run-all" to enable this.

For this to work properly we first have to remove the implicit relationship between the
"parsed_args->num_tests" and the check for lack of arguments for "--run". Do this
by utilizing the built in counter state->arg_num in argp.

Instead of relying on num_tests which implicitly hold the same count
as the number of extra arguments, use the built in counter in argp
which counts just that. It will increment for each ARGP_KEY_ARG.
@cjwaldeck
Copy link
Contributor Author

Changed to a much simpler solution after discussion. Let "--run" take no indices to run all test cases.

Instead of throwing a "not enough arguments" error, run all the test
cases if no indexes are supplied when using --run. This way it simpler
to e.g. attach a debugger to a specific binary without using testrunner.

Usable in environments where gdb-server is not available.
@cjwaldeck cjwaldeck force-pushed the cw_run_all branch 4 times, most recently from 02aebb3 to 9afb6b5 Compare April 14, 2023 09:37
Thus user may run "-dr" to do a debug run where all test cases are run
and output is not redirected, but visible to user. Add a no-redirect
name "<INLINE>" to display when output is not redirected to file.
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.

1 participant