summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/CacheDirTests.py
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2016-03-12 23:28:47 (GMT)
committerThomas Tanner <trtanner@btinternet.com>2016-03-12 23:28:47 (GMT)
commita014c40490ca3353d82476ca6a1db2ad80ca57fe (patch)
tree45ef50d57013cfb7ea0876f5b860e65fac4a1c6d /src/engine/SCons/CacheDirTests.py
parent56db17b7c0f733d1b33e07148f927149263bfc02 (diff)
downloadSCons-a014c40490ca3353d82476ca6a1db2ad80ca57fe.zip
SCons-a014c40490ca3353d82476ca6a1db2ad80ca57fe.tar.gz
SCons-a014c40490ca3353d82476ca6a1db2ad80ca57fe.tar.bz2
improve behaviour
Diffstat (limited to 'src/engine/SCons/CacheDirTests.py')
-rw-r--r--src/engine/SCons/CacheDirTests.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/engine/SCons/CacheDirTests.py b/src/engine/SCons/CacheDirTests.py
index 3b99d41..82fba8f 100644
--- a/src/engine/SCons/CacheDirTests.py
+++ b/src/engine/SCons/CacheDirTests.py
@@ -83,6 +83,11 @@ class BaseTestCase(unittest.TestCase):
#node.binfo.ninfo.bsig = bsig
return node
+ def tearDown(self):
+ os.remove(os.path.join(self._CacheDir.path, 'config'))
+ os.rmdir(self._CacheDir.path)
+ # Should that be shutil.rmtree?
+
class CacheDirTestCase(BaseTestCase):
"""
Test calling CacheDir code directly.
@@ -98,10 +103,12 @@ class CacheDirTestCase(BaseTestCase):
SCons.Util.MD5collect = my_collect
try:
- f5 = self.File("cd.f5", 'a_fake_bsig')
+ name = 'a_fake_bsig'
+ f5 = self.File("cd.f5", name)
result = self._CacheDir.cachepath(f5)
- dirname = os.path.join('cache', 'A_')
- filename = os.path.join(dirname, 'a_fake_bsig')
+ len = self._CacheDir.config['prefix_len']
+ dirname = os.path.join('cache', name.upper()[:len])
+ filename = os.path.join(dirname, name)
assert result == (dirname, filename), result
finally:
SCons.Util.MD5collect = save_collect