0
@@ -53,6 +53,7 @@ desc "Build everything"
0
+ 'test/oxt/oxt_test_main',
0
'test/Apache2ModuleTests',
0
'benchmark/DummyRequestHandler'
0
- CXXFLAGS = ::CXXFLAGS + " -Isupport -DTESTING_SPAWN_MANAGER -DTESTING_APPLICATION_POOL "
0
- AP2_FLAGS = "-I../ext/apache2 -I../ext #{APR_FLAGS}"
0
+ CXXFLAGS = "#{::CXXFLAGS} -DTESTING_SPAWN_MANAGER -DTESTING_APPLICATION_POOL "
0
+ AP2_FLAGS = "-I../ext/apache2 -I../ext -Isupport #{APR_FLAGS}"
0
'CxxTestMain.o' => %w(CxxTestMain.cpp),
0
'MessageChannelTest.o' => %w(MessageChannelTest.cpp
0
@@ -224,11 +225,22 @@ class TEST
0
../ext/apache2/Application.h),
0
'UtilsTest.o' => %w(UtilsTest.cpp ../ext/apache2/Utils.h)
0
+ OXT_FLAGS = "-I../../ext -I../support"
0
+ 'oxt_test_main.o' => %w(oxt_test_main.cpp),
0
+ 'backtrace_test.o' => %w(backtrace_test.cpp)
0
desc "Run all unit tests (but not integration tests)"
0
- task :test => [:'test:apache2', :'test:ruby', :'test:integration']
0
+ task :test => [:'test:oxt', :'test:apache2', :'test:ruby', :'test:integration']
0
+ desc "Run unit tests for the OXT library"
0
+ task 'test:oxt' => 'oxt/oxt_test_main' do
0
+ sh "./oxt/oxt_test_main"
0
desc "Run unit tests for the Apache 2 module"
0
task 'test:apache2' => [
0
@@ -265,6 +277,26 @@ subdir 'test' do
0
task 'test:integration' => [:apache2, :native_support] do
0
sh "spec -c -f s integration_tests.rb"
0
+ file 'oxt/oxt_test_main' => TEST::OXT_OBJECTS.keys.map{ |x| "oxt/#{x}" } +
0
+ ['../ext/libboost_oxt.a'] do
0
+ objects = TEST::OXT_OBJECTS.keys.join(' ')
0
+ create_executable "oxt_test_main", objects,
0
+ "#{LDFLAGS} #{MULTI_ARCH_FLAGS} " <<
0
+ "../../ext/libboost_oxt.a " <<
0
+ TEST::OXT_OBJECTS.each_pair do |target, sources|
0
+ file "oxt/#{target}" => sources.map{ |x| "oxt/#{x}" } do
0
+ puts "### In test/oxt:"
0
+ compile_cxx sources[0], "#{TEST::OXT_FLAGS} #{TEST::CXXFLAGS}"
0
file 'Apache2ModuleTests' => TEST::AP2_OBJECTS.keys +
0
['../ext/libboost_oxt.a',
0
@@ -298,7 +330,7 @@ subdir 'test' do
0
- sh "rm -f
Apache2ModuleTests *.o"
0
+ sh "rm -f
oxt/oxt_test_main oxt/*.o Apache2ModuleTests *.o"
0
@@ -437,6 +469,7 @@ spec = Gem::Specification.new do |s|
0
'test/*.{rb,cpp,example}',
Comments
No one has commented yet.