Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
enable travis
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Jan 13, 2013
1 parent caede3a commit 00f9e1e
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 8 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Java, because those are the 64bit boxes. We'll change it once Ruby
# boxes are 64bit, too
language: java
before_install:
- "sudo apt-get install -qq rake"
before_script:
- "./install.sh"
script: "rake travis"
env:
- CI_TESTS=rubyspec
- CI_TESTS=vmunit
- CI_TESTS=vmunit2
# These next ones have to be cleaned up, they don't currently pass
# - CI_TESTS=fav_gems
# - CI_TESTS=sinatra
# - CI_TESTS=examples
notifications:
email: false
irc: "irc.freenode.org#maglev-ruby"
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ task :status do
end
end

if ENV["TRAVIS"]
tests = {"rubyspec" => "spec:ci",
"vmunit" => "tests:vmunit",
"vmunit2" => "tests:vmunit2",
"fav_gems" => "tests:fav_gems_install",
"sinatra" => "tests:sinatra",
"examples" => "tests:examples"}

task :travis do
Rake::Task["stwrappers"].invoke
ENV["PATH"] = "#{File.dirname(__FILE__)}/bin:#{ENV['PATH']}"
Rake::Task[tests[ENV["CI_TESTS"]]].invoke
end
end

# This initializes the environment, and then ensures that there is a
# gemstone diretory there. Needed to pull this out, since some of the
# initialization tasks need to be performed before there is a gemstone dir
Expand Down
1 change: 1 addition & 0 deletions examples/sinatra/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ end

desc 'Run the test for sinatra_app.rb.'
task :test do
sh 'maglev-gem install sinatra minitest rack-test'
sh 'maglev-ruby -rubygems sinatra_app_test.rb'
end

1 change: 1 addition & 0 deletions spec/tags/core/file/ftype_tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fails:File.ftype returns 'link' when the file is a link
fails:File.ftype returns 'blockSpecial' when the file is a block
1 change: 1 addition & 0 deletions spec/tags/core/io/popen_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ fails:IO.popen allows the IO to be closed inside the block
fails:IO.popen starts returns a forked process if the command is -
fails:IO.popen yields an instance of a subclass when called on a subclass
fails:IO.popen returns an instance of a subclass when called on a subclass
fails:IO.popen waits for the child to finish
22 changes: 14 additions & 8 deletions tests/sinatra/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ PATH=$MAGLEV_HOME/bin:$PATH
MAGLEV_OPTS=

rm -rf sinatra
git clone https://github.com/sinatra/sinatra.git
git clone --depth 1 https://github.com/sinatra/sinatra.git

cd sinatra

git submodule init
git submodule update --init --recursive

# Our corporate firewall does not let us use git: protocol. So, we patch
# Sinatra Gemfile to use http: rather than git:. Also, we use perl rather
# than sed because Solaris sed is broken (no -i).
echo "Patching sinatra/Gemfile"
perl -pi -e s/git:/http:/ Gemfile
echo "source 'http://w2-stdev-ub10-01.gemstone.com:9292'"|cat - Gemfile > Gemfile.new
mv Gemfile.new Gemfile
if [ -z "$TRAVIS" ]; then
# Our corporate firewall does not let us use git: protocol. So,
# we patch Sinatra Gemfile to use http: rather than git:. Also,
# we use perl rather than sed because Solaris sed is broken (no
# -i).
echo "Patching sinatra/Gemfile"
perl -pi -e s/git:/http:/ Gemfile
echo "source 'http://w2-stdev-ub10-01.gemstone.com:9292'"|cat - Gemfile > Gemfile.new
mv Gemfile.new Gemfile
fi

export rack=master

Expand All @@ -31,6 +34,9 @@ if [[ -n $WORKSPACE ]]; then
maglev start
fi

# Install gems that are required but need patches
maglev-gem install eventmachine json nokogiri multi_json yajl-ruby mongrel bcrypt-ruby

# consider adding --without-coffee-script for Allen
# maglev-ruby -S bundle install --without-coffee-script
maglev-ruby -S bundle install
Expand Down

0 comments on commit 00f9e1e

Please sign in to comment.