Project

General

Profile

Bug #199 » wrapper.sh

Sample commands to run to build Ruby and run it against third-party tests - igal (Igal Koshevoy), 06/28/2008 09:27 PM

 
# SUMMARY: Sample commands to checkout Ruby, build it, and run it against
# various third-party test suites,

echo "Don't run this directly, instead copy-and-paste lines to a terminal"
exit 1

# initialize
rubybranch=ruby_1_8_6
svn co http://svn.ruby-lang.org/repos/ruby/branches/${rubybranch}
git clone git://github.com/rails/rails.git
git clone git://github.com/dchelimsky/rspec.git
git clone git://github.com/rubyspec/mspec.git
git clone git://github.com/rubyspec/rubyspec.git
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar xvfz rubygems-1.2.0.tgz && mv rubygems-1.2.0 rubygems
wget

# freshen
svn update ${rubybranch}
pushd rails; git pull --rebase; popd
pushd rspec; git pull --rebase; popd
pushd mspec; git pull --rebase; popd
pushd rubyspec; git pull --rebase; popd

# build ruby
pushd $rubybranch
rubyrev=`svn info . | grep 'Last Changed Rev' | awk '{ print $4 }'`
rubytmp=$PWD/../ruby-svn${rubyrev}
autoconf
./configure --prefix=${rubytmp} && make && make test && make install
export PATH=$rubytmp/bin:$PATH
popd

# install rubygems
pushd rubygems
ruby setup.rb --no-ri --no-rdoc
export PATH=`gem env path`/bin:$PATH
gem install sqlite3-ruby mysql rake diff-lcs syntax mocha rcov heckle hpricot --no-ri --no-rdoc
popd

# install mspec
pushd mspec
rake gem
gem install pkg/*.gem --no-ri --no-rdoc
popd



# test rubyspec
pushd rubyspec/1.8
mspec . 2>&1 | tee ${rubyrev}.log
popd

# test rspec
pushd rspec
rake spec 3>&1 | tee ${rubyrev}.log
popd

# test rails
pushd rails
rake test 2>&1 | tee ${rubyrev}.log
popd


# save the logs
tar cvfz logs.tar.gz {rails,rspec,rubyspec/1.8}/*.log
(3-3/5)