You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/08/10 11:17:23 UTC

svn commit: r1512581 - in /buildr/trunk: CHANGELOG lib/buildr/java/tests.rb spec/java/tests_spec.rb

Author: donaldp
Date: Sat Aug 10 09:17:23 2013
New Revision: 1512581

URL: http://svn.apache.org/r1512581
Log:
BUILDR-673 - Fix the option handling of the MultiTest test framework to behave as documented. Only the framework specific options are passed to the test. 
          
 Submitted by John Roth.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/java/tests.rb
    buildr/trunk/spec/java/tests_spec.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1512581&r1=1512580&r2=1512581&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sat Aug 10 09:17:23 2013
@@ -1,4 +1,7 @@
 1.4.13 (Pending)
+* Fixed:  BUILDR-673 - Fix the option handling of the MultiTest test
+          framework to behave as documented. Only the framework specific
+          options are passed to the test. Submitted by John Roth.
 * Added:  BUILDR-672 - Persist the properties field in the checkstyle
           addon so that they can be modified by the user. Submitted
           by Wim C.

Modified: buildr/trunk/lib/buildr/java/tests.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/tests.rb?rev=1512581&r1=1512580&r2=1512581&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/tests.rb (original)
+++ buildr/trunk/lib/buildr/java/tests.rb Sat Aug 10 09:17:23 2013
@@ -233,7 +233,7 @@ module Buildr #:nodoc:
           forking = {}
         when :each
           forking = { :fork=>true, :forkmode=>'perTest' }
-        when true, :once
+        when nil, true, :once
           forking = { :fork=>true, :forkmode=>'once' }
         else
           fail 'Option fork must be :once, :each or false.'
@@ -389,7 +389,7 @@ module Buildr #:nodoc:
       fail "Missing :frameworks option" unless options[:frameworks]
       @frameworks = options[:frameworks].map do |f|
         framework_options = (options[:options] || {})[f.to_sym] || {}
-        f.new(task, options)
+        f.new(task, framework_options)
       end
     end
 

Modified: buildr/trunk/spec/java/tests_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/tests_spec.rb?rev=1512581&r1=1512580&r2=1512581&view=diff
==============================================================================
--- buildr/trunk/spec/java/tests_spec.rb (original)
+++ buildr/trunk/spec/java/tests_spec.rb Sat Aug 10 09:17:23 2013
@@ -667,7 +667,7 @@ describe Buildr::MultiTest do
         }
       }
     JAVA
-    define('foo') { test.using :multitest, :frameworks => [ Buildr::JUnit, Buildr::TestNG ], :groups=>['included'] }
+    define('foo') { test.using :multitest, :frameworks => [ Buildr::JUnit, Buildr::TestNG ], :options => {:testng => {:groups=>['included']}} }
     lambda { project('foo').test.invoke }.should_not raise_error
   end
 
@@ -688,7 +688,7 @@ describe Buildr::MultiTest do
         public void annotated() {}
       }
     JAVA
-    define('foo') { test.using :multitest, :frameworks => [ Buildr::JUnit, Buildr::TestNG ], :excludegroups=>['excluded'] }
+    define('foo') { test.using :multitest, :frameworks => [ Buildr::JUnit, Buildr::TestNG ], :options => {:testng => {:excludegroups=>['excluded']}} }
     lambda { project('foo').test.invoke }.should_not raise_error
   end
 end