Do not rebuild targets when they are up to date
Store dependencies and file checksums in a cache file
This commit is contained in:
1 parent
8af27d7775
commit
119f3c9f0f
5 files changed
+110
-17
No files matched your search
@@ -17,6 +17,7 @@ describe Rscons do
|
||||
|
||||
before do
|
||||
$stdout.stub(:puts) { nil }
|
||||
Rscons::Cache.open.clear
|
||||
end
|
||||
|
||||
###########################################################################
|
||||
@@ -31,4 +32,14 @@ describe Rscons do
|
||||
`./simple`.should =~ /This is a simple C program/
|
||||
end
|
||||
end
|
||||
|
||||
it 'does not rebuild the program if no sources changed' do
|
||||
$stdout.should_receive(:puts).once.with('gcc -c -o simple.o simple.c')
|
||||
$stdout.should_receive(:puts).once.with('gcc -o simple simple.o')
|
||||
setup_testdir(['simple.c']) do
|
||||
env = Rscons::Environment.new
|
||||
env.Program('simple', 'simple.c')
|
||||
env.Program('simple', 'simple.c')
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user