From 450b28367cdcbf10f855e43e0571915ebf9f09ca Mon Sep 17 00:00:00 2001 From: Adam Gross Date: Tue, 4 Aug 2020 09:21:23 -0400 Subject: Fix one merge issue and the test I added yesterday --- SCons/Node/FS.py | 4 ++-- SCons/Node/FSTests.py | 10 +++++----- 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') -- cgit v0.12