I can''t seem to find any answers to this problem, I did my best to search the archives and Google the problem, but can''t find anything. I''ve got a project I''m trying to put on cruisecontrol, where the tests pass, but the build still fails. The build log says "Errors running test:units!," but doesn''t show where it tried to run the unit tests. I pasted in the build.log below, and where it says "52 tests, 104 assertions, 0 failures, 0 errors," those are my functional tests. I went to the work directory on the cruisecontrol server, and ran the test task, and, naturally, it completes without error. I ran the builder for the project with the --trace flag, hoping that would shed some light on the problem, but to no avail. The only peculiar thing I''m doing in this application, is relying on some "view tables," but so far, that has been a non-issue. Has anyone run into this problem? Thanks, Jason === build.log == /home/rails/.cruise/projects/my_project/work rails$ ruby1.8 -e require ''rubygems'' rescue nil; require ''rake''; load ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear (in /home/rails/.cruise/projects/my_project/work) [CruiseControl] Invoking Rake task "db:test:purge" [CruiseControl] Invoking Rake task "db:migrate" ... DB:MIGRATE OUTPUT ... [CruiseControl] Invoking Rake task "test" Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader Started .................................................... Finished in 2.671658 seconds. 52 tests, 104 assertions, 0 failures, 0 errors /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" Errors running test:units! dir : /home/rails/.cruise/projects/my_project/work command : ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; load ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" executed command : echo /home/rails/.cruise/projects/my_project/work rails$ ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; load ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" >> /home/rails/.cruise/projects/my_project/build-108.3/build.log && ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; load ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" >> /home/rails/.cruise/projects/my_project/build-108.3/build.log 2>&1 exitstatus: 1 STDERR TAIL START STDERR TAIL END
Jeremy Lightsmith
2008-Sep-11 16:15 UTC
[Cruisecontrolrb-users] Tests Pass, But Build Fails
why don''t you try to debug it further by specifying exactly what cc.rb runs. you could do this by adding a project.rake_task = "default" in the cruise_config.rb file Jeremy On Thu, Sep 11, 2008 at 8:55 AM, Jason Edwards <jtanium at gmail.com> wrote:> I can''t seem to find any answers to this problem, I did my best to > search the archives and Google the problem, but can''t find anything. > > I''ve got a project I''m trying to put on cruisecontrol, where the tests > pass, but the build still fails. The build log says "Errors running > test:units!," but doesn''t show where it tried to run the unit tests. > I pasted in the build.log below, and where it says "52 tests, 104 > assertions, 0 failures, 0 errors," those are my functional tests. I > went to the work directory on the cruisecontrol server, and ran the > test task, and, naturally, it completes without error. > > I ran the builder for the project with the --trace flag, hoping that > would shed some light on the problem, but to no avail. > > The only peculiar thing I''m doing in this application, is relying on > some "view tables," but so far, that has been a non-issue. > > Has anyone run into this problem? > > Thanks, > > Jason > > === build.log ==> > /home/rails/.cruise/projects/my_project/work rails$ ruby1.8 -e require > ''rubygems'' rescue nil; require ''rake''; load > ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << > ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear > (in /home/rails/.cruise/projects/my_project/work) > [CruiseControl] Invoking Rake task "db:test:purge" > [CruiseControl] Invoking Rake task "db:migrate" > ... DB:MIGRATE OUTPUT ... > [CruiseControl] Invoking Rake task "test" > Loaded suite > /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader > Started > .................................................... > Finished in 2.671658 seconds. > > 52 tests, 104 assertions, 0 failures, 0 errors > /usr/bin/ruby1.8 -Ilib:test > "/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" > Errors running test:units! > > dir : /home/rails/.cruise/projects/my_project/work > command : ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; > load ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << > ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" > executed command : echo /home/rails/.cruise/projects/my_project/work > rails$ ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; load > ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << > ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" >> > /home/rails/.cruise/projects/my_project/build-108.3/build.log && > ruby1.8 -e "require ''rubygems'' rescue nil; require ''rake''; load > ''/srv/rails/cruisecontrolrb-1.3.0/tasks/cc_build.rake''; ARGV << > ''--nosearch'' << ''cc:build''; Rake.application.run; ARGV.clear" >> > /home/rails/.cruise/projects/my_project/build-108.3/build.log 2>&1 > exitstatus: 1 > STDERR TAIL START > > STDERR TAIL END > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20080911/2b9d0def/attachment.html>
On Thu, Sep 11, 2008 at 8:55 AM, Jason Edwards <jtanium at gmail.com> wrote:> I ran the builder for the project with the --trace flag, hoping that > would shed some light on the problem, but to no avail.Try running the same rake task that cruise runs, from your CI box command line, but not through cruise. You can do this from a clean checkout, or the cruise work dir for the project (but ideally these should be the same, because cruise''s working copy should have no changes). The task cruise is running will be either your default task, or the cruise task, or something you have overridden in your cruise_config.rb. It is not clear what that is from the output. When you run this manually, check the return code (echo $?). If it is non-zero, that is your problem - find out why. If it is zero, then somewhere rake is exiting with a nonzero return code, and you need to track it down, probably with debug statements. -- Chad
Bizarre... I went and added a task to my Rakefile, and I''m able to reproduce the problem, outside CC.rb (I got this from looking at the tasks/cc_build.rake file): task :cruise => :environment do Rake::Task[''db:test:purge''].invoke Rake::Task[''db:migrate''].invoke Rake::Task[''test''].invoke end The other suggestion from Jeremy, to set the project.rake_task to ''default'', allowed the build to pass, however, I''m sure that a database change would cause the build to fail, since the ''default'' task doesn''t run db:migrate. So it''s not a cruisecontrol issue at all... I''ll keep hacking on it, maybe find answer... Thanks, Jason On Thu, Sep 11, 2008 at 10:16 AM, Chad Woolley <thewoolleyman at gmail.com> wrote:> On Thu, Sep 11, 2008 at 8:55 AM, Jason Edwards <jtanium at gmail.com> wrote: >> I ran the builder for the project with the --trace flag, hoping that >> would shed some light on the problem, but to no avail. > > Try running the same rake task that cruise runs, from your CI box > command line, but not through cruise. You can do this from a clean > checkout, or the cruise work dir for the project (but ideally these > should be the same, because cruise''s working copy should have no > changes). The task cruise is running will be either your default > task, or the cruise task, or something you have overridden in your > cruise_config.rb. It is not clear what that is from the output. > > When you run this manually, check the return code (echo $?). If it is > non-zero, that is your problem - find out why. If it is zero, then > somewhere rake is exiting with a nonzero return code, and you need to > track it down, probably with debug statements. > > -- Chad > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >
Jeremy Lightsmith
2008-Sep-11 18:02 UTC
[Cruisecontrolrb-users] Tests Pass, But Build Fails
you could definitely choose to do something like either project.rake_task = "db:migrate default" or, you could also choose to add a "cruise" rake task to your project and do whatever you''d like to do there. or, you could choose to fix whatever is causing the default cruise stuff to break in the first place. Jeremy On Thu, Sep 11, 2008 at 10:54 AM, Jason Edwards <jtanium at gmail.com> wrote:> Bizarre... > > I went and added a task to my Rakefile, and I''m able to reproduce the > problem, outside CC.rb (I got this from looking at the > tasks/cc_build.rake file): > > task :cruise => :environment do > Rake::Task[''db:test:purge''].invoke > Rake::Task[''db:migrate''].invoke > Rake::Task[''test''].invoke > end > > The other suggestion from Jeremy, to set the project.rake_task to > ''default'', allowed the build to pass, however, I''m sure that a > database change would cause the build to fail, since the ''default'' > task doesn''t run db:migrate. > > So it''s not a cruisecontrol issue at all... I''ll keep hacking on it, > maybe find answer... > > Thanks, > > Jason > > On Thu, Sep 11, 2008 at 10:16 AM, Chad Woolley <thewoolleyman at gmail.com> > wrote: > > On Thu, Sep 11, 2008 at 8:55 AM, Jason Edwards <jtanium at gmail.com> > wrote: > >> I ran the builder for the project with the --trace flag, hoping that > >> would shed some light on the problem, but to no avail. > > > > Try running the same rake task that cruise runs, from your CI box > > command line, but not through cruise. You can do this from a clean > > checkout, or the cruise work dir for the project (but ideally these > > should be the same, because cruise''s working copy should have no > > changes). The task cruise is running will be either your default > > task, or the cruise task, or something you have overridden in your > > cruise_config.rb. It is not clear what that is from the output. > > > > When you run this manually, check the return code (echo $?). If it is > > non-zero, that is your problem - find out why. If it is zero, then > > somewhere rake is exiting with a nonzero return code, and you need to > > track it down, probably with debug statements. > > > > -- Chad > > _______________________________________________ > > Cruisecontrolrb-users mailing list > > Cruisecontrolrb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20080911/d48b3c70/attachment-0001.html>