Skip to content

Commit

Permalink
Showing 70 changed files with 40 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -82,9 +82,9 @@ matrix:
jdk: oraclejdk8
- env: JT='test specs :truffle'
jdk: oraclejdk8
- env: JT='test integration fast'
- env: JT='test integration'
jdk: oraclejdk8
- env: JT='test integration long' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
- env: JT='test gems' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
jdk: oraclejdk8
- env: JT=check_ambiguous_arguments SKIP_BUILD=true
jdk: oraclejdk8
@@ -94,7 +94,7 @@ matrix:
jdk: oraclejdk8
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
- env: JT='test integration long' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
- env: JT='test gems' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
# 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
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
set -e

bin/jruby bin/gem install execjs -v 2.6.0
ruby -X+T -Ilib/ruby/gems/shared/gems/execjs-2.6.0/lib test/truffle/integration/execjs/checkruntime.rb
ruby -X+T -Ilib/ruby/gems/shared/gems/execjs-2.6.0/lib test/truffle/integration/execjs/simple.rb
ruby -X+T -Ilib/ruby/gems/shared/gems/execjs-2.6.0/lib test/truffle/integration/execjs/coffeescript.rb
ruby -X+T -Ilib/ruby/gems/shared/gems/execjs-2.6.0/lib test/truffle/gems/execjs/checkruntime.rb
ruby -X+T -Ilib/ruby/gems/shared/gems/execjs-2.6.0/lib test/truffle/gems/execjs/simple.rb
ruby -X+T -Ilib/ruby/gems/shared/gems/execjs-2.6.0/lib test/truffle/gems/execjs/coffeescript.rb
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions test/truffle/gems/gem-testing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

gem install bundler

mkdir -p test/truffle/gems/gem-testing
jruby+truffle --dir test/truffle/gems/gem-testing ci --batch lib/ruby/truffle/jruby+truffle/gem_ci/travis.txt
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@
set -e

bin/jruby bin/gem install rack -v 1.6.1
source test/truffle/integration/common/test_server.sh.inc
ruby -X+T -Ilib/ruby/gems/shared/gems/rack-1.6.1/lib test/truffle/integration/rack-server/rack-server.rb & test_server
source test/truffle/gems/common/test_server.sh.inc
ruby -X+T -Ilib/ruby/gems/shared/gems/rack-1.6.1/lib test/truffle/gems/rack-server/rack-server.rb & test_server
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

set -e

cd test/truffle/integration/rails-app
cd test/truffle/gems/rails-app

JRUBY_BIN=../../../../bin
JRUBY=$JRUBY_BIN/jruby
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@ bin/jruby bin/gem install rack -v 1.6.1
bin/jruby bin/gem install tilt -v 2.0.1
bin/jruby bin/gem install rack-protection -v 1.5.3
bin/jruby bin/gem install sinatra -v 1.4.6
source test/truffle/integration/common/test_server.sh.inc
ruby -X+T -Ilib/ruby/gems/shared/gems/rack-1.6.1/lib -Ilib/ruby/gems/shared/gems/tilt-2.0.1/lib -Ilib/ruby/gems/shared/gems/rack-protection-1.5.3/lib -Ilib/ruby/gems/shared/gems/sinatra-1.4.6/lib test/truffle/integration/sinatra-server/sinatra-server.rb & test_server
source test/truffle/gems/common/test_server.sh.inc
ruby -X+T -Ilib/ruby/gems/shared/gems/rack-1.6.1/lib -Ilib/ruby/gems/shared/gems/tilt-2.0.1/lib -Ilib/ruby/gems/shared/gems/rack-protection-1.5.3/lib -Ilib/ruby/gems/shared/gems/sinatra-1.4.6/lib test/truffle/gems/sinatra-server/sinatra-server.rb & test_server
7 changes: 0 additions & 7 deletions test/truffle/integration/gem-testing.sh

This file was deleted.

40 changes: 23 additions & 17 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -304,8 +304,8 @@ def help
puts 'jt test spec/ruby/language/while_spec.rb run specs in this file'
puts 'jt test compiler run compiler tests (uses the same logic as --graal to find Graal)'
puts ' --no-java-cmd don\'t set JAVACMD - rely on bin/jruby or RUBY_BIN to have Graal already'
puts 'jt test integration [fast|long|all] runs bigger integration tests (fast is default)'
puts ' --no-gems don\'t run tests that install gems'
puts 'jt test integration runs bigger integration tests'
puts 'jt test gems tests installing and using gems'
puts 'jt test cexts run C extension tests (set SULONG_DIR)'
puts 'jt tag spec/ruby/language tag failing specs in this directory'
puts 'jt tag spec/ruby/language/while_spec.rb tag failing specs in this file'
@@ -471,6 +471,7 @@ def test(*args)
when 'compiler' then test_compiler(*rest)
when 'cexts' then test_cexts(*rest)
when 'integration' then test_integration({}, *rest)
when 'gems' then test_gems({}, *rest)
when 'specs' then test_specs('run', *rest)
when 'tck' then
args = []
@@ -542,13 +543,24 @@ def test_cexts(*args)
private :test_cexts

def test_integration(env, *args)
no_gems = args.delete('--no-gems')
env_vars = env
jruby_opts = []

jruby_opts << '-Xtruffle.graal.warn_unless=false'
env_vars["JRUBY_OPTS"] = jruby_opts.join(' ')

env_vars["PATH"] = "#{Utilities.find_jruby_bin_dir}:#{ENV["PATH"]}"
tests_path = "#{JRUBY_DIR}/test/truffle/integration"
single_test = !args.empty?
test_names = single_test ? '{' + args.join(',') + '}' : '*'

all = args.delete('all')
long = args.delete('long') || all
fast = args.delete('fast') || all ||
!long # fast is the default
Dir["#{tests_path}/#{test_names}.sh"].each do |test_script|
sh env_vars, test_script
end
end
private :test_integration

def test_gems(env, *args)
env_vars = env
jruby_opts = []

@@ -562,21 +574,15 @@ def test_integration(env, *args)
env_vars["JRUBY_OPTS"] = jruby_opts.join(' ')

env_vars["PATH"] = "#{Utilities.find_jruby_bin_dir}:#{ENV["PATH"]}"
integration_path = "#{JRUBY_DIR}/test/truffle/integration"
long_tests = File.read("#{integration_path}/long-tests.txt").lines.map(&:chomp)
tests_path = "#{JRUBY_DIR}/test/truffle/gems"
single_test = !args.empty?
test_names = single_test ? '{' + args.join(',') + '}' : '*'

Dir["#{integration_path}/#{test_names}.sh"].each do |test_script|
is_long = long_tests.include?(File.basename(test_script))
gem_check = !(no_gems && File.read(test_script).include?('gem install'))
group_check = (is_long && long) || (!is_long && fast)
run = single_test || group_check && gem_check

sh env_vars, test_script if run
Dir["#{tests_path}/#{test_names}.sh"].each do |test_script|
sh env_vars, test_script
end
end
private :test_integration
private :test_gems

def test_specs(command, *args)
env_vars = {}

3 comments on commit ec3e494

@chrisseaton
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pitr-ch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The default test should be updated though, it calls integration with all I think, so now it's missing gem tests.

Sorry, something went wrong.

@chrisseaton
Copy link
Contributor Author

@chrisseaton chrisseaton commented on ec3e494 May 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 9a2310a

Sorry, something went wrong.

Please sign in to comment.