Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | #!/bin/bash |
2 | ||
3 | SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) | |
4 | ||
5 | case $1 in | |
6 | ||
7 | stable-3.4) | |
8 | ||
9 | echo | |
10 | echo §§§§§§§§§§§§§§§§§§§§ EXECUTING TESTS FOR STABLE | |
11 | echo | |
12 | ||
13 | echo | |
14 | echo §§§§§§§§§§§§§§§§§§§§ Updating Selenium tests repository | |
15 | echo | |
16 | cd /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/modules/civicrm/ | |
17 | find . -name *~ -delete | |
18 | svn up | |
19 | echo §§§§§§§§§§§§§§§§§§§§ ...done. | |
20 | ||
21 | echo | |
22 | echo §§§§§§§§§§§§§§§§§§§§ Resetting Selenium tests database and template files | |
23 | echo | |
24 | rm -rf /tmp/templates_c/ | |
25 | cd /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/modules/civicrm/bin | |
26 | ./setup.sh | |
27 | rm -rf /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/files/civicrm/ | |
28 | chmod -R 777 /var/www/drupal6.dev.civicrm.org/public/sites/devel.drupal6.tests.dev.civicrm.org/files/ | |
29 | ||
30 | echo §§§§§§§§§§§§§§§§§§§§ ...done. | |
31 | echo | |
32 | ||
33 | CODE_DIR="/home/tests/stable-suite" | |
34 | ||
35 | echo | |
36 | echo §§§§§§§§§§§§§§§§§§§§ Running test suite | |
37 | echo | |
38 | ||
39 | rm -rf /tmp/templates_c/ | |
40 | ||
41 | for testName in api_v2 api_v3 CRM WebTest; do | |
42 | cd $CODE_DIR/tools | |
43 | scripts/phpunit --tap --log-junit tests/reports/logfile.$testName.xml -u tests -ptests -h localhost ${testName}_AllTests | |
44 | cd $CODE_DIR/tools/scripts/ | |
45 | ||
46 | echo | |
47 | echo §§§§§§§§§§§§§§§§§§§§ Generating test results. | |
48 | echo | |
49 | phing $testName | |
50 | echo §§§§§§§§§§§§§§§§§§§§ All finished. | |
51 | done | |
52 | ||
53 | ;; | |
54 | ||
55 | stable) | |
56 | ||
57 | echo | |
58 | echo §§§§§§§§§§§§§§§§§§§§ EXECUTING TESTS FOR TRUNK | |
59 | echo | |
60 | ||
61 | echo | |
62 | echo §§§§§§§§§§§§§§§§§§§§ Updating test suite repository | |
63 | echo | |
64 | cd /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/modules/civicrm/ | |
65 | find . -name *~ -delete | |
66 | svn up | |
67 | echo §§§§§§§§§§§§§§§§§§§§ ...done. | |
68 | ||
69 | echo | |
70 | echo §§§§§§§§§§§§§§§§§§§§ Resetting Selenium tests database and template files | |
71 | echo | |
72 | rm -rf /tmp/templates_c/ | |
73 | cd /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/modules/civicrm/bin | |
74 | ./setup.sh | |
75 | ||
76 | echo §§§§§§§§§§§§§§§§§§§§ ...done. | |
77 | ||
78 | rm -rf /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/files/civicrm/ | |
79 | chmod -R 777 /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/files/ | |
80 | ||
81 | CODE_DIR="/home/tests/stable-suite" | |
82 | ||
83 | echo | |
84 | echo §§§§§§§§§§§§§§§§§§§§ Running test suite | |
85 | echo | |
86 | ||
87 | # for testName in api_v3; do | |
88 | # for testName in WebTest; do | |
89 | # for testName in api_v3 CRM; do | |
90 | for testName in api_v3 CRM WebTest; do | |
91 | # for testName in CRM; do | |
92 | cd $CODE_DIR/tools | |
93 | ||
94 | rm -rf /tmp/templates_c/ | |
95 | ||
96 | #reset the db before running webtest | |
97 | if [ $testName == WebTest ] ; then | |
98 | echo | |
99 | echo ============== reloading db for Webtest =============================== | |
100 | echo | |
101 | /var/www/drupal7.dev.civicrm.org/public/sites/stable.drupal7.tests.dev.civicrm.org/modules/civicrm/bin/setup.sh | |
102 | fi | |
103 | ||
104 | scripts/phpunit --tap --log-junit tests/reports/logfile.$testName.xml -u tests -ptests -bstable_drupal7_tests_dev_civicrm -h localhost ${testName}_AllTests | |
105 | cd $CODE_DIR/tools/scripts/ | |
106 | ||
107 | echo | |
108 | echo §§§§§§§§§§§§§§§§§§§§ Generating test results. | |
109 | echo | |
110 | phing $testName | |
111 | echo §§§§§§§§§§§§§§§§§§§§ All finished. | |
112 | done | |
113 | ||
114 | ;; | |
115 | ||
116 | trunk) | |
117 | ||
118 | echo | |
119 | echo §§§§§§§§§§§§§§§§§§§§ EXECUTING TESTS FOR TRUNK | |
120 | echo | |
121 | ||
122 | echo | |
123 | echo §§§§§§§§§§§§§§§§§§§§ Updating test suite repository | |
124 | echo | |
125 | cd /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm/ | |
126 | find . -name *~ -delete | |
127 | svn up | |
128 | echo §§§§§§§§§§§§§§§§§§§§ ...done. | |
129 | ||
130 | echo | |
131 | echo §§§§§§§§§§§§§§§§§§§§ Resetting Selenium tests database and template files | |
132 | echo | |
133 | rm -rf /tmp/templates_c/ | |
134 | cd /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm/bin | |
135 | ./setup.sh | |
136 | ||
137 | echo §§§§§§§§§§§§§§§§§§§§ ...done. | |
138 | ||
139 | rm -rf /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/files/civicrm/ | |
140 | chmod -R 777 /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/files/ | |
141 | ||
142 | CODE_DIR="/home/tests/devel-suite" | |
143 | ||
144 | echo | |
145 | echo §§§§§§§§§§§§§§§§§§§§ Running test suite | |
146 | echo | |
147 | ||
148 | # for testName in api_v3; do | |
149 | # for testName in WebTest; do | |
150 | # for testName in api_v2 api_v3 CRM; do | |
151 | for testName in api_v3 CRM WebTest; do | |
152 | # for testName in CRM; do | |
153 | cd $CODE_DIR/tools | |
154 | ||
155 | rm -rf /tmp/templates_c/ | |
156 | ||
157 | #reset the db before running webtest | |
158 | if [ $testName == WebTest ] ; then | |
159 | echo | |
160 | echo ============== reloading db for Webtest =============================== | |
161 | echo | |
162 | /var/www/drupal7.dev.civicrm.org/public/sites/devel.drupal7.tests.dev.civicrm.org/modules/civicrm/bin/setup.sh | |
163 | fi | |
164 | ||
165 | scripts/phpunit --tap --log-junit tests/reports/logfile.$testName.xml -u tests -ptests -bdevel_drupal7_tests_dev_civicrm -h localhost ${testName}_AllTests | |
166 | cd $CODE_DIR/tools/scripts/ | |
167 | ||
168 | echo | |
169 | echo §§§§§§§§§§§§§§§§§§§§ Generating test results. | |
170 | echo | |
171 | phing $testName | |
172 | echo §§§§§§§§§§§§§§§§§§§§ All finished. | |
173 | done | |
174 | ||
175 | ;; | |
176 | ||
177 | *) | |
178 | $SELF trunk | |
179 | ;; | |
180 | esac |