Commit a11c4e9d8081c0911b42e2a6b42c8456e34987f8
1 parent
b71d66e0
Exists in
master
and in
28 other branches
[Mezuro] re-organizing test and install scripts
Showing
9 changed files
with
192 additions
and
72 deletions
Show diff stats
plugins/mezuro/script/delete_all_kalibro_entries.sh
... | ... | @@ -0,0 +1,120 @@ |
1 | +#!/bin/bash --login | |
2 | + | |
3 | +#Ubuntu Package Dependencies | |
4 | +sudo apt-get update | |
5 | +sudo apt-get install build-essential curl libxslt1-dev git git-core tango-icon-theme sqlite3 libsqlite3-dev patch bzip2 openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev openjdk-6-jre | |
6 | + | |
7 | +#RVM Installation for Ubuntu 12.10 | |
8 | +curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --version 1.19.0 | |
9 | + | |
10 | +# Load RVM into a shell session *as a function* | |
11 | +if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then | |
12 | + # First try to load from a user install | |
13 | + source "$HOME/.rvm/scripts/rvm" | |
14 | +elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then | |
15 | + # Then try to load from a root install | |
16 | + source "/usr/local/rvm/scripts/rvm" | |
17 | +else | |
18 | + printf "ERROR: An RVM installation was not found.\n" | |
19 | +fi | |
20 | +rvm reload | |
21 | + | |
22 | +#Complements the RVM installation | |
23 | +rvm requirements run | |
24 | +#rvm pkg install zlib --verify-downloads 1 | |
25 | + | |
26 | +#Ruby installation and setup | |
27 | +CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" rvm install 1.8.7-p302 | |
28 | +rvm use ruby-1.8.7-p302@global | |
29 | +gem install rubygems-update -v 1.3.7 | |
30 | +update_rubygems | |
31 | +gem install rake -v 0.8.7 | |
32 | +yes | gem uninstall rake -v 10.0.4 | |
33 | +rvm gemset create mezuro | |
34 | +rvm use ruby-1.8.7-p302@mezuro | |
35 | + | |
36 | +#Gems installation | |
37 | +#The order really matters here, so if you see an output like "2 gems instaled" something should be wrong | |
38 | +gem install --no-ri --no-rdoc rack -v 1.0.1 | |
39 | +gem install --no-ri --no-rdoc rack-test -v 0.6.2 | |
40 | +gem install --no-ri --no-rdoc httpi -v 1.0 | |
41 | +gem install --no-ri --no-rdoc nokogiri -v 1.5.5 | |
42 | +gem install --no-ri --no-rdoc wasabi -v 2.0.0 | |
43 | +gem install --no-ri --no-rdoc json -v 1.7.5 | |
44 | +gem install --no-ri --no-rdoc gherkin -v 2.5.4 | |
45 | +gem install --no-ri --no-rdoc multi_json -v 1.3.7 | |
46 | +gem install --no-ri --no-rdoc rubyzip -v 0.9.9 | |
47 | +gem install --no-ri --no-rdoc ffi -v 1.2.0 | |
48 | +gem install --no-ri --no-rdoc childprocess -v 0.3.6 | |
49 | +gem install --no-ri --no-rdoc websocket -v 1.0.4 | |
50 | +gem install --no-ri --no-rdoc libwebsocket -v 0.1.6.1 | |
51 | +gem install --no-ri --no-rdoc selenium-webdriver -v 2.30.0 | |
52 | +gem install --no-ri --no-rdoc activesupport -v 2.3.5 | |
53 | +gem install --no-ri --no-rdoc actionpack -v 2.3.5 | |
54 | +gem install --no-ri --no-rdoc actionmailer -v 2.3.5 | |
55 | +gem install --no-ri --no-rdoc activerecord -v 2.3.5 | |
56 | +gem install --no-ri --no-rdoc activeresource -v 2.3.5 | |
57 | +gem install --no-ri --no-rdoc addressable -v 2.2.2 | |
58 | +gem install --no-ri --no-rdoc builder -v 3.1.4 | |
59 | +gem install --no-ri --no-rdoc gyoku -v 0.4.6 | |
60 | +gem install --no-ri --no-rdoc akami -v 1.2.0 | |
61 | +gem install --no-ri --no-rdoc xpath -v 0.1.4 | |
62 | +gem install --no-ri --no-rdoc mime-types -v 1.19 | |
63 | +gem install --no-ri --no-rdoc capybara -v 1.1.1 | |
64 | +gem install --no-ri --no-rdoc term-ansicolor -v 1.0.7 | |
65 | +gem install --no-ri --no-rdoc diff-lcs -v 1.1.3 | |
66 | +gem install --no-ri --no-rdoc cucumber -v 1.1.0 | |
67 | +gem install --no-ri --no-rdoc cucumber-rails -v 0.3.2 | |
68 | +gem install --no-ri --no-rdoc culerity -v 0.2.15 | |
69 | +gem install --no-ri --no-rdoc database_cleaner -v 0.9.1 | |
70 | +gem install --no-ri --no-rdoc exception_notification -v 1.0.20090728 | |
71 | +gem install --no-ri --no-rdoc googlecharts -v 1.6.8 | |
72 | +gem install --no-ri --no-rdoc hpricot -v 0.8.2 | |
73 | +gem install --no-ri --no-rdoc httpi -v 0.9.7 | |
74 | +gem install --no-ri --no-rdoc i18n -v 0.4.1 | |
75 | +gem install --no-ri --no-rdoc metaclass -v 0.0.1 | |
76 | +gem install --no-ri --no-rdoc mocha -v 0.9.8 | |
77 | +gem install --no-ri --no-rdoc nori -v 1.1.3 | |
78 | +gem install --no-ri --no-rdoc ntlm-http -v 0.1.1 | |
79 | +gem install --no-ri --no-rdoc polyglot -v 0.3.3 | |
80 | +gem install --no-ri --no-rdoc rails -v 2.3.5 | |
81 | +gem install --no-ri --no-rdoc rcov -v 0.9.7.1 | |
82 | +gem install --no-ri --no-rdoc RedCloth -v 4.2.2 | |
83 | +gem install --no-ri --no-rdoc rspec -v 1.2.9 | |
84 | +gem install --no-ri --no-rdoc rspec-rails -v 1.2.9 | |
85 | +gem install --no-ri --no-rdoc savon -v 0.9.7 | |
86 | +gem install --no-ri --no-rdoc Selenium -v 1.1.14 | |
87 | +gem install --no-ri --no-rdoc selenium-client -v 1.2.18 | |
88 | +gem install --no-ri --no-rdoc sqlite3 -v 1.3.6 | |
89 | +gem install --no-ri --no-rdoc system_timer -v 1.2.4 | |
90 | +gem install --no-ri --no-rdoc tango -v 0.1.15 | |
91 | +gem install --no-ri --no-rdoc tidy -v 1.1.2 | |
92 | +gem install --no-ri --no-rdoc treetop -v 1.4.10 | |
93 | +gem install --no-ri --no-rdoc webrat -v 0.5.1 | |
94 | +gem install --no-ri --no-rdoc will_paginate -v 2.3.12 | |
95 | +gem install --no-ri --no-rdoc gettext -v 1.8.0 | |
96 | + | |
97 | +#Mezuro installation | |
98 | +git clone git@gitorious.org:+mezuro/noosfero/mezuro.git | |
99 | +cd mezuro | |
100 | +git checkout mezuro-dev | |
101 | +rvm use ruby-1.8.7-p302@mezuro | |
102 | +cp config/database.yml.sqlite3 config/database.yml | |
103 | +cp config/solr.yml.dist config/solr.yml | |
104 | +cp plugins/mezuro/service.yml.example plugins/mezuro/service.yml | |
105 | +cp plugins/mezuro/licenses.yml.example plugins/mezuro/licenses.yml | |
106 | +mkdir tmp | |
107 | +rake db:schema:load | |
108 | +rake db:migrate | |
109 | +rake makemo | |
110 | +./script/sample-data | |
111 | +./script/noosfero-plugins enable mezuro | |
112 | +cd public/designs/themes | |
113 | +rm -f default | |
114 | +git clone https://git.gitorious.org/mezuro/mezuro-theme.git | |
115 | +ln -s mezuro-theme/ default | |
116 | +cd ../../../ | |
117 | + | |
118 | +#Prepare Mezuro for running functional and unit tests | |
119 | +rake solr:download | |
120 | +rake db:test:prepare | |
0 | 121 | \ No newline at end of file | ... | ... |
plugins/mezuro/script/kalibro_scripts.conf
plugins/mezuro/script/prepare_kalibro_query_file.sh
... | ... | @@ -1,17 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -source plugins/mezuro/script/kalibro_scripts.conf | |
4 | - | |
5 | -DROPLIMIT="END OF DROP TABLES" | |
6 | -RANGE=$(grep -n "$DROPLIMIT" $PSQLFILE | cut -d":" -f1) | |
7 | -START=1 | |
8 | -END=$(($RANGE - 1)) | |
9 | -CUT=$START,$END\!d | |
10 | -REPLACE="s/DROP TABLE IF EXISTS sequences,/TRUNCATE/" | |
11 | - | |
12 | -if [ -f $QUERYFILE ] | |
13 | - then sudo rm $QUERYFILE | |
14 | -fi | |
15 | - | |
16 | -sed -e "$CUT" -e "$REPLACE" $PSQLFILE > $QUERYFILE | |
17 | -sudo chown postgres.postgres $QUERYFILE |
plugins/mezuro/script/run_acceptance_tests.sh
... | ... | @@ -1,42 +0,0 @@ |
1 | -#!/bin/bash | |
2 | - | |
3 | -TEST_FILE=$1 | |
4 | -PROFILE=$2 | |
5 | - | |
6 | -if [ -z "$PROFILE" ]; then | |
7 | - PROFILE='default' | |
8 | -fi | |
9 | - | |
10 | -# where are your .kalibro dir? | |
11 | -KALIBRO_HOME='/usr/share/tomcat6/.kalibro' | |
12 | - | |
13 | -# create a kalibro test dir | |
14 | -echo "--> Creating tests directory" | |
15 | -sudo mkdir $KALIBRO_HOME/tests | |
16 | -echo "--> Copying test settings" | |
17 | -sudo cp $KALIBRO_HOME/kalibro_test.settings $KALIBRO_HOME/tests/kalibro.settings | |
18 | -echo "--> Changing owner of tests directory to tomcat6" | |
19 | -sudo chown -R tomcat6:tomcat6 $KALIBRO_HOME/tests | |
20 | - | |
21 | -# you must restart tomcat6 | |
22 | -#if you are using a tomcat installed from apt-get, for example: | |
23 | -sudo service tomcat6 restart | |
24 | - | |
25 | -#if you are using a tomcat installed a specific dir, for exemple: | |
26 | -#~/tomcat6/bin/shoutdown.sh | |
27 | -#~/tomcat6/bin/startup.sh | |
28 | - | |
29 | -# run test | |
30 | -cucumber $TEST_FILE -p $PROFILE | |
31 | - | |
32 | -#back to normal mode | |
33 | -echo "--> Removing tests directory" | |
34 | -sudo rm -rf $KALIBRO_HOME/tests | |
35 | - | |
36 | -# you must restart tomcat6 again | |
37 | -sudo service tomcat6 restart | |
38 | - | |
39 | -#or some thing like that... | |
40 | -#~/tomcat6/bin/shoutdown.sh | |
41 | -#~/tomcat6/bin/startup.sh | |
42 | - |
plugins/mezuro/script/tests/delete_all_kalibro_entries.sh
0 → 100755
plugins/mezuro/script/tests/prepare_kalibro_query_file.sh
0 → 100755
... | ... | @@ -0,0 +1,17 @@ |
1 | +#!/bin/bash | |
2 | + | |
3 | +source plugins/mezuro/script/tests/kalibro_scripts.conf | |
4 | + | |
5 | +DROPLIMIT="END OF DROP TABLES" | |
6 | +RANGE=$(grep -n "$DROPLIMIT" $PSQLFILE | cut -d":" -f1) | |
7 | +START=1 | |
8 | +END=$(($RANGE - 1)) | |
9 | +CUT=$START,$END\!d | |
10 | +REPLACE="s/DROP TABLE IF EXISTS sequences,/TRUNCATE/" | |
11 | + | |
12 | +if [ -f $QUERYFILE ] | |
13 | + then sudo rm $QUERYFILE | |
14 | +fi | |
15 | + | |
16 | +sed -e "$CUT" -e "$REPLACE" $PSQLFILE > $QUERYFILE | |
17 | +sudo chown postgres.postgres $QUERYFILE | ... | ... |
... | ... | @@ -0,0 +1,42 @@ |
1 | +#!/bin/bash | |
2 | + | |
3 | +TEST_FILE=$1 | |
4 | +PROFILE=$2 | |
5 | + | |
6 | +if [ -z "$PROFILE" ]; then | |
7 | + PROFILE='default' | |
8 | +fi | |
9 | + | |
10 | +# where are your .kalibro dir? | |
11 | +KALIBRO_HOME='/usr/share/tomcat6/.kalibro' | |
12 | + | |
13 | +# create a kalibro test dir | |
14 | +echo "--> Creating tests directory" | |
15 | +sudo mkdir $KALIBRO_HOME/tests | |
16 | +echo "--> Copying test settings" | |
17 | +sudo cp $KALIBRO_HOME/kalibro_test.settings $KALIBRO_HOME/tests/kalibro.settings | |
18 | +echo "--> Changing owner of tests directory to tomcat6" | |
19 | +sudo chown -R tomcat6:tomcat6 $KALIBRO_HOME/tests | |
20 | + | |
21 | +# you must restart tomcat6 | |
22 | +#if you are using a tomcat installed from apt-get, for example: | |
23 | +sudo service tomcat6 restart | |
24 | + | |
25 | +#if you are using a tomcat installed a specific dir, for exemple: | |
26 | +#~/tomcat6/bin/shoutdown.sh | |
27 | +#~/tomcat6/bin/startup.sh | |
28 | + | |
29 | +# run test | |
30 | +cucumber $TEST_FILE -p $PROFILE | |
31 | + | |
32 | +#back to normal mode | |
33 | +echo "--> Removing tests directory" | |
34 | +sudo rm -rf $KALIBRO_HOME/tests | |
35 | + | |
36 | +# you must restart tomcat6 again | |
37 | +sudo service tomcat6 restart | |
38 | + | |
39 | +#or some thing like that... | |
40 | +#~/tomcat6/bin/shoutdown.sh | |
41 | +#~/tomcat6/bin/startup.sh | |
42 | + | ... | ... |