diff options
Diffstat (limited to 'doc/contributing/testing_ruby.md')
-rw-r--r-- | doc/contributing/testing_ruby.md | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/doc/contributing/testing_ruby.md b/doc/contributing/testing_ruby.md index dd46ba5dbc..dfb7fb3a65 100644 --- a/doc/contributing/testing_ruby.md +++ b/doc/contributing/testing_ruby.md @@ -20,6 +20,13 @@ We can run any of the make scripts [in parallel](building_ruby.md#label-Running+ make btest OPTS=-v ``` + To run individual bootstrap tests, we can either specify a list of filenames or use the `--sets` flag in the variable `BTESTS`: + + ``` + make btest BTESTS="bootstraptest/test_fork.rb bootstraptest/tes_gc.rb" + make btest BTESTS="--sets=fork,gc" + ``` + If we want to run the bootstrap test suite on Ruby (not Miniruby), we can use: ``` @@ -63,7 +70,7 @@ We can run any of the make scripts [in parallel](building_ruby.md#label-Running+ first the file name, and then the test name, prefixed with `--name`. For example: ``` - make test-all TESTS="../test/ruby/test_alias.rb --name=/test_alias_with_zsuper_method/" + make test-all TESTS="../test/ruby/test_alias.rb --name=TestAlias#test_alias_with_zsuper_method" ``` To run these specs with logs, we can use: @@ -72,7 +79,13 @@ We can run any of the make scripts [in parallel](building_ruby.md#label-Running+ make test-all TESTS=-v ``` - If we would like to run both the `test/` and `bootstraptest/` test suites, we can run + We can display the help of the `TESTS` option: + + ``` + make test-all TESTS=--help + ``` + + If we would like to run the `test/`, `bootstraptest/` and `spec/` test suites (the `spec/` is explained in a later section), we can run ``` make check @@ -86,28 +99,28 @@ We can run any of the make scripts [in parallel](building_ruby.md#label-Running+ 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: ``` - 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: ``` - make test-spec MSPECOPT=-Vfs + make test-spec SPECOPTS=-Vfs ``` To run a ruby-spec file or directory with GNU make, we can use @@ -127,5 +140,17 @@ We can run any of the make scripts [in parallel](building_ruby.md#label-Running+ To run a specific bundler spec file, we can use `BUNDLER_SPECS` as follows: ``` - $ make test-bundler BUNDLER_SPECS=commands/exec_spec.rb + make test-bundler BUNDLER_SPECS=commands/exec_spec.rb ``` + +## Troubleshooting + +### Running test suites on s390x CPU Architecture + +If we see failing tests related to the zlib library on s390x CPU architecture, we can run the test suites with `DFLTCC=0` to pass: + +``` +DFLTCC=0 make check +``` + +The failures can happen with the zlib library applying the patch [madler/zlib#410](https://github.com/madler/zlib/pull/410) to enable the deflate algorithm producing a different compressed byte stream. We manage this issue at [[ruby-core:114942][Bug #19909]](https://bugs.ruby-lang.org/issues/19909). |