Skip to content

Add --list-test-cases and --run-test-case #378

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

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

Totktonada
Copy link
Member

These options allow an external runner (such as test-run) to run the test cases separately: isolated and/or parallel.

The idea is the following.

  • test-run has some criteria, whether to parallelize the given test.
  • If it needs to be parallelized, test-run invokes luatest --list-test-cases <..path to test..>.
  • Then each test case is run in its own process using luatest --run-test-case <..test case..> <..path to test..>.

The --run-test-case option may be simulated using --pattern, but it requires regexp escaping. It is more convenient to have a separate option to pass a verbatim test case name.

The new CLI options are mostly for scripting and not for interactive use. So, no short option are added for them.

@Totktonada
Copy link
Member Author

See tarantool/test-run#433 for a usage example.

These options allow an external runner (such as [test-run][test-run]) to
run the test cases separately: isolated and/or parallel.

The idea is the following.

* test-run has some criteria, whether to parallelize the given test.
* If it needs to be parallelized, test-run invokes `luatest
  --list-test-cases <..path to test..>`.
* Then each test case is run in its own process using `luatest
  --run-test-case <..test case..> <..path to test..>`.

The `--run-test-case` option may be simulated using `--pattern`, but it
requires regexp escaping. It is more convenient to have a separate
option to pass a verbatim test case name.

The new CLI options are mostly for scripting and not for interactive
use. So, no short option are added for them.

[test-run] https://github.com/tarantool/test-run
@Totktonada Totktonada force-pushed the Totktonada/list-and-run-test-case branch from e9d0535 to 1941a18 Compare June 5, 2024 09:04
@ylobankov ylobankov merged commit fcabd2a into master Jun 5, 2024
13 checks passed
@ylobankov ylobankov deleted the Totktonada/list-and-run-test-case branch June 5, 2024 12:00
@Totktonada
Copy link
Member Author

Bump of the submodule in test-run: tarantool/test-run#436.

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.

3 participants