From 4a163bcd56821ded1ac74dd839f38a70da059447 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 11 Oct 2023 12:15:41 +0200 Subject: [PATCH] Fix Cleanup of IceStorm DB Files (#1544) 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)