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 2010/05/23 19:05:35 UTC

svn commit: r947444 - /buildr/trunk/spec/core/compile_spec.rb

Author: boisvert
Date: Sun May 23 17:05:35 2010
New Revision: 947444

URL: http://svn.apache.org/viewvc?rev=947444&view=rev
Log:
Something, somewhere must hold an exclusive file access lock when
'should force compilation if dependencies newer than compiled' is
run first.  I can't figure out what it is right now, so I'm changing
the execution order so things work.

Modified:
    buildr/trunk/spec/core/compile_spec.rb

Modified: buildr/trunk/spec/core/compile_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/compile_spec.rb?rev=947444&r1=947443&r2=947444&view=diff
==============================================================================
--- buildr/trunk/spec/core/compile_spec.rb (original)
+++ buildr/trunk/spec/core/compile_spec.rb Sun May 23 17:05:35 2010
@@ -358,6 +358,15 @@ describe Buildr::CompileTask, '#invoke' 
     lambda { compile_task.from(sources).invoke }.should_not run_task('foo:compile')
   end
 
+  it 'should not force compilation if dependencies older than compiled' do
+    jars; project('jars').task("package").invoke
+    time = Time.now
+    jars.each { |jar| File.utime(time - 1 , time - 1, jar) }
+    sources.map { |src| File.utime(time, time, src); src.pathmap("#{compile_task.target}/thepackage/%n.class") }.
+      each { |kls| write kls ; File.utime(time, time, kls) }
+    lambda { compile_task.from(sources).with(jars).invoke }.should_not run_task('foo:compile')
+  end
+
   it 'should force compilation if dependencies newer than compiled' do
     jars; project('jars').task("package").invoke
     # On my machine the times end up the same, so need to push dependencies in the past.
@@ -369,15 +378,6 @@ describe Buildr::CompileTask, '#invoke' 
     lambda { compile_task.from(sources).with(jars).invoke }.should run_task('foo:compile')
   end
 
-  it 'should not force compilation if dependencies older than compiled' do
-    jars; project('jars').task("package").invoke
-    time = Time.now
-    jars.each { |jar| File.utime(time - 1 , time - 1, jar) }
-    sources.map { |src| File.utime(time, time, src); src.pathmap("#{compile_task.target}/thepackage/%n.class") }.
-      each { |kls| write kls ; File.utime(time, time, kls) }
-    lambda { compile_task.from(sources).with(jars).invoke }.should_not run_task('foo:compile')
-  end
-
   it 'should timestamp target directory if specified' do
     time = Time.now - 10
     mkpath compile_task.target.to_s