зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
1d15d5f080
Коммит
aaf07f7ad5
|
@ -45,8 +45,8 @@ before_script:
|
||||||
- "requests=; for req in ${RUBYSPEC_PULL_REQUEST//,/ }; do
|
- "requests=; for req in ${RUBYSPEC_PULL_REQUEST//,/ }; do
|
||||||
requests=\"$requests +refs/pull/$req/merge:\";
|
requests=\"$requests +refs/pull/$req/merge:\";
|
||||||
done"
|
done"
|
||||||
- "${requests:+git -C spec/rubyspec -c user.email=none -c user.name=none pull --no-edit origin $requests}"
|
- "${requests:+git -C spec/ruby -c user.email=none -c user.name=none pull --no-edit origin $requests}"
|
||||||
- "${requests:+git -C spec/rubyspec log --oneline origin/master..@}"
|
- "${requests:+git -C spec/ruby log --oneline origin/master..@}"
|
||||||
- "rm config.status Makefile rbconfig.rb .rbconfig.time"
|
- "rm config.status Makefile rbconfig.rb .rbconfig.time"
|
||||||
- "mkdir build config_1st config_2nd"
|
- "mkdir build config_1st config_2nd"
|
||||||
- "chmod -R a-w ."
|
- "chmod -R a-w ."
|
||||||
|
@ -62,7 +62,7 @@ before_script:
|
||||||
script:
|
script:
|
||||||
- "make -s test TESTOPTS=--color=never"
|
- "make -s test TESTOPTS=--color=never"
|
||||||
- "make -s $JOBS test-all -o exts TESTOPTS='-q --color=never --job-status=normal'"
|
- "make -s $JOBS test-all -o exts TESTOPTS='-q --color=never --job-status=normal'"
|
||||||
- "make -s $JOBS test-rubyspec MSPECOPT=-j"
|
- "make -s $JOBS test-spec MSPECOPT=-j"
|
||||||
|
|
||||||
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
|
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
|
||||||
branches:
|
branches:
|
||||||
|
|
2
LEGAL
2
LEGAL
|
@ -658,7 +658,7 @@ lib/rdoc/generator/template/darkfish/css/fonts.css:
|
||||||
http://scripts.sil.org/OFL
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
spec/mspec:
|
spec/mspec:
|
||||||
spec/rubyspec:
|
spec/ruby:
|
||||||
|
|
||||||
Copyright (c) 2008 Engine Yard, Inc. All rights reserved.
|
Copyright (c) 2008 Engine Yard, Inc. All rights reserved.
|
||||||
|
|
||||||
|
|
|
@ -627,7 +627,7 @@ clean-platform:
|
||||||
$(Q) $(RM) $(PLATFORM_D)
|
$(Q) $(RM) $(PLATFORM_D)
|
||||||
-$(Q) $(RMDIR) $(PLATFORM_DIR) 2> $(NULL) || exit 0
|
-$(Q) $(RMDIR) $(PLATFORM_DIR) 2> $(NULL) || exit 0
|
||||||
|
|
||||||
RUBYSPEC_CAPIEXT = spec/rubyspec/optional/capi/ext
|
RUBYSPEC_CAPIEXT = spec/ruby/optional/capi/ext
|
||||||
clean-spec: PHONY
|
clean-spec: PHONY
|
||||||
-$(Q) $(RM) $(RUBYSPEC_CAPIEXT)/*.$(OBJEXT) $(RUBYSPEC_CAPIEXT)/*.$(DLEXT)
|
-$(Q) $(RM) $(RUBYSPEC_CAPIEXT)/*.$(OBJEXT) $(RUBYSPEC_CAPIEXT)/*.$(DLEXT)
|
||||||
-$(Q) $(RMDIRS) $(RUBYSPEC_CAPIEXT) 2> $(NULL) || exit 0
|
-$(Q) $(RMDIRS) $(RUBYSPEC_CAPIEXT) 2> $(NULL) || exit 0
|
||||||
|
|
|
@ -265,7 +265,7 @@ module Net
|
||||||
if options[:port]
|
if options[:port]
|
||||||
connect(host, options[:port] || FTP_PORT)
|
connect(host, options[:port] || FTP_PORT)
|
||||||
else
|
else
|
||||||
# spec/rubyspec/library/net/ftp/initialize_spec.rb depends on
|
# spec/ruby/library/net/ftp/initialize_spec.rb depends on
|
||||||
# the number of arguments passed to connect....
|
# the number of arguments passed to connect....
|
||||||
connect(host)
|
connect(host)
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,16 +9,16 @@ To run rspec for bundler:
|
||||||
make test-bundler
|
make test-bundler
|
||||||
```
|
```
|
||||||
|
|
||||||
# spec/rubyspec
|
# spec/ruby
|
||||||
|
|
||||||
ruby/spec (https://github.com/ruby/spec/) is
|
ruby/spec (https://github.com/ruby/spec/) is
|
||||||
a test suite for the Ruby language.
|
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.
|
with the upstream repository, preserving the commits and history.
|
||||||
The same happens for other implementations such as JRuby and TruffleRuby.
|
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,
|
This is the purpose of the in-tree copy,
|
||||||
to facilitate contributions to ruby/spec for MRI developers.
|
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:
|
To run all specs:
|
||||||
```bash
|
```bash
|
||||||
make test-rubyspec
|
make test-spec
|
||||||
```
|
```
|
||||||
|
|
||||||
Extra arguments can be added via `MSPECOPT`.
|
Extra arguments can be added via `MSPECOPT`.
|
||||||
For instance, to show the help:
|
For instance, to show the help:
|
||||||
```bash
|
```bash
|
||||||
make test-rubyspec MSPECOPT=-h
|
make test-spec MSPECOPT=-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-rubyspec MSPECOPT=-j
|
make test-spec MSPECOPT=-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-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:
|
If ruby trunk is your current `ruby` in `$PATH`, you can also run `mspec` directly:
|
||||||
```bash
|
```bash
|
||||||
# change ruby to trunk
|
# change ruby to trunk
|
||||||
ruby -v # => 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/
|
## 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.
|
a test under test/ is that specs are documenting what they test.
|
||||||
This is extremely valuable when reading these tests, as it
|
This is extremely valuable when reading these tests, as it
|
||||||
helps to quickly understand what specific behavior is tested,
|
helps to quickly understand what specific behavior is tested,
|
||||||
|
@ -87,4 +87,4 @@ describe "The for expression" do
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
For more details, see spec/rubyspec/CONTRIBUTING.md.
|
For more details, see spec/ruby/CONTRIBUTING.md.
|
||||||
|
|
|
@ -4,8 +4,8 @@ if (opt = ENV["RUBYOPT"]) and (opt = opt.dup).sub!(/(?:\A|\s)-w(?=\z|\s)/, '')
|
||||||
ENV["RUBYOPT"] = opt
|
ENV["RUBYOPT"] = opt
|
||||||
end
|
end
|
||||||
require "./rbconfig" unless defined?(RbConfig)
|
require "./rbconfig" unless defined?(RbConfig)
|
||||||
load File.dirname(__FILE__) + '/rubyspec/default.mspec'
|
load File.dirname(__FILE__) + '/ruby/default.mspec'
|
||||||
OBJDIR = File.expand_path("spec/rubyspec/optional/capi/ext")
|
OBJDIR = File.expand_path("spec/ruby/optional/capi/ext")
|
||||||
class MSpecScript
|
class MSpecScript
|
||||||
builddir = Dir.pwd
|
builddir = Dir.pwd
|
||||||
srcdir = ENV['SRCDIR']
|
srcdir = ENV['SRCDIR']
|
||||||
|
@ -19,7 +19,7 @@ class MSpecScript
|
||||||
|
|
||||||
# The default implementation to run the specs.
|
# The default implementation to run the specs.
|
||||||
set :target, File.join(builddir, "miniruby#{config['exeext']}")
|
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[
|
set :flags, %W[
|
||||||
-I#{srcdir}/lib
|
-I#{srcdir}/lib
|
||||||
#{srcdir}/tool/runruby.rb --archdir=#{Dir.pwd} --extout=#{config['EXTOUT']}
|
#{srcdir}/tool/runruby.rb --archdir=#{Dir.pwd} --extout=#{config['EXTOUT']}
|
||||||
|
|
|
@ -10,9 +10,9 @@ rm -rf spec/mspec/.git
|
||||||
git add spec/mspec
|
git add spec/mspec
|
||||||
git commit -m "Update to ruby/mspec@${commit}"
|
git commit -m "Update to ruby/mspec@${commit}"
|
||||||
|
|
||||||
rm -rf spec/rubyspec
|
rm -rf spec/ruby
|
||||||
git clone --depth 1 https://github.com/ruby/spec.git spec/rubyspec
|
git clone --depth 1 https://github.com/ruby/spec.git spec/ruby
|
||||||
commit=$(git -C spec/rubyspec log -n 1 --format='%h')
|
commit=$(git -C spec/ruby log -n 1 --format='%h')
|
||||||
rm -rf spec/rubyspec/.git
|
rm -rf spec/ruby/.git
|
||||||
git add spec/rubyspec
|
git add spec/ruby
|
||||||
git commit -m "Update to ruby/spec@${commit}"
|
git commit -m "Update to ruby/spec@${commit}"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче