📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 05:03:29
📂
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
contributing
📍 /opt/alt/ruby33/share/ri/system/contributing
🔄 Refresh
✏️
Editing: page-testing_ruby_md.ri
Read Only
U:RDoc::TopLevel[ i I"!contributing/testing_ruby.md:ETcRDoc::Parser::Markdowno:RDoc::Markup::Document:@parts[S:RDoc::Markup::Heading: leveli: textI"Testing Ruby;TS; ; i;I"Test suites;To:RDoc::Markup::Paragraph;[I"8There are several test suites in the Ruby codebase:;To;;[I"{We can run any of the make scripts {in parallel}[building_ruby.md#label-Running+make+scripts+in+parallel] to speed them up.;To:RDoc::Markup::List: @type:NUMBER:@items[ o:RDoc::Markup::ListItem:@label0;[o;;[I"M{bootstraptest/}[https://github.com/ruby/ruby/tree/master/bootstraptest];To;;[I"�This is a small test suite that runs on Miniruby (see {building Ruby}[building_ruby.md#label-Miniruby+vs+Ruby]). We can run it with:;Fo:RDoc::Markup::Verbatim;[I"make btest ;F:@format0o;;[I"%To run it with logs, we can use:;Fo;;[I"make btest OPTS=-v ;F;0o;;[I"�To run individual bootstrap tests, we can either specify a list of filenames or use the <code>--sets</code> flag in the variable <code>BTESTS</code>:;Fo;;[I"omake btest BTESTS="bootstraptest/test_fork.rb bootstraptest/tes_gc.rb" make btest BTESTS="--sets=fork,gc" ;F;0o;;[I"SIf we want to run the bootstrap test suite on Ruby (not Miniruby), we can use:;Fo;;[I"make test ;F;0o;;[I"%To run it with logs, we can use:;Fo;;[I"make test OPTS=-v ;F;0o;;[I":To run a file or directory with GNU make, we can use:;Fo;;[I"Tmake test/ruby/test_foo.rb make test/ruby/test_foo.rb TESTOPTS="-n /test_bar/" ;F;0o;;0;[o;;[I";{test/}[https://github.com/ruby/ruby/tree/master/test];To;;[I"SThis is a more comprehensive test suite that runs on Ruby. We can run it with:;Fo;;[I"make test-all ;F;0o;;[I"iWe can run a specific test directory in this suite using the <code>TESTS</code> option, for example:;Fo;;[I"'make test-all TESTS=test/rubygems ;F;0o;;[I"lWe can run a specific test file in this suite by also using the <code>TESTS</code> option, for example:;Fo;;[I"1make test-all TESTS=test/ruby/test_array.rb ;F;0o;;[I"�We can run a specific test in this suite using the <code>TESTS</code> option, specifying first the file name, and then the test name, prefixed with <code>--name</code>. For example:;Fo;;[I"emake test-all TESTS="../test/ruby/test_alias.rb --name=TestAlias#test_alias_with_zsuper_method" ;F;0o;;[I".To run these specs with logs, we can use:;Fo;;[I"make test-all TESTS=-v ;F;0o;;[I">We can display the help of the <code>TESTS</code> option:;Fo;;[I" make test-all TESTS=--help ;F;0o;;[I"�If we would like to run the <code>test/</code>, <code>bootstraptest/</code> and <code>spec/</code> test suites (the <code>spec/</code> is explained in a later section), we can run;Fo;;[I"make check ;F;0o;;0;[o;;[I"D{spec/ruby}[https://github.com/ruby/ruby/tree/master/spec/ruby];To;;[I"�This is a test suite that exists in {the Ruby spec repository}[https://github.com/ruby/spec] and is mirrored into the <code>spec/ruby</code> directory in the Ruby repository. It tests the behavior of the Ruby programming language. We can run this using:;Fo;;[I"make test-spec ;F;0o;;[I"\To run a specific directory, we can use <code>SPECOPTS</code> to specify the directory:;Fo;;[I"2make test-spec SPECOPTS=spec/ruby/core/array ;F;0o;;[I"WTo run a specific file, we can also use <code>SPECOPTS</code> to specify the file:;Fo;;[I">make test-spec SPECOPTS=spec/ruby/core/array/any_spec.rb ;F;0o;;[I"gTo run a specific test, we can use the <code>--example</code> flag to match against the test name:;Fo;;[I"nmake test-spec SPECOPTS="../spec/ruby/core/array/any_spec.rb --example='is false if the array is empty'" ;F;0o;;[I".To run these specs with logs, we can use:;Fo;;[I""make test-spec SPECOPTS=-Vfs ;F;0o;;[I"CTo run a ruby-spec file or directory with GNU make, we can use;Fo;;[I")make spec/ruby/core/foo/bar_spec.rb ;F;0o;;0;[ o;;[I"J{spec/bundler}[https://github.com/ruby/ruby/tree/master/spec/bundler];To;;[I"�The bundler test suite exists in {the RubyGems repository}[https://github.com/rubygems/rubygems/tree/master/bundler/spec] and is mirrored into the <code>spec/bundler</code> directory in the Ruby repository. We can run this using:;Fo;;[I"make test-bundler ;F;0o;;[I"[To run a specific bundler spec file, we can use <code>BUNDLER_SPECS</code> as follows:;Fo;;[I";make test-bundler BUNDLER_SPECS=commands/exec_spec.rb ;F;0S; ; i;I"Troubleshooting;TS; ; i;I"2Running test suites on s390x CPU Architecture;To;;[I"�If we see failing tests related to the zlib library on s390x CPU architecture, we can run the test suites with <code>DFLTCC=0</code> to pass:;To;;[I"DFLTCC=0 make check ;T;0o;;[I",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].;T: @file@:0@omit_headings_from_table_of_contents_below0
💾 Save Changes
❌ Cancel