Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Truffle] Test using the build pack.
Browse files Browse the repository at this point in the history
chrisseaton committed May 26, 2016
1 parent 3646a09 commit 5fd14aa
Showing 4 changed files with 31 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -90,6 +90,10 @@ matrix:
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'
1 change: 1 addition & 0 deletions maven/BUILD-PACK
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b780d91927ae8f14373c1062e0a9e40fc7251234
26 changes: 20 additions & 6 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -292,6 +292,7 @@ def help
puts 'jt build [options] build'
puts 'jt build truffle [options] build only the Truffle part, assumes the rest is up-to-date'
puts 'jt rebuild [options] clean and build'
puts ' --offline use the build pack to build offline (should be in ../jruby-build-pack)'
puts 'jt clean clean'
puts 'jt irb irb'
puts 'jt rebuild clean and build'
@@ -358,14 +359,25 @@ def checkout(branch)
def bootstrap
mvn '-DskipTests', '-Pbootstrap-no-launcher'
end

def maven_options(*options)
maven_options = %w[-DskipTests]
offline = options.delete('--offline')
if offline
maven_options.push '-Dmaven.repo.local=../jruby-build-pack/maven'
maven_options.push '--offline'
end
return [maven_options, options]
end

def build(project = nil)
opts = %w[-DskipTests]
def build(*options)
maven_options, other_options = maven_options(*options)
project = other_options.first
case project
when 'truffle'
mvn *opts, '-pl', 'truffle', 'package'
mvn *maven_options, '-pl', 'truffle', 'package'
when nil
mvn *opts, 'package'
mvn *maven_options, 'package'
else
raise ArgumentError, project
end
@@ -818,8 +830,9 @@ def human_size(bytes)
end
end

def tarball
mvn '-Pdist'
def tarball(*options)
maven_options, other_options = maven_options(*options)
mvn *maven_options, '-Pdist'
generated_file = "#{JRUBY_DIR}/maven/jruby-dist/target/jruby-dist-#{Utilities.jruby_version}-bin.tar.gz"
final_file = "#{JRUBY_DIR}/jruby-bin-#{Utilities.jruby_version}.tar.gz"
FileUtils.copy generated_file, final_file
@@ -897,6 +910,7 @@ def main(args)
when "build"
command = [args.shift]
command << args.shift if args.first == "truffle"
command << args.shift if args.first == "--offline"
send(*command)
end

6 changes: 6 additions & 0 deletions tool/travis_runner.sh
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
set -e
set -x

if [[ -v USE_BUILD_PACK ]]
then
git clone --depth 1 https://github.com/jruby/jruby-build-pack.git
export MAVEN_OPTS="-Dmaven.repo.local=build-pack/maven $MAVEN_OPTS"
fi

if [[ -v PHASE ]]
then
DOWNLOAD_OUTPUT_FILTER='Download|\\[exec\\] [[:digit:]]+/[[:digit:]]+|^[[:space:]]*\\[exec\\][[:space:]]*$'

0 comments on commit 5fd14aa

Please sign in to comment.