summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Gross <grossag@vmware.com>2020-08-04 13:21:23 (GMT)
committerAdam Gross <grossag@vmware.com>2020-08-04 13:21:23 (GMT)
commit450b28367cdcbf10f855e43e0571915ebf9f09ca (patch)
tree0c8b68ce89fe81df5c37818571342d1ced9060f9
parenta1bd89e2ad398574b060976f7f2f1030c5f3585a (diff)
downloadSCons-450b28367cdcbf10f855e43e0571915ebf9f09ca.zip
SCons-450b28367cdcbf10f855e43e0571915ebf9f09ca.tar.gz
SCons-450b28367cdcbf10f855e43e0571915ebf9f09ca.tar.bz2
Fix one merge issue and the test I added yesterday
-rw-r--r--SCons/Node/FS.py4
-rw-r--r--SCons/Node/FSTests.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/SCons/Node/FS.py b/SCons/Node/FS.py
index 044b3b6..bf0598b 100644
--- a/SCons/Node/FS.py
+++ b/SCons/Node/FS.py
@@ -2731,7 +2731,7 @@ class File(Base):
def get_content_hash(self):
"""
- Compute and return the MD5 hash for this file.
+ Compute and return the hash for this file.
"""
if not self.rexists():
return hash_signature('')
@@ -3624,7 +3624,7 @@ class File(Base):
cachedir, cachefile = self.get_build_env().get_CacheDir().cachepath(self)
if not self.exists() and cachefile and os.path.exists(cachefile):
- self.cachedir_csig = MD5filesignature(cachefile, File.hash_chunksize)
+ self.cachedir_csig = hash_file_signature(cachefile, File.hash_chunksize)
else:
self.cachedir_csig = self.get_csig()
return self.cachedir_csig
diff --git a/SCons/Node/FSTests.py b/SCons/Node/FSTests.py
index 77c6dbb..85f9f0e 100644
--- a/SCons/Node/FSTests.py
+++ b/SCons/Node/FSTests.py
@@ -2058,15 +2058,15 @@ class DirTestCase(_tempdirTestCase):
assert g.get_csig() + " g" == files[2], files
assert s.get_csig() + " sub" == files[3], files
- def test_md5_chunksize(self):
+ def test_hash_chunksize(self):
"""
- Test verifying that File.get_csig() correctly uses md5_chunksize. This
- variable is documented as the md5 chunksize in kilobytes. This test
- verifies that if the file size is less than the md5 chunksize,
+ Test verifying that File.get_csig() correctly uses hash_chunksize. This
+ variable is documented as the hash chunksize in kilobytes. This test
+ verifies that if the file size is less than the hash chunksize,
get_contents() is called; otherwise, it verifies that get_contents()
is not called.
"""
- chunksize_bytes = SCons.Node.FS.File.md5_chunksize
+ chunksize_bytes = SCons.Node.FS.File.hash_chunksize
test = self.test
test.subdir('chunksize_dir')