Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into profiler
Browse files Browse the repository at this point in the history
enebo committed Jun 28, 2017
2 parents 41fa661 + f2e7b82 commit 9e05a80
Showing 5,455 changed files with 59,676 additions and 341,623 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
37 changes: 21 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
@@ -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
@@ -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*
@@ -59,17 +62,18 @@ 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
@@ -78,17 +82,13 @@ test/pom.xml
test/prawn
test/rails
test/testapp/testapp
test/truffle/*.methods
test/truffle/integration/gem-testing
tool/nailgun/Makefile
tool/nailgun/config.log
tool/nailgun/config.status
tool/nailgun/ng
reference.txt
rubyspec_temp
.polyglot.pom.rb
tool/truffle/jruby_truffle_runner/jruby+truffle_runner-*.gem
test/truffle/cexts/**/Makefile

# binaries
!bin/gem
@@ -118,12 +118,17 @@ nbproject/private
.classpath
.project
.settings
.factorypath
build.eclipse

# Truffle findbugs
truffle-findbugs-report.html
findbugs-noUpdateChecks-3.0.0.tar.gz
findbugs-3.0.0
# mx
/mx.jruby/*pyc
/mx.jruby/env
/mx.jruby/eclipse-launches/
/mxbuild
/mx.imports
/RUBY.dist
/RUBY-TEST.dist

# Vagrant
.vagrant
52 changes: 10 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -7,14 +7,18 @@ 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
- export MAVEN_OPTS="-Xmx512M $MAVEN_OPTS"
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export MAVEN_OPTS="-XX:MaxPermSize=120M"; else export MAVEN_OPTS="-XX:CompressedClassSpaceSize=96M -XX:MaxMetaspaceSize=120M"; fi
- export MAVEN_OPTS="-Xmn52M -Xmx504M $MAVEN_OPTS"
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=96M"; else export JAVA_OPTS="$JAVA_OPTS -XX:CompressedClassSpaceSize=72M -XX:MaxMetaspaceSize=96M"; fi

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
@@ -25,13 +29,14 @@ os:

env:
global:
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmn48M -Xmx512M"
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmn36M -Xmx768M -XX:InitialCodeCacheSize=40M -XX:ReservedCodeCacheSize=120M -Djava.security.egd=file:/dev/./urandom"
- MALLOC_ARENA_MAX=2
matrix:
- PHASE='-Ptest'
- PHASE='-Prake -Dtask=test:jruby'
- PHASE='-Prake -Dtask=test:jruby:fullint'
- PHASE='-Prake -Dtask=test:jruby:jit'
- PHASE='-Prake -Dtask=test:jruby:aot'
- PHASE='-Prake -Dtask=test:mri'
- PHASE='-Prake -Dtask=test:mri:fullint'
- PHASE='-Prake -Dtask=test:mri:jit'
@@ -71,42 +76,9 @@ matrix:
jdk: oraclejdk8
- 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'
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
@@ -127,10 +99,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
85 changes: 41 additions & 44 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ command to execute is:
This will run the default "install" goal (```mvn install```) and will do all of the following:

* Compile JRuby
* Compile JRuby-Truffle and place it in `lib/jruby-truffle.jar`
* Build `lib/jruby.jar`, needed for running at command line
* It will install the default gems specifications `lib/ruby/gems/shared/specifications/default/` and the ruby files of those gems in `lib/ruby/stdlib/`.

@@ -98,69 +97,77 @@ jar files by

```
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

```
@@ -169,21 +176,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

Loading

0 comments on commit 9e05a80

Please sign in to comment.