Commit 08dfd0d0 authored by Robert Loehning's avatar Robert Loehning Committed by Robert Löhning
Browse files

Squish: Improved path constants

Renamed the old constant SDKPath to srcPath because this is where sources are.
Added new constant sdkPath for the root directory of the Qt SDK installation.

Change-Id: I1b1f346554f58629a9d1882f90250f21708e4d22
Reviewed-on: http://codereview.qt-project.org/5474

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarChristian Stenger <christian.stenger@nokia.com>
parent 3281716d
......@@ -8,7 +8,7 @@ import subprocess;
import errno;
from datetime import datetime,timedelta;
SDKPath = ''
srcPath = ''
SettingsPath = ''
tmpSettingsDir = ''
testSettings.logScreenshotOnFail = True
......@@ -50,13 +50,14 @@ def __removeTmpSettingsDir__():
deleteDirIfExists(os.path.dirname(tmpSettingsDir))
if platform.system() in ('Windows', 'Microsoft'):
SDKPath = "C:/QtSDK/src"
sdkPath = "C:/QtSDK"
cwd = os.getcwd() # current dir is directory holding qtcreator.py
cwd+="/../../settings/windows"
else:
SDKPath = os.path.expanduser("~/QtSDK/src")
sdkPath = os.path.expanduser("~/QtSDK")
cwd = os.getcwd() # current dir is directory holding qtcreator.py
cwd+="/../../settings/unix"
srcPath = sdkPath + "/src"
cwd = os.path.abspath(cwd)
tmpSettingsDir = tempDir()
......
source("../../shared/qtcreator.py")
def main():
test.verify(os.path.exists(SDKPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro"))
test.verify(os.path.exists(srcPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro"))
startApplication("qtcreator" + SettingsPath)
prepareForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
openQmakeProject(SDKPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro")
openQmakeProject(srcPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro")
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000)
mouseClick(waitForObject(":*Qt Creator_Utils::FilterLineEdit", 20000), 5, 5, 0, Qt.LeftButton)
......@@ -81,11 +81,11 @@ def init():
def cleanup():
# Make sure the .user files are gone
if os.access(SDKPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro.user", os.F_OK):
os.remove(SDKPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro.user")
if os.access(srcPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro.user", os.F_OK):
os.remove(srcPath + "/creator/tests/manual/cplusplus-tools/cplusplus-tools.pro.user")
BuildPath = glob.glob(SDKPath + "/qtcreator-build-*")
BuildPath += glob.glob(SDKPath + "/projects-build-*")
BuildPath = glob.glob(srcPath + "/qtcreator-build-*")
BuildPath += glob.glob(srcPath + "/projects-build-*")
for dir in BuildPath:
if os.access(dir, os.F_OK):
......
......@@ -42,7 +42,7 @@ def main():
def init():
global SpeedCrunchPath
SpeedCrunchPath = SDKPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro"
SpeedCrunchPath = srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro"
cleanup()
def cleanup():
......@@ -50,8 +50,8 @@ def cleanup():
if os.access(SpeedCrunchPath + ".user", os.F_OK):
os.remove(SpeedCrunchPath + ".user")
BuildPath = glob.glob(SDKPath + "/creator-test-data/speedcrunch/speedcrunch-build-*")
BuildPath += glob.glob(SDKPath + "/creator-test-data/speedcrunch/qtcreator-build-*")
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:
......
......@@ -33,7 +33,7 @@ def main():
def init():
global SpeedCrunchPath
SpeedCrunchPath = SDKPath + "/creator-test-data/speedcrunch/src/CMakeLists.txt"
SpeedCrunchPath = srcPath + "/creator-test-data/speedcrunch/src/CMakeLists.txt"
cleanup()
def cleanup():
......@@ -41,12 +41,12 @@ def cleanup():
if os.access(SpeedCrunchPath + ".user", os.F_OK):
os.remove(SpeedCrunchPath + ".user")
BuildPath = SDKPath + "/creator-test-data/speedcrunch/src/qtcreator-build"
BuildPath = srcPath + "/creator-test-data/speedcrunch/src/qtcreator-build"
if os.access(BuildPath, os.F_OK):
shutil.rmtree(BuildPath)
# added because creator uses this one for me
BuildPath = SDKPath + "/creator-test-data/speedcrunch/qtcreator-build"
BuildPath = srcPath + "/creator-test-data/speedcrunch/qtcreator-build"
if os.access(BuildPath, os.F_OK):
shutil.rmtree(BuildPath)
source("../../shared/qtcreator.py")
def main():
test.verify(os.path.exists(SDKPath + "/creator/qtcreator.pro"))
test.verify(os.path.exists(SDKPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro"))
test.verify(os.path.exists(srcPath + "/creator/qtcreator.pro"))
test.verify(os.path.exists(srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro"))
startApplication("qtcreator" + SettingsPath)
openQmakeProject(SDKPath + "/creator/qtcreator.pro")
openQmakeProject(SDKPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro")
openQmakeProject(srcPath + "/creator/qtcreator.pro")
openQmakeProject(srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro")
# Wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 30000)
......@@ -41,7 +41,7 @@ def init():
def cleanup():
# Make sure the .user files are gone
if os.access(SDKPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro.user", os.F_OK):
os.remove(SDKPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro.user")
if os.access(SDKPath + "/creator/qtcreator.pro.user", os.F_OK):
os.remove(SDKPath + "/creator/qtcreator.pro.user")
if os.access(srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro.user", os.F_OK):
os.remove(srcPath + "/creator-test-data/speedcrunch/src/speedcrunch.pro.user")
if os.access(srcPath + "/creator/qtcreator.pro.user", os.F_OK):
os.remove(srcPath + "/creator/qtcreator.pro.user")
......@@ -20,7 +20,7 @@ def prepareTemplate():
global templateDir
templateDir = tempDir()
templateDir = os.path.abspath(templateDir + "/template")
sourceExample = os.path.abspath(SDKPath + "/../Examples/4.7/declarative/text/textselection")
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection")
shutil.copytree(sourceExample, templateDir)
def createNewQtQuickApplication():
......
......@@ -26,7 +26,7 @@ def prepareTemplate():
global templateDir
templateDir = tempDir()
templateDir = os.path.abspath(templateDir + "/template")
sourceExample = os.path.abspath(SDKPath + "/../Examples/4.7/declarative/text/textselection")
sourceExample = os.path.abspath(sdkPath + "/Examples/4.7/declarative/text/textselection")
shutil.copytree(sourceExample, templateDir)
def createNewQtQuickApplication():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment