You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2009/10/01 00:41:49 UTC

svn commit: r820485 - in /buildr/trunk: CHANGELOG lib/buildr/core/test.rb spec/java/tests_spec.rb

Author: boisvert
Date: Wed Sep 30 22:41:48 2009
New Revision: 820485

URL: http://svn.apache.org/viewvc?rev=820485&view=rev
Log:
BUILDR-324: Regression - baseDir system property is not set when executing tests

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

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=820485&r1=820484&r2=820485&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Wed Sep 30 22:41:48 2009
@@ -26,6 +26,7 @@
           method fails if the package has a custom filename (Rhett Sutphin)
 * Fixed:  BUILDR-322 When specifying files (instead of directories) as sources for compile task, 
           Buildr uses target directory timestamp only (not compiled output timestamp)
+* Fixed:  BUILDR-324: Regression - baseDir system property is not set when executing tests
 
 1.3.4 (2009-04-21)
 * Added:  BUILDR-93 Add specs for ScalaCheck integration

Modified: buildr/trunk/lib/buildr/core/test.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/test.rb?rev=820485&r1=820484&r2=820485&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/test.rb (original)
+++ buildr/trunk/lib/buildr/core/test.rb Wed Sep 30 22:41:48 2009
@@ -443,6 +443,9 @@
       else
         info "Running tests in #{@project.name}"
         begin
+          # set the baseDir system property if not set
+          target = @project.test.compile.target.to_s
+          @framework.options[:properties] = { 'baseDir' => target }.merge(@framework.options[:properties] || {})
           @passed_tests = @framework.run(@tests, dependencies)
         rescue Exception=>ex
           error "Test framework error: #{ex.message}"

Modified: buildr/trunk/spec/java/tests_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/tests_spec.rb?rev=820485&r1=820484&r2=820485&view=diff
==============================================================================
--- buildr/trunk/spec/java/tests_spec.rb (original)
+++ buildr/trunk/spec/java/tests_spec.rb Wed Sep 30 22:41:48 2009
@@ -216,6 +216,7 @@
     JAVA
     define('foo').test.using :properties=>{ 'name'=>'value' }
     project('foo').test.invoke
+    project('foo').test.options[:properties]["baseDir"].should eql(project("foo").test.compile.target.to_s)
   end
 
   it 'should pass environment to JVM' do