Commit 27421b1a authored by Robert Loehning's avatar Robert Loehning

Squish: Check installed languages

Change-Id: I758381d67c431b4b7d6b7486f1d8561cf09c637b
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 45ec1bbe
......@@ -28,6 +28,7 @@
:CMake Wizard.Next_QPushButton {name='__qt__passive_wizardbutton1' text~='(Next.*|Continue)' type='QPushButton' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
:CMake Wizard.Run CMake_QPushButton {text='Run CMake' type='QPushButton' unnamed='1' visible='1' window=':CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard'}
:CMake Wizard_CMakeProjectManager::Internal::CMakeOpenProjectWizard {type='CMakeProjectManager::Internal::CMakeOpenProjectWizard' unnamed='1' visible='1' windowTitle='CMake Wizard'}
:Core__Internal__GeneralSettings.User Interface_QGroupBox {container=':qt_tabwidget_stackedwidget.Core__Internal__GeneralSettings_QWidget' name='interfaceBox' title='User Interface' type='QGroupBox' visible='1'}
:CppTools__Internal__CompletionSettingsPage.Behavior_QGroupBox {container=':qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget' name='groupBox' title='Behavior' type='QGroupBox' visible='1'}
:CreateProject_QStyleItem {clip='false' container=':Qt Creator_QDeclarativeView' enabled='true' text='Create Project' type='LinkedText' unnamed='1' visible='true'}
:DebugModeWidget.Breakpoints_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='Debugger.Docks.Break' type='QDockWidget' visible='1' windowTitle='Breakpoints'}
......@@ -111,10 +112,13 @@
:QtSupport__Internal__QtVersionManager.QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' type='QLabel' unnamed='1' visible='1'}
:QtSupport__Internal__QtVersionManager.qmake_QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qmakePath' type='QLabel' visible='1'}
:QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qtdirList' type='QTreeWidget' visible='1'}
:Restart required.OK_QPushButton {text='OK' type='QPushButton' unnamed='1' visible='1' window=':Restart required_QMessageBox'}
:Restart required_QMessageBox {text='The language change will take effect after a restart of Qt Creator.' type='QMessageBox' unnamed='1' visible='1'}
:Revert to Saved.Proceed_QPushButton {text='Proceed' type='QPushButton' unnamed='1' visible='1' window=':Revert to Saved_QMessageBox'}
:Revert to Saved_QMessageBox {text?='You will lose your current changes if you proceed reverting*' type='QMessageBox' unnamed='1' visible='1'}
:Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'}
:Symbol Server_Utils::CheckableMessageBox {type='Utils::CheckableMessageBox' unnamed='1' visible='1' windowTitle='Symbol Server'}
:User Interface.languageBox_QComboBox {container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'}
:addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'}
:fileNameEdit_QLineEdit {buddy=':Open File.File name:_QLabel' name='fileNameEdit' type='QLineEdit' visible='1'}
:formFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Form file:_QLabel' name='formFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
......@@ -122,6 +126,7 @@
:headerFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Header file:_QLabel' name='headerFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
:popupFrame_Proposal_QListView {container=':popupFrame_TextEditor::GenericProposalWidget' type='QListView' unnamed='1' visible='1'}
:popupFrame_TextEditor::GenericProposalWidget {name='m_popupFrame' type='TextEditor::GenericProposalWidget' visible='1'}
:qt_tabwidget_stackedwidget.Core__Internal__GeneralSettings_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Core__Internal__GeneralSettings' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.CppTools__Internal__CompletionSettingsPage_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='CppTools__Internal__CompletionSettingsPage' type='QWidget' visible='1'}
:qt_tabwidget_stackedwidget.Form_QWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='Help__Internal__GeneralSettingsPage' type='QWidget' visible='1' windowTitle='Form'}
:qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget {container=':Options.qt_tabwidget_stackedwidget_QStackedWidget' name='QtSupport__Internal__QtVersionManager' type='QtSupport::Internal::QtOptionsPageWidget' visible='1'}
......
......@@ -161,6 +161,17 @@ def substituteUnchosenTargetABIs(settingsDir):
os.remove(origToolchains)
test.log("Substituted unchosen ABIs inside toolchains.xml...")
def copySettingsToTmpDir():
global tmpSettingsDir
global SettingsPath
tmpSettingsDir = tempDir()
tmpSettingsDir = os.path.abspath(tmpSettingsDir + "/settings")
shutil.copytree(cwd, tmpSettingsDir)
if platform.system() in ('Linux', 'Darwin'):
substituteTildeWithinToolchains(tmpSettingsDir)
substituteUnchosenTargetABIs(tmpSettingsDir)
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
if platform.system() in ('Windows', 'Microsoft'):
sdkPath = "C:\\QtSDK"
cwd = os.getcwd() # current dir is directory holding qtcreator.py
......@@ -178,11 +189,5 @@ overrideStartApplication()
# the following only doesn't work if the test ends in an exception
if os.getenv("SYSTEST_NOSETTINGSPATH") != "1":
cwd = os.path.abspath(cwd)
tmpSettingsDir = tempDir()
tmpSettingsDir = os.path.abspath(tmpSettingsDir+"/settings")
shutil.copytree(cwd, tmpSettingsDir)
if platform.system() in ('Linux', 'Darwin'):
substituteTildeWithinToolchains(tmpSettingsDir)
substituteUnchosenTargetABIs(tmpSettingsDir)
copySettingsToTmpDir()
atexit.register(__removeTestingDir__)
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
......@@ -7,6 +7,6 @@ HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAP=../objects.map
TEST_CASES=tst_openqt_creator tst_build_speedcrunch tst_cmake_speedcrunch tst_create_proj_wizard
TEST_CASES=tst_openqt_creator tst_build_speedcrunch tst_cmake_speedcrunch tst_create_proj_wizard tst_installed_languages
VERSION=2
WRAPPERS=Qt
source("../../shared/qtcreator.py")
def main():
for lang in testData.dataset("languages.tsv"):
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
invokeMenuItem("Tools", "Options...")
waitForObjectItem(":Options_QListView", "Environment")
clickItem(":Options_QListView", "Environment", 14, 15, 0, Qt.LeftButton)
clickTab(waitForObject(":Options.qt_tabwidget_tabbar_QTabBar"), "General")
languageName = testData.field(lang, "language")
selectFromCombo(":User Interface.languageBox_QComboBox", languageName)
clickButton(waitForObject(":Options.OK_QPushButton"))
clickButton(waitForObject(":Restart required.OK_QPushButton"))
invokeMenuItem("File", "Exit")
overrideStartApplication()
startApplication("qtcreator" + SettingsPath)
try:
if languageName == "Chinese (China)" and platform.system() == 'Darwin':
invokeMenuItem("文件(F)", "退出")
else:
invokeMenuItem(testData.field(lang, "File"), testData.field(lang, "Exit"))
test.passes("Creator was running in %s translation." % languageName)
except:
test.fail("Creator seems to be missing %s translation" % languageName)
sendEvent("QCloseEvent", ":Qt Creator_Core::Internal::MainWindow")
__removeTestingDir__()
copySettingsToTmpDir()
"language" "File" "Exit"
"Czech (CzechRepublic)" "Soubor" "Ukončit"
"German (Germany)" "Datei" "Beenden"
"French (France)" "Fichier" "Quitter"
"Japanese (Japan)" "ファイル(F)" "終了(X)"
"Polish (Poland)" "Plik" "Zakończ"
"Russian (RussianFederation)" "Файл" "Выход"
"Slovenian (Slovenia)" "Datoteka" "Končaj"
"Chinese (China)" "文件(F)" "退出(X)"
"Chinese (Taiwan)" "檔案(F)" "離開(X)"
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