diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py
index 960417b829e0b33aad71e4ec78d35d78b01d19a0..b1b553eea2c5f2a478a30bc1ae9421a6c1e1d9d6 100644
--- a/tests/system/suite_general/tst_build_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_build_speedcrunch/test.py
@@ -44,17 +44,11 @@ def main():
 
 def init():
     global SpeedCrunchPath
-    SpeedCrunchPath = srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro"
+    SpeedCrunchPath = os.path.join(srcPath, "creator-test-data", "speedcrunch", "src", "speedcrunch.pro")
     cleanup()
 
 def cleanup():
     # Make sure the .user files are gone
     cleanUpUserFiles(SpeedCrunchPath)
-
-    BuildPath = glob.glob(srcPath + "/creator-test-data/speedcrunch/speedcrunch-build-*")
-    BuildPath += glob.glob(srcPath + "/creator-test-data/speedcrunch/qtcreator-build-*")
-
-    if BuildPath:
-        for dir in BuildPath:
-            if os.access(dir, os.F_OK):
-                shutil.rmtree(dir)
+    for dir in glob.glob(os.path.join(srcPath, "creator-test-data", "speedcrunch", "speedcrunch-build-*")):
+        deleteDirIfExists(dir)