forked from qt-creator/qt-creator
Change-Id: I1300fd9b7f136fa747f8f0063e232a2803548963 Reviewed-on: http://codereview.qt.nokia.com/4072 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bill King <bill.king@nokia.com>
37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
import platform;
|
|
import shutil;
|
|
import os;
|
|
import glob;
|
|
import atexit;
|
|
import codecs;
|
|
|
|
SDKPath = ''
|
|
SettingsPath = ''
|
|
tmpSettingsDir = ''
|
|
testSettings.logScreenshotOnFail = True
|
|
|
|
source("../../shared/utils.py")
|
|
source("../../shared/build_utils.py")
|
|
source("../../shared/mainwin.py")
|
|
|
|
def removeTmpSettingsDir():
|
|
snooze(5)
|
|
deleteDirIfExists(os.path.dirname(tmpSettingsDir))
|
|
|
|
if platform.system() in ('Windows', 'Microsoft'):
|
|
SDKPath = "C:/QtSDK/src"
|
|
cwd = os.getcwd() # current dir is directory holding qtcreator.py
|
|
cwd+="/../../settings/windows"
|
|
else:
|
|
SDKPath = os.path.expanduser("~/QtSDK/src")
|
|
cwd = os.getcwd() # current dir is directory holding qtcreator.py
|
|
cwd+="/../../settings/unix"
|
|
|
|
cwd = os.path.abspath(cwd)
|
|
tmpSettingsDir = tempDir()
|
|
tmpSettingsDir = os.path.abspath(tmpSettingsDir+"/settings")
|
|
shutil.copytree(cwd, tmpSettingsDir)
|
|
# the following only doesn't work if the test ends in an exception
|
|
atexit.register(removeTmpSettingsDir)
|
|
SettingsPath = " -settingspath %s" % tmpSettingsDir
|