From 0ebacbb3db22e3783b67348463e79354de5ba26d Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 10 Oct 2023 20:00:11 +0200 Subject: [PATCH] Fix Cleanup of IceStorm DB Files The 'dbbir' variable was only initialized when 'createDb' is set to true. This resulted in files being left behind in the IceStorm/persistence test when using two instances, as shown in the following code snippet: ```python icestorm1 = IceStorm(createDb=True, cleanDb=False) icestorm2 = IceStorm(createDb=False, cleanDb=True) ``` --- scripts/IceStormUtil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/IceStormUtil.py b/scripts/IceStormUtil.py index f091de1c359..4e9caf90486 100644 --- a/scripts/IceStormUtil.py +++ b/scripts/IceStormUtil.py @@ -27,8 +27,8 @@ def getExe(self, current): def setup(self, current): # Create the database directory + self.dbdir = os.path.join(current.testsuite.getPath(), "{0}-{1}.db".format(self.instanceName, self.replica)) if self.createDb: - self.dbdir = os.path.join(current.testsuite.getPath(), "{0}-{1}.db".format(self.instanceName, self.replica)) if os.path.exists(self.dbdir): shutil.rmtree(self.dbdir) os.mkdir(self.dbdir)