We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Seperate integration tests from unit tests.
Hongli Lai (Phusion) (author)
Fri Feb 29 09:03:16 -0800 2008
commit  d92d3e533181ebc249ba30bef2ebf0505cb0c64f
tree    4e4c183f53ef0a4da262ae55431f7ab002d7a87b
parent  5e6157fc0c6e3510780c49a250572e47e018f0ca
...
23
24
25
26
 
27
28
29
...
39
40
41
 
 
42
43
44
...
92
93
94
95
 
96
97
98
...
177
178
179
180
 
181
182
183
 
184
185
186
187
188
 
189
190
191
192
193
 
194
195
 
 
 
 
 
196
197
198
199
200
201
202
...
23
24
25
 
26
27
28
29
...
39
40
41
42
43
44
45
46
...
94
95
96
 
97
98
99
100
...
179
180
181
 
182
183
184
 
185
186
187
188
189
 
190
191
192
193
194
 
195
196
197
198
199
200
201
202
203
204
205
 
206
207
208
0
@@ -23,7 +23,7 @@ LDFLAGS = ""
0
 
0
 desc "Build everything"
0
 task :default => [
0
- "ext/mod_rails/native_support.#{LIBEXT}",
0
+ :native_support,
0
   :apache2,
0
   'test/Apache2ModuleTests',
0
   'benchmark/DummyRequestHandler'
0
@@ -39,6 +39,8 @@ task :clobber
0
 ##### Ruby C extension
0
 
0
 subdir 'ext/mod_rails' do
0
+ task :native_support => ["native_support.#{LIBEXT}"]
0
+
0
   file 'Makefile' => 'extconf.rb' do
0
     sh "ruby extconf.rb"
0
   end
0
@@ -92,7 +94,7 @@ subdir 'ext/apache2' do
0
   apxs_objects = APACHE2::OBJECTS.keys.join(',')
0
 
0
   desc "Build mod_passenger Apache 2 module"
0
- task :apache2 => ['mod_passenger.so', "../mod_rails/native_support.#{LIBEXT}"]
0
+ task :apache2 => ['mod_passenger.so', :native_support]
0
   
0
   file 'mod_passenger.so' => ['../boost/src/libboost_thread.a', 'mod_passenger.o'] + APACHE2::OBJECTS.keys do
0
     # apxs totally sucks. We couldn't get it working correctly
0
@@ -177,26 +179,30 @@ end
0
 
0
 subdir 'test' do
0
   desc "Run all unit tests (but not integration tests)"
0
- task :test => [:'test:apache2', :'test:ruby']
0
+ task :test => [:'test:apache2', :'test:ruby', :'test:integration']
0
   
0
   desc "Run unit tests for the Apache 2 module"
0
- task 'test:apache2' => 'Apache2ModuleTests' do
0
+ task 'test:apache2' => ['Apache2ModuleTests', :native_support] do
0
     sh "./Apache2ModuleTests"
0
   end
0
   
0
   desc "Run unit tests for the Apache 2 module in Valgrind"
0
- task 'test:valgrind' => 'Apache2ModuleTests' do
0
+ task 'test:valgrind' => ['Apache2ModuleTests', :native_support] do
0
     sh "valgrind #{ENV['ARGS']} ./Apache2ModuleTests"
0
   end
0
   
0
   desc "Run unit tests for the Ruby libraries"
0
- task 'test:ruby' => ["../ext/mod_rails/native_support.#{LIBEXT}"] do
0
+ task 'test:ruby' => [:native_support] do
0
     sh "spec -f s *_spec.rb"
0
   end
0
+
0
+ desc "Run integration tests"
0
+ task 'test:integration' => [:apache2, :native_support] do
0
+ sh "spec -f s integration_tests.rb"
0
+ end
0
 
0
   file 'Apache2ModuleTests' => TEST::AP2_OBJECTS.keys +
0
    ['../ext/boost/src/libboost_thread.a',
0
- "../ext/mod_rails/native_support.#{LIBEXT}",
0
    '../ext/apache2/Utils.o'] do
0
     objects = TEST::AP2_OBJECTS.keys.join(' ') << " ../ext/apache2/Utils.o"
0
     create_executable "Apache2ModuleTests", objects,

Comments

    No one has commented yet.