[DOC] Update to use SPECOPTS instead of MSPECOPT

This commit is contained in:
Nobuyoshi Nakada 2023-08-12 12:33:05 +09:00
parent 0eb2108214
commit 6ebde04202
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2023-08-12 05:32:40 +00:00
2 changed files with 10 additions and 10 deletions

View File

@ -99,28 +99,28 @@ We can run any of the make scripts [in parallel](building_ruby.md#label-Running+
make test-spec make test-spec
``` ```
To run a specific directory, we can use `MSPECOPT` to specify the directory: To run a specific directory, we can use `SPECOPTS` to specify the directory:
``` ```
make test-spec MSPECOPT=spec/ruby/core/array make test-spec SPECOPTS=spec/ruby/core/array
``` ```
To run a specific file, we can also use `MSPECOPT` to specify the file: To run a specific file, we can also use `SPECOPTS` to specify the file:
``` ```
make test-spec MSPECOPT=spec/ruby/core/array/any_spec.rb make test-spec SPECOPTS=spec/ruby/core/array/any_spec.rb
``` ```
To run a specific test, we can use the `--example` flag to match against the test name: To run a specific test, we can use the `--example` flag to match against the test name:
``` ```
make test-spec MSPECOPT="../spec/ruby/core/array/any_spec.rb --example='is false if the array is empty'" make test-spec SPECOPTS="../spec/ruby/core/array/any_spec.rb --example='is false if the array is empty'"
``` ```
To run these specs with logs, we can use: To run these specs with logs, we can use:
``` ```
make test-spec MSPECOPT=-Vfs make test-spec SPECOPTS=-Vfs
``` ```
To run a ruby-spec file or directory with GNU make, we can use To run a ruby-spec file or directory with GNU make, we can use

View File

@ -91,24 +91,24 @@ To run all specs:
make test-spec make test-spec
``` ```
Extra arguments can be added via `MSPECOPT`. Extra arguments can be added via `SPECOPTS`.
For instance, to show the help: For instance, to show the help:
```bash ```bash
make test-spec MSPECOPT=-h make test-spec SPECOPTS=-h
``` ```
You can also run the specs in parallel, which is currently experimental. You can also run the specs in parallel, which is currently experimental.
It takes around 10s instead of 60s on a quad-core laptop. It takes around 10s instead of 60s on a quad-core laptop.
```bash ```bash
make test-spec MSPECOPT=-j make test-spec SPECOPTS=-j
``` ```
To run a specific test, add its path to the command: To run a specific test, add its path to the command:
```bash ```bash
make test-spec MSPECOPT=spec/ruby/language/for_spec.rb make test-spec SPECOPTS=spec/ruby/language/for_spec.rb
``` ```
If ruby trunk is your current `ruby` in `$PATH`, you can also run `mspec` directly: If ruby trunk is your current `ruby` in `$PATH`, you can also run `mspec` directly: