diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:19:54 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:19:54 +0000 |
commit | aaf07f7ad5fa892911b2f5a5390cdfdb865d74d9 (patch) | |
tree | a663e4c4a4b32c493319e79a5bd4d2bbfa3979ff /spec | |
parent | 1d15d5f08032acf1b7bceacbb450d617ff6e0931 (diff) | |
download | ruby-aaf07f7ad5fa892911b2f5a5390cdfdb865d74d9.tar.gz |
Adapt tools to follow spec/rubyspec => spec/ruby rename
* [Misc #13792] [ruby-core:82287]
* Prefer test-spec over test-rubyspec in spec/README.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/README.md | 20 | ||||
-rw-r--r-- | spec/default.mspec | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/spec/README.md b/spec/README.md index a17a93f8cc..830279afc8 100644 --- a/spec/README.md +++ b/spec/README.md @@ -9,16 +9,16 @@ To run rspec for bundler: make test-bundler ``` -# spec/rubyspec +# spec/ruby ruby/spec (https://github.com/ruby/spec/) is a test suite for the Ruby language. -Once a month, @eregon merges the in-tree copy under spec/rubyspec +Once a month, @eregon merges the in-tree copy under spec/ruby with the upstream repository, preserving the commits and history. The same happens for other implementations such as JRuby and TruffleRuby. -Feel welcome to modify the in-tree spec/rubyspec. +Feel welcome to modify the in-tree spec/ruby. This is the purpose of the in-tree copy, to facilitate contributions to ruby/spec for MRI developers. @@ -34,36 +34,36 @@ Currently, the only module which is MRI-specific is `RubyVM`. To run all specs: ```bash -make test-rubyspec +make test-spec ``` Extra arguments can be added via `MSPECOPT`. For instance, to show the help: ```bash -make test-rubyspec MSPECOPT=-h +make test-spec MSPECOPT=-h ``` You can also run the specs in parallel, which is currently experimental. It takes around 10s instead of 60s on a quad-core laptop. ```bash -make test-rubyspec MSPECOPT=-j +make test-spec MSPECOPT=-j ``` To run a specific test, add its path to the command: ```bash -make test-rubyspec MSPECOPT=spec/rubyspec/language/for_spec.rb +make test-spec MSPECOPT=spec/ruby/language/for_spec.rb ``` If ruby trunk is your current `ruby` in `$PATH`, you can also run `mspec` directly: ```bash # change ruby to trunk ruby -v # => trunk -spec/mspec/bin/mspec spec/rubyspec/language/for_spec.rb +spec/mspec/bin/mspec spec/ruby/language/for_spec.rb ``` ## ruby/spec and test/ -The main difference between a "spec" under spec/rubyspec and +The main difference between a "spec" under spec/ruby and a test under test/ is that specs are documenting what they test. This is extremely valuable when reading these tests, as it helps to quickly understand what specific behavior is tested, @@ -87,4 +87,4 @@ describe "The for expression" do end ``` -For more details, see spec/rubyspec/CONTRIBUTING.md. +For more details, see spec/ruby/CONTRIBUTING.md. diff --git a/spec/default.mspec b/spec/default.mspec index 25b80536be..8791058f95 100644 --- a/spec/default.mspec +++ b/spec/default.mspec @@ -4,8 +4,8 @@ if (opt = ENV["RUBYOPT"]) and (opt = opt.dup).sub!(/(?:\A|\s)-w(?=\z|\s)/, '') ENV["RUBYOPT"] = opt end require "./rbconfig" unless defined?(RbConfig) -load File.dirname(__FILE__) + '/rubyspec/default.mspec' -OBJDIR = File.expand_path("spec/rubyspec/optional/capi/ext") +load File.dirname(__FILE__) + '/ruby/default.mspec' +OBJDIR = File.expand_path("spec/ruby/optional/capi/ext") class MSpecScript builddir = Dir.pwd srcdir = ENV['SRCDIR'] @@ -19,7 +19,7 @@ class MSpecScript # The default implementation to run the specs. set :target, File.join(builddir, "miniruby#{config['exeext']}") - set :prefix, File.expand_path('rubyspec', File.dirname(__FILE__)) + set :prefix, File.expand_path('ruby', File.dirname(__FILE__)) set :flags, %W[ -I#{srcdir}/lib #{srcdir}/tool/runruby.rb --archdir=#{Dir.pwd} --extout=#{config['EXTOUT']} |