Skip to content

Commit

Permalink
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ before_script:
- if [ $TRAVIS_OS_NAME == linux ]; then travis_retry ./configure --llvm-config llvm-config-3.4; fi
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure --llvm-config /usr/local/opt/llvm/bin/llvm-config; fi

script: rake
script: rake ci

after_success:
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then rake deploy; fi
20 changes: 17 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -96,16 +96,24 @@ class SpecRunner
@at_exit_status = status
end

def self.flags
@flags
end

def self.flags=(value)
@flags = value
end

def initialize
@handler = lambda do |ok, status|
self.class.set_at_exit_status(status.exitstatus) unless ok
end
end

def run(suite=:ci_files, flags=nil)
def run(suite=:ci_files)
self.class.set_at_exit_handler

sh("bin/mspec ci :#{suite} #{ENV['CI_MODE_FLAG'] || flags} -t bin/#{BUILD_CONFIG[:program_name]} -d --background", &@handler)
sh("bin/mspec ci :#{suite} #{self.class.flags} -t bin/#{BUILD_CONFIG[:program_name]} -d --background", &@handler)
end
end

@@ -177,14 +185,20 @@ task :docs do
Rubinius::Documentation.main
end

desc "Run CI in default (configured) mode but do not rebuild on failure"
desc "Run specs in default (configured) mode but do not rebuild on failure"
task :spec => %w[build vm:test] do
clean_environment

spec_runner = SpecRunner.new
spec_runner.run
end

desc "Run specs as in the spec task, but with CI formatting"
task :ci do
SpecRunner.flags = "-f s"
Rake::Task["spec"].invoke
end

desc "Print list of items marked to-do in kernel/ (@todo|TODO)"
task :todos do

0 comments on commit 33d8568

Please sign in to comment.