Skip to content

Commit

Permalink
Showing 3 changed files with 22 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -47,7 +47,8 @@ env:
- JT='test specs :core'
- JT='test specs :library'
- JT='test specs :truffle'
- JT='test integration'
- JT='test integration fast'
- JT='test integration long'

matrix:
include:
@@ -84,7 +85,7 @@ matrix:
jdk: oraclejdk8
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
- env: JT='test integration'
- env: JT='test integration long'
# 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
2 changes: 2 additions & 0 deletions test/truffle/integration/long-tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rails.sh
gem-testing.sh
29 changes: 17 additions & 12 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -275,7 +275,7 @@ 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] runs bigger integration tests'
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 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'
@@ -458,22 +458,27 @@ def test_compiler(*args)

def test_integration(*args)
no_gems = args.delete('--no-gems')
fast = args.delete('fast')

all = args.delete('all')
long = args.delete('long') || all
fast = args.delete('fast') || all ||
!long # fast is the default

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

test_names = if args.empty?
'*'
else
'{' + args.join(',') + '}'
end

Dir["#{JRUBY_DIR}/test/truffle/integration/#{test_names}.sh"].each do |test_script|
Dir["#{integration_path}/#{test_names}.sh"].each do |test_script|
next if no_gems && File.read(test_script).include?('gem install')
next if fast && test_script.end_with?('integration/gem-testing.sh')
next if fast && test_script.end_with?('integration/rails.sh')
sh env_vars, test_script

is_long = long_tests.include?(File.basename(test_script))

if (is_long && long) || (!is_long && fast)
sh env_vars, test_script
end
end
end
private :test_integration

1 comment on commit e86b344

@chrisseaton
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update our internal CI to match?

Sorry, something went wrong.

Please sign in to comment.