summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--QMTest/TestSCons.py15
-rw-r--r--test/Configure/VariantDir-SConscript.py2
2 files changed, 16 insertions, 1 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index 76b903f9..a8651d99 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -648,6 +648,21 @@ class TestSCons(TestCommon):
result.extend(sorted(glob.glob(p)))
return result
+ def unlink_sconsignfile(self,name='.sconsign.dblite'):
+ """
+ Delete sconsign file.
+ Note on python it seems to append .p3 to the file name so we take care of that
+ Parameters
+ ----------
+ name - expected name of sconsign file
+
+ Returns
+ -------
+ None
+ """
+ if sys.version_info[0] == 3:
+ name += '.p3'
+ self.unlink(name)
def java_ENV(self, version=None):
"""
diff --git a/test/Configure/VariantDir-SConscript.py b/test/Configure/VariantDir-SConscript.py
index c82778ae..ce264526 100644
--- a/test/Configure/VariantDir-SConscript.py
+++ b/test/Configure/VariantDir-SConscript.py
@@ -128,7 +128,7 @@ test.checkLogAndStdout( ["Checking for C header file math.h... ",
import shutil
shutil.rmtree(test.workpath(".sconf_temp"))
-test.unlink(".sconsign.dblite")
+test.unlink_sconsignfile(".sconsign.dblite")
# now with SConscriptChdir(1)
test.run(arguments='chdir=yes')