add integration test to verify cache is written if a builder fails
This commit is contained in:
1 parent
3601359c08
commit
551b8fa365
2 files changed
+45
-2
No files matched your search
+12
-2
@@ -2,7 +2,6 @@ require "digest/md5"
|
||||
require "fileutils"
|
||||
require "json"
|
||||
require "set"
|
||||
require "singleton"
|
||||
require "rscons/version"
|
||||
|
||||
module Rscons
|
||||
@@ -51,7 +50,6 @@ module Rscons
|
||||
# },
|
||||
# }
|
||||
class Cache
|
||||
include Singleton
|
||||
|
||||
# Name of the file to store cache information in
|
||||
CACHE_FILE = ".rsconscache"
|
||||
@@ -59,6 +57,18 @@ module Rscons
|
||||
# Prefix for phony cache entries.
|
||||
PHONY_PREFIX = ":PHONY:"
|
||||
|
||||
class << self
|
||||
# Access the singleton instance.
|
||||
def instance
|
||||
@instance ||= Cache.new
|
||||
end
|
||||
|
||||
# Reset the cache (for unit/integration test purposes)
|
||||
def reset!
|
||||
@instance = nil
|
||||
end
|
||||
end
|
||||
|
||||
# Create a Cache object and load in the previous contents from the cache
|
||||
# file.
|
||||
def initialize
|
||||
|
||||
Reference in new issue
Block a user