aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/system/Readme.txt3
-rw-r--r--Tests/system/shared/utils.py11
2 files changed, 11 insertions, 3 deletions
diff --git a/Tests/system/Readme.txt b/Tests/system/Readme.txt
index 93d931d7..a24616d3 100644
--- a/Tests/system/Readme.txt
+++ b/Tests/system/Readme.txt
@@ -10,3 +10,6 @@ To run these tests:
Please note: The tests will run in your normal working environment. Settings you made may influence
the tests and vice versa.
+
+Some tests require the following environment variables to be set to the correct values:
+SQUISH_VSTOOLS_VERSION: The expected version of Qt VS Tools
diff --git a/Tests/system/shared/utils.py b/Tests/system/shared/utils.py
index e7551895..a7f4756d 100644
--- a/Tests/system/shared/utils.py
+++ b/Tests/system/shared/utils.py
@@ -83,6 +83,12 @@ def changesScheduledLabelExists():
def readExpectedVsToolsVersion():
+ expectedVersion = os.getenv("SQUISH_VSTOOLS_VERSION")
+ if expectedVersion:
+ return expectedVersion
+ test.warning("No expected Qt VS Tools version set.",
+ "The environment variable SQUISH_VSTOOLS_VERSION is not set. Falling back to "
+ "reading the expected version from version.targets")
try:
versionXml = minidom.parse("../../../../version.targets")
return versionXml.getElementsByTagName("QtVSToolsVersion")[0].firstChild.data
@@ -94,9 +100,8 @@ def readExpectedVsToolsVersion():
def verifyVsToolsVersion():
displayedVersion = waitForObjectExists(names.manage_Extensions_Version_Label).text
expectedVersion = readExpectedVsToolsVersion()
- test.verify(expectedVersion and displayedVersion.startswith(expectedVersion),
- "Expected version of VS Tools is displayed? Displayed: %s, Expected: %s"
- % (displayedVersion, expectedVersion))
+ test.compare(displayedVersion, expectedVersion,
+ "Expected version of VS Tools is displayed?")
def openVsToolsMenu(version):