Pawel Janiak
2013-Aug-16 10:39 UTC
Setup of rails repo for contribution and existing failing tests
I have 2 questions for anyone that contributes to Rails. 1. How have you setup your bash output to have colors when running the full test suite for easy parsing of red/green/yellow of the suite? 2. If you run the suite and there are failing tests, is that expected from time to time? https://travis-ci.org/rails/rails shows a green build but in this instance I get a failure on: *actionpack/test/controller/render_test.rb:1465* Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.
richard schneeman
2013-Aug-16 16:27 UTC
Re: Setup of rails repo for contribution and existing failing tests
If you have failing tests locally but they are passing on Travis make sure your master branch is at the same commit of the one Travis ran against. Sometimes failures do get pushed to master, though they''re (hopefully) fixed quickly, and you may have forked or cloned while master was actually failing. I like adding an `upstream` remote to my git config `git config -e` so I can quickly grab the latest from rails/rails master `git pull --rebase upstream master`. All tests should be passing, make sure you haven''t accidentally added anything to the files, also make sure to always run tests with `bundle exec`. After that it may be something setup with your environment, maybe try re-installing rubies, and/or ruby gems. Try it on a friends or co-workers computer to see if you get a failure there, then try to figure out the differences in environment. Worst case scenario if you cannot get that one single test passing and you want to contribute first run the tests against unchanged master (as you already did) and make note of failing tests. Then make your change in a branch, and re-run tests. If no additional tests fail it is likely safe to make a PR. Pull requests get tested against travis, so you will see if it fails on CI. Happy bug fixing, Richard Schneeman @schneems On Fri, Aug 16, 2013 at 5:39 AM, Pawel Janiak <brand.magnate@gmail.com>wrote:> I have 2 questions for anyone that contributes to Rails. > > > 1. How have you setup your bash output to have colors when running the > full test suite for easy parsing of red/green/yellow of the suite? > 2. If you run the suite and there are failing tests, is that expected > from time to time? https://travis-ci.org/rails/rails shows a green > build but in this instance I get a failure on: > > *actionpack/test/controller/render_test.rb:1465* > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscribe@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.
T.J. Schuck
2013-Aug-16 18:15 UTC
Re: Setup of rails repo for contribution and existing failing tests
Additionally, use the rails-dev-box for running the tests -- it''s a standardized environment with all necessary dependencies installed: https://github.com/rails/rails-dev-box On Fri, Aug 16, 2013 at 12:27 PM, richard schneeman < richard.schneeman@gmail.com> wrote:> If you have failing tests locally but they are passing on Travis make sure > your master branch is at the same commit of the one Travis ran against. > Sometimes failures do get pushed to master, though they''re (hopefully) > fixed quickly, and you may have forked or cloned while master was actually > failing. I like adding an `upstream` remote to my git config `git config > -e` so I can quickly grab the latest from rails/rails master `git pull > --rebase upstream master`. > > All tests should be passing, make sure you haven''t accidentally added > anything to the files, also make sure to always run tests with `bundle > exec`. After that it may be something setup with your environment, maybe > try re-installing rubies, and/or ruby gems. Try it on a friends or > co-workers computer to see if you get a failure there, then try to figure > out the differences in environment. > > Worst case scenario if you cannot get that one single test passing and you > want to contribute first run the tests against unchanged master (as you > already did) and make note of failing tests. Then make your change in a > branch, and re-run tests. If no additional tests fail it is likely safe to > make a PR. Pull requests get tested against travis, so you will see if it > fails on CI. > > Happy bug fixing, > Richard Schneeman > @schneems > > > > On Fri, Aug 16, 2013 at 5:39 AM, Pawel Janiak <brand.magnate@gmail.com>wrote: > >> I have 2 questions for anyone that contributes to Rails. >> >> >> 1. How have you setup your bash output to have colors when running >> the full test suite for easy parsing of red/green/yellow of the suite? >> 2. If you run the suite and there are failing tests, is that expected >> from time to time? https://travis-ci.org/rails/rails shows a green >> build but in this instance I get a failure on: >> >> *actionpack/test/controller/render_test.rb:1465* >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-core+unsubscribe@googlegroups.com. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> Visit this group at http://groups.google.com/group/rubyonrails-core. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscribe@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.