summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@nokia.com>2011-09-23 20:40:57 +0200
committerRobert Löhning <robert.loehning@nokia.com>2011-09-26 12:22:07 +0200
commit08dfd0d08ab9ddaab5f92a52965348233d5c98fb (patch)
tree75ca1b7363444b0ffd014a367c508d089d18822f /tests
parent3281716d5eab2aac57fc21680bef553c3300880a (diff)
downloadqt-creator-08dfd0d08ab9ddaab5f92a52965348233d5c98fb.tar.gz
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: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/system/shared/qtcreator.py7
-rw-r--r--tests/system/suite_general/tst_basic_cpp_support/test.py12
-rw-r--r--tests/system/suite_general/tst_build_speedcrunch/test.py6
-rw-r--r--tests/system/suite_general/tst_cmake_speedcrunch/test.py6
-rw-r--r--tests/system/suite_general/tst_openqt_creator/test.py16
-rw-r--r--tests/system/suite_qtquick/tst_qml_editor/test.py2
-rw-r--r--tests/system/suite_qtquick/tst_qtquick_creation2/test.py2
7 files changed, 26 insertions, 25 deletions
diff --git a/tests/system/shared/qtcreator.py b/tests/system/shared/qtcreator.py
index 3e26176fcb..63f3a17ae2 100644
--- a/tests/system/shared/qtcreator.py
+++ b/tests/system/shared/qtcreator.py
@@ -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()
diff --git a/tests/system/suite_general/tst_basic_cpp_support/test.py b/tests/system/suite_general/tst_basic_cpp_support/test.py
index 3e96390b7c..26061e05e4 100644
--- a/tests/system/suite_general/tst_basic_cpp_support/test.py
+++ b/tests/system/suite_general/tst_basic_cpp_support/test.py
@@ -1,12 +1,12 @@
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):
diff --git a/tests/system/suite_general/tst_build_speedcrunch/test.py b/tests/system/suite_general/tst_build_speedcrunch/test.py
index b8036f1ef7..1ee7e6c8be 100644
--- a/tests/system/suite_general/tst_build_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_build_speedcrunch/test.py
@@ -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:
diff --git a/tests/system/suite_general/tst_cmake_speedcrunch/test.py b/tests/system/suite_general/tst_cmake_speedcrunch/test.py
index 0d0bd69322..57c40ddb64 100644
--- a/tests/system/suite_general/tst_cmake_speedcrunch/test.py
+++ b/tests/system/suite_general/tst_cmake_speedcrunch/test.py
@@ -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)
diff --git a/tests/system/suite_general/tst_openqt_creator/test.py b/tests/system/suite_general/tst_openqt_creator/test.py
index 9e66cb9b98..b880c44f82 100644
--- a/tests/system/suite_general/tst_openqt_creator/test.py
+++ b/tests/system/suite_general/tst_openqt_creator/test.py
@@ -1,13 +1,13 @@
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")
diff --git a/tests/system/suite_qtquick/tst_qml_editor/test.py b/tests/system/suite_qtquick/tst_qml_editor/test.py
index bed1b9e935..7905ccb8dd 100644
--- a/tests/system/suite_qtquick/tst_qml_editor/test.py
+++ b/tests/system/suite_qtquick/tst_qml_editor/test.py
@@ -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():
diff --git a/tests/system/suite_qtquick/tst_qtquick_creation2/test.py b/tests/system/suite_qtquick/tst_qtquick_creation2/test.py
index a74f2b6a71..780fd0afcc 100644
--- a/tests/system/suite_qtquick/tst_qtquick_creation2/test.py
+++ b/tests/system/suite_qtquick/tst_qtquick_creation2/test.py
@@ -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():