Brian Moseley
2009-Sep-25 06:39 UTC
[Cruisecontrolrb-users] custom cruise task running plugin tests
I''ve created the following custom rake tasks to run rspec and cucumber: == desc "Task for CruiseControl.rb" task :cruise => [''test:prepare'', "spec", "cucumber"] do puts "done" end namespace :test do desc "Set up test environment" task :prepare do RAILS_ENV = ''test'' end end == when I run this task at the command line, the command completes successfully, like so: == $ rake cruise ... stuff happens ... 83 scenarios (83 passed) 512 steps (512 passed) 0m53.207s done Loaded suite /usr/local/bin/rake Started Finished in 0.000357 seconds. 0 tests, 0 assertions, 0 failures, 0 errors == when cc runs a build, however, it seems to be descending into my project''s vendor/plugins and running the test task: == [CruiseControl] Invoking Rake task "cruise" .... stuff happens ... 83 scenarios (83 passed) 512 steps (512 passed) 0m53.414s /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'': no such file to load -- shoulda (MissingSourceFile) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /var/lib/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'' from /var/lib/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in'' from /var/lib/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'' from ./vendor/plugins/acts_as_audited/test/test_helper.rb:12 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /var/lib/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'' from /var/lib/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in'' from /var/lib/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:90:in `collect_file'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:73:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `each'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:63:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `each'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:63:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `each'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:63:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `each'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:63:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `each'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:58:in `recursive_collect'' from /usr/lib/ruby/1.8/test/unit/collector/dir.rb:29:in `collect'' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:68 from /usr/lib/ruby/1.8/test/unit/autorunner.rb:213:in `[]'' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:213:in `run'' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'' from /usr/lib/ruby/1.8/test/unit.rb:278 from -e:1 done ===============================================================================Using rails gem: rails-2.3.3 dir : /home/warhorn/.cruise/projects/warhorn2/work command : echo /home/warhorn/.cruise/projects/warhorn2/work warhorn$ ruby1.8\ -e\ \"require\ \''rubygems\''\ rescue\ nil\;\ require\ \''rake\''\;\ load\ \''/usr/local/cruisecontrol-1.4.0/tasks/cc_build.rake\''\;\ ARGV\ \<\<\ \''--nosearch\''\ \<\<\ \''cc:build\''\;\ Rake.application.run\;\ ARGV.clear\" >> /home/warhorn/.cruise/projects/warhorn2/build-47a964e.1/build.log && ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; load ''/usr/local/cruisecontrol-1.4.0/tasks/cc_build.rake''; ARGV << ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" >> /home/warhorn/.cruise/projects/warhorn2/build-47a964e.1/build.log 2>&1 exitstatus: 1 == am I missing something about the cc environment that would cause it to try to run the test task for the project''s plugins? I looked at the cc build tasks, but that didn''t shed any light on the subject. thanks!