Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 175cdf6e8ba7
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 625dbd3c1dc8
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Aug 10, 2016

  1. Copy the full SHA
    98a181e View commit details
  2. Merge pull request #4058 from lxp/add-cexts-test-ruby-argon2

    [Truffle] Add CExt test for ruby-argon2
    eregon authored Aug 10, 2016
    Copy the full SHA
    625dbd3 View commit details
Showing with 15 additions and 7 deletions.
  1. +4 −0 test/truffle/cexts/ruby-argon2/test.rb
  2. +11 −7 tool/jt.rb
4 changes: 4 additions & 0 deletions test/truffle/cexts/ruby-argon2/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARGON2_HOME = ARGV[0]
ENV['TEST_CHECKS'] = '1'

require "#{ARGON2_HOME}/test/jruby+truffle/run"
18 changes: 11 additions & 7 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@
JDEBUG_TEST = "-Dmaven.surefire.debug=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=#{JDEBUG_PORT} -Xnoagent -Djava.compiler=NONE"
JEXCEPTION = "-Xtruffle.exceptions.print_java=true"
METRICS_REPS = 10
CEXTC_CONF_FILE = '.jruby-cext-build.yml'

VERBOSE = ENV.include? 'V'

@@ -659,9 +660,9 @@ def cextc(cext_dir, *clang_opts)
cextc ruby_cext_api
end

config_file = File.join(cext_dir, '.jruby-cext-build.yml')
config_file = File.join(cext_dir, CEXTC_CONF_FILE)
unless File.exist?(config_file)
abort "There is no .jruby-cext-build.yml in #{cext_dir} at the moment - I don't know how to build it"
abort "There is no #{CEXTC_CONF_FILE} in #{cext_dir} at the moment - I don't know how to build it"
end

config = YAML.load_file(config_file)
@@ -851,17 +852,20 @@ def test_cexts(*args)
[
['oily_png', ['chunky_png-1.3.6', 'oily_png-1.2.0'], ['oily_png']],
['psd_native', ['chunky_png-1.3.6', 'oily_png-1.2.0', 'bindata-2.3.1', 'hashie-3.4.4', 'psd-enginedata-1.1.1', 'psd-2.1.2', 'psd_native-1.1.3'], ['oily_png', 'psd_native']],
['nokogiri', [], ['nokogiri']]
].each do |gem_name, dependencies, libs|
['nokogiri', [], ['nokogiri']],
['ruby-argon2', [], [], "#{ENV['GEM_HOME']}/bundler/gems/ruby-argon2-5a527075e88b"]
].each do |gem_name, dependencies, libs, gem_root|
next if gem_name == 'nokogiri' # nokogiri totally excluded
next if gem_name == 'nokogiri' && no_libxml
config = "#{JRUBY_DIR}/test/truffle/cexts/#{gem_name}"
cextc config, '-Werror=implicit-function-declaration'
unless gem_root and File.exist?(File.join(gem_root, CEXTC_CONF_FILE))
gem_root = "#{JRUBY_DIR}/test/truffle/cexts/#{gem_name}"
end
cextc gem_root, '-Werror=implicit-function-declaration'
next if gem_name == 'psd_native' # psd_native is excluded just for running
run '--graal',
*dependencies.map { |d| "-I#{ENV['GEM_HOME']}/gems/#{d}/lib" },
*libs.map { |l| "-I#{JRUBY_DIR}/test/truffle/cexts/#{l}/lib" },
"#{JRUBY_DIR}/test/truffle/cexts/#{gem_name}/test.rb"
"#{JRUBY_DIR}/test/truffle/cexts/#{gem_name}/test.rb", gem_root
end
end
private :test_cexts