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

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

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

    
7
# initialize
8
rubybranch=ruby_1_8_6
9
svn co http://svn.ruby-lang.org/repos/ruby/branches/${rubybranch}
10
git clone git://github.com/rails/rails.git
11
git clone git://github.com/dchelimsky/rspec.git
12
git clone git://github.com/rubyspec/mspec.git
13
git clone git://github.com/rubyspec/rubyspec.git
14
wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
15
tar xvfz rubygems-1.2.0.tgz && mv rubygems-1.2.0 rubygems
16
wget
17

    
18
# freshen
19
svn update ${rubybranch}
20
pushd rails; git pull --rebase; popd
21
pushd rspec; git pull --rebase; popd
22
pushd mspec; git pull --rebase; popd
23
pushd rubyspec; git pull --rebase; popd
24

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

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

    
41
# install mspec
42
pushd mspec
43
    rake gem
44
    gem install pkg/*.gem --no-ri --no-rdoc
45
popd
46

    
47

    
48

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

    
54
# test rspec
55
pushd rspec
56
    rake spec 3>&1 | tee ${rubyrev}.log
57
popd
58

    
59
# test rails
60
pushd rails
61
    rake test 2>&1 | tee ${rubyrev}.log
62
popd
63

    
64

    
65
# save the logs
66
tar cvfz logs.tar.gz {rails,rspec,rubyspec/1.8}/*.log