Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA82FCC7B for ; Mon, 23 Jul 2012 21:50:43 +0000 (UTC) Received: (qmail 44396 invoked by uid 500); 23 Jul 2012 21:50:43 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 44377 invoked by uid 500); 23 Jul 2012 21:50:43 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 44365 invoked by uid 99); 23 Jul 2012 21:50:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 21:50:43 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 21:50:37 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6NLoFDG016729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Jul 2012 17:50:15 -0400 Received: from [10.3.112.58] (ovpn-112-58.phx2.redhat.com [10.3.112.58]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6NLoEqp021054; Mon, 23 Jul 2012 17:50:15 -0400 Message-ID: <1343080214.808.5.camel@avon.watzmann.net> Subject: Re: [PATCH core 1/6] Core: Make exception reporting silent on tests From: David Lutterkort To: dev@deltacloud.apache.org Cc: mfojtik@redhat.com Date: Mon, 23 Jul 2012 14:50:14 -0700 In-Reply-To: <500D1457.2050902@redhat.com> References: <1342799117-25809-1-git-send-email-mfojtik@redhat.com> <500D1457.2050902@redhat.com> Organization: Red Hat Inc Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 2012-07-23 at 12:07 +0300, marios@redhat.com wrote: > On 20/07/12 18:45, mfojtik@redhat.com wrote: > > From: Michal Fojtik > > > > > > Signed-off-by: Michal fojtik > > --- > > server/lib/deltacloud/drivers/exceptions.rb | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/server/lib/deltacloud/drivers/exceptions.rb b/server/lib/deltacloud/drivers/exceptions.rb > > index a89b05f..d5a8bc3 100644 > > --- a/server/lib/deltacloud/drivers/exceptions.rb > > +++ b/server/lib/deltacloud/drivers/exceptions.rb > > @@ -177,7 +177,9 @@ module Deltacloud > > if exdef.match?($!) > > new_exception = exdef.handler($!) > > m = new_exception.message.nil? ? $!.message : new_exception.message > > - $stderr.send(report_method, "#{[$!.class.to_s, m].join(':')}\n#{$!.backtrace[0..10].join("\n")}") > > + unless ENV['RACK_ENV'] == 'test' > > + $stderr.send(report_method, "#{[$!.class.to_s, m].join(':')}\n#{$!.backtrace[0..10].join("\n")}") > > + end > > raise exdef.handler($!) unless new_exception.nil? > > end > > end > > > > ACK to series... nits: > > "rake test" fails with: no such file to load -- minitest/autorun (LoadError) > > "bundle exec rake test" runs fine, with test failures (I understand > these are expected at this point). Full trace follows FYI: I think it's time to apply the magic bundler patch below. Can anybody think of the downside of doing this (besides requiring bundler) ? What about checking in the Gemfile.lock ? diff --git a/server/Rakefile b/server/Rakefile index f232933..d4f4db5 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -20,6 +20,9 @@ require 'rake' require 'rake/testtask' require 'rubygems/package_task' +require "bundler/setup" + +Bundler.setup $top_srcdir = File.dirname(__FILE__) $:.unshift File.join($top_srcdir, 'lib') David