Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Dec 14, 2016
2 parents 34d8ce9 + 48f1ac2 commit c3017e2
Show file tree
Hide file tree
Showing 3,360 changed files with 313,697 additions and 52,345 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 22 additions & 8 deletions .gitignore
Expand Up @@ -16,6 +16,14 @@
*.tokens
*.su
*.ll
*.bc
extconf.h
mkmf.log
Makefile
cext-output.txt
bench-results.json
bench-results-processed.json
failures

.DS_Store
.debug.properties
Expand All @@ -24,9 +32,6 @@
build
build.properties
build_graph.png
mx*/*pyc
mx*/env
mxbuild
core/src/main/java/org/jruby/runtime/Constants.java
dependency-reduced-pom.xml
dev_null
Expand All @@ -46,9 +51,7 @@ lib/jruby*.jar
lib/native
lib/ruby/cext/
lib/ruby/gems
lib/ruby/stdlib/*jopenssl*.jar
lib/ruby/stdlib/bcpkix-jdk15on-*.jar
lib/ruby/stdlib/bcprov-jdk15on-*.jar
lib/ruby/stdlib/*.jar
lib/ruby/stdlib/did_you_mean*
lib/ruby/stdlib/gauntlet_rdoc.rb
lib/ruby/stdlib/jar*
Expand All @@ -59,17 +62,19 @@ lib/ruby/stdlib/net-telnet.rb
lib/ruby/stdlib/net/telnet*
lib/ruby/stdlib/openssl*
lib/ruby/stdlib/org/
lib/ruby/stdlib/readline/*readline*.jar
lib/ruby/stdlib/ripper.jar
lib/ruby/stdlib/rubygems/defaults/jruby_native.rb
lib/ruby/stdlib/racc*
lib/ruby/stdlib/rake*
lib/ruby/stdlib/json*
lib/ruby/stdlib/rdoc*
lib/ruby/stdlib/test*
lib/ruby/stdlib/hoe*
lib/ruby/stdlib/readline*
lib/ruby/stdlib/minitest*
lib/ruby/stdlib/power_assert*
lib/ruby/stdlib/psych*
lib/ruby/stdlib/**/maven-metadata-local.xml
release.properties
share
spaces test
Expand All @@ -87,7 +92,6 @@ tool/nailgun/ng
reference.txt
rubyspec_temp
.polyglot.pom.rb
tool/truffle/jruby_truffle_runner/jruby+truffle_runner-*.gem
test/truffle/cexts/**/Makefile

# binaries
Expand Down Expand Up @@ -118,8 +122,18 @@ nbproject/private
.classpath
.project
.settings
.factorypath
build.eclipse

# mx
/mx.jruby/*pyc
/mx.jruby/env
/mx.jruby/eclipse-launches/
/mxbuild
/mx.imports
/RUBY.dist
/RUBY-TEST.dist

# Truffle findbugs
truffle-findbugs-report.html
findbugs-noUpdateChecks-3.0.0.tar.gz
Expand Down
45 changes: 7 additions & 38 deletions .travis.yml
Expand Up @@ -7,14 +7,17 @@ cache:
- $HOME/.m2

before_install:
- rm ~/.m2/settings.xml
- export MAVEN_SKIP_RC=true
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export MAVEN_OPTS="-XX:MaxPermSize=240M"; else export MAVEN_OPTS="-XX:MaxMetaspaceSize=240M -XX:CompressedClassSpaceSize=240M"; fi
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export MAVEN_OPTS="-XX:MaxPermSize=200M"; else export MAVEN_OPTS="-XX:MaxMetaspaceSize=200M -XX:CompressedClassSpaceSize=200M"; fi
- export MAVEN_OPTS="-Xmx512M $MAVEN_OPTS"

before_script:
- unset GEM_PATH GEM_HOME IRBRC JRUBY_OPTS
- export PATH="`pwd`/bin:$PATH"
- echo $HOME
- echo $JAVA_OPTS
- echo $MAVEN_OPTS

jdk:
- openjdk7
Expand Down Expand Up @@ -72,41 +75,11 @@ matrix:
- env: COMMAND=test/check_versions.sh
jdk: oraclejdk8
# JRuby+Truffle needs Java 8
- env: JT='test specs :command_line'
jdk: oraclejdk8
- env: JT='test specs :language'
jdk: oraclejdk8
- env: JT='test specs :core'
jdk: oraclejdk8
- env: JT='test specs :library'
jdk: oraclejdk8
- env: JT='test specs :truffle'
jdk: oraclejdk8
- env: JT='test integration'
jdk: oraclejdk8
- env:
- COMMAND=test/truffle/gems/install-gems.sh
- JT='test gems'
jdk: oraclejdk8
- env:
- JAVA_OPTS="$JAVA_OPTS -Xmx512m"
- HAS_REDIS=true
- JT='test ecosystem'
jdk: oraclejdk8
- env: JT='test tck'
jdk: oraclejdk8
- env:
- JT=check_ambiguous_arguments
- SKIP_BUILD=true
jdk: oraclejdk8
- env:
- USE_BUILD_PACK=yes
- JT='test fast'
- env: JT='test fast'
jdk: oraclejdk8
allow_failures:
- env: PHASE='-Prake -Dtask=test:mri:fullint'
- env: JT='test mri'
jdk: oraclejdk8
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
# NOTE: build seems to never start (waited for any to finish for more than a day) - probably a travis-ci bug
#- env: PHASE='-Pmain'
# sudo: required
Expand All @@ -127,10 +100,6 @@ notifications:
- "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})"
skip_join: true

# update jruby-head installed on Travis CI
webhooks:
urls:
- "https://rubies.travis-ci.org/rebuild/jruby-head"
# we are on a branch
on_success: always
on_failure: never
Expand Down
83 changes: 41 additions & 42 deletions BUILDING.md
Expand Up @@ -101,66 +101,75 @@ mvn -pl core
mvn -pl truffle
```


### Day to Day Testing

For normal day-to-day testing, we recommend running the Ruby (MRI) tests
For normal day-to-day testing, we recommend running the Ruby specs. We have set aside a
"fast" grouping that takes only a couple minutes to run:

```
jruby -S rake spec:ruby:fast
```

For a more intensive workout, you can also run the Ruby (MRI) tests
via the following rake command:

```
bin/jruby -S rake test:mri
jruby -S rake test:mri
```

This suite takes a while to complete, so if you want to run an individual file
from MRI's tests (under test/mri), use one of the following commands:

# Run a specific test method in a specific file
```
jruby <test file> -n <specific test method>
```
#### Run a specific test from the MRI suite

# Run a test file with known-failing tests excluded
The MRI suite (under `test/mri`) has a runner script in `test/mri/runner.rb` that sets up
an appropriate test environment. Many of the MRI tests will need to be run via this script.
```
EXCLUDES=test/mri/excludes bin/jruby -r test/mri_test_env.rb test/mri/runner.rb -q -- <test file>
```
#### Run a single spec
```
bin/jruby spec/mspec/bin/mspec run spec/ruby/core/symbol/length_spec.rb
jruby -r ./test/mri_test_env.rb test/mri/runner.rb test/mri/<path to test>
```

#### Run a single spec with remote debugging
```
bin/jruby spec/mspec/bin/mspec run -T-J-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 spec/ruby/core/symbol/length_spec.rb
```
You can pass `-v` to the runner for verbose output or `-n test_method_name` to only run a single test method. If you are interested in all failures you can exlude the -r option (of mri_test_env.rb). Some excluded tests are inherent limitations of JRuby and some are just problems we have not gotten to yet.

#### Run a test file with known-failing tests excluded

The runner script provides a mechanism for "excluding" known failing tests. Ruby scripts under `test/mri/exclude`, named based on the name of the test case's class, exclude with comment tests known to fail.

To run a given test with these excludes enabled, you can use the EXCLUDES environment variable:

Additional tests may be run through mspec.
```
bin/jruby -S mspec -B spec/jruby.2.2.mspec -t bin/jruby -G fails ci <test files>
EXCLUDES=test/mri/excludes bin/jruby test/mri/runner.rb <test file>
```

For more complete assurance, you can also run 1.9 RubySpecs via the
following command:
#### Run a single Ruby spec

Individual specs can be run with the mspec tool:

```
jruby spec/mspec/bin/mspec ci
jruby spec/mspec/bin/mspec ci spec/ruby/<path to spec>
```

And if you are making changes that would affect JRuby's core runtime
or embedding APIs, you should run JRuby's Java-based unit tests via
If `ci` is omitted or replaced with `run` you will see any specs known to fail. The `ci` command
avoids running those specs.

#### Run JRuby with with remote debugging

If you are familiar with Java debuggers, you can attach one to a JRuby process using the JDWP agent.
The exact flag may vary with debugger and platform:

```
mvn -Ptest
bin/jruby -T-J-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 <rest of arguments>
```
#### JRuby internal unit tests

On travis the following tests will run
If you are making changes that would affect JRuby's core runtime
or embedding APIs, you should run JRuby's Java-based unit tests via

```
mvn -Ptest
mvn -Prake -Dtask=test:extended
mvn -Prake -Dtask=spec:ci\_interpreted\_travis
mvn -Ptruffle
```

#### Tests for other ways of deploying and packaging JRuby

There are some maven integration tests (i.e. consistency test if all gems are included, osgi test, etc) for the various distributions of JRuby which can be invoked with

```
Expand All @@ -169,21 +178,11 @@ mvn -Pcomplete -Dinvoker.skip=false
mvn -Pdist -Dinvoker.skip=false
```

### Just Like CI

Our [CI](https://travis-ci.org/jruby/jruby) runs the following three commands (in essence):

```
rake test:extended
jruby spec/mspec/bin/mspec ci
jruby --1.8 spec/mspec/bin/mspec ci
```
#### Just Like CI

The complete CI test suite will take anywhere from 20 to 45 minutes to
complete, but provides the most accurate indication of the stability of
your local JRuby source.
JRuby runs CI tests on TravisCI. See [.travis.yml](https://github.com/jruby/jruby/blob/master/.travis.yml).

### maven integration tests - -Pjruby-complete or -Pmain
#### maven integration tests - -Pjruby-complete or -Pmain

maven integration test will use the packed maven artifact to run the tests in a forked maven instance. these maven projects are locatated in

Expand Down
8 changes: 1 addition & 7 deletions COPYING
Expand Up @@ -19,8 +19,6 @@ The Truffle component also distributes:

SnakeYAML (Copyright the SnakeYAML authors, Apache 2.0 licence)

Antlr4 runtime (Copyright (c) 2015 Terence Parr, Sam Harwell, BSD licence)

truffle-api and truffle-debug (Copyright Oracle and/or its affiliates, GPL
v2, with classpath exception)

Expand Down Expand Up @@ -75,7 +73,7 @@ below. Also see LICENSE.RUBY for most files found in lib/ruby/stdlib.
joni (http://github.com/jruby/joni) are distributed
under the MIT license.

ant (http://ant.apache.org/),
maven (http://maven.apache.org/),
jnr-constants (http://github.com/jnr/jnr-constants),
joda-time (http://joda-time.sourceforge.net),
jffi (https://github.com/jnr/jffi),
Expand All @@ -86,10 +84,6 @@ below. Also see LICENSE.RUBY for most files found in lib/ruby/stdlib.
nailgun (http://martiansoftware.com/nailgun) are distributed under the
Apache License version 2.0.

jsr292-mock (http://code.google.com/p/jvm-language-runtime)
distributed under the LGPL license. It is only used as a compile-time mock
for Java 7-only features.

Bouncycastle is released under the MIT license, and is Copyright (c)
2000 - 2006 The Legion Of The Bouncy Castle.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -33,14 +33,14 @@ To run JRuby you will need a JRE (the JVM runtime environment) version 7 or high
Your operating system may provide a JRE and JRuby in a package manager, but you may find that this
version is very old.

An alternative is to use one of the Ruby version managers.
An alternative is to use one of the [Ruby version managers](https://www.ruby-lang.org/en/documentation/installation/#managers).

For [`rbenv`](https://github.com/sstephenson/rbenv) you will need the
[`ruby-build`](https://github.com/sstephenson/ruby-build) plugin. You may find that your system
package manager can provide these. Then you can run:

```
$ rbenv install jruby-9.1.2.0
$ rbenv install jruby-9.1.6.0
```

For [`rvm`](https://rvm.io) you can simply do:
Expand Down
30 changes: 0 additions & 30 deletions Rakefile
Expand Up @@ -15,33 +15,3 @@ begin
/(#{Rake::Backtrace::SUPPRESS_PATTERN})|(^org\/jruby)/
rescue
end

task :default => [:build]

desc "Build JRuby"
task :build do
ant "jar"
end

task :jar => :build

desc "Clean all built output"
task :clean do
delete_files = FileList.new do |fl|
fl.
include("#{BUILD_DIR}/**").
exclude("#{BUILD_DIR}/rubyspec").
include(DIST_DIR).
include(API_DOCS_DIR)
end

delete_files.each {|files| rm_rf files, :verbose => true}
end

desc "Generate sources, compile and add to jar file"
task :gen do
mkdir_p 'build/src_gen'
system 'apt -nocompile -cp lib/jruby.jar:build_lib/asm-4.0.jar:build_lib/asm-util-4.0.jar -factory org.jruby.anno.AnnotationBinder src/org/jruby/*.java'
system 'javac -cp lib/jruby.jar build/src_gen/*.java'
system 'jar -uf lib/jruby.jar -C build/src_gen .'
end
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
9.1.3.0-SNAPSHOT
9.1.7.0-SNAPSHOT

0 comments on commit c3017e2

Please sign in to comment.