summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeikki Halmet <heikki.halmet@qt.io>2018-02-14 15:48:58 +0200
committerLiang Qi <liang.qi@qt.io>2018-04-15 16:41:18 +0000
commit83f2a25f17020d8ff626ebf961d98e7cdcff5c26 (patch)
tree5443eef4ae10f0a60f5516b17bc8e04987e439de
parente8a60ed41bb838f40558ac39e496b4a1e32e9140 (diff)
Provisioning: Add test for squish installation
Squish is needed by RTA which is not run during normal qt5 build. Other words squish installation is not tested during integration. That's why we need separate test for it. This change will fetch test and run test suite which is made to check that squish installation works Task-number: QTQAINFRA-1733 Change-Id: I9284fd52d87767ae04022c3a6996e0bb972315dd Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io> Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Matti Paaso <matti.paaso@qt.io>
-rwxr-xr-xcoin/provisioning/common/unix/squishInstall.sh14
-rw-r--r--coin/provisioning/common/windows/squishInstall.ps125
2 files changed, 38 insertions, 1 deletions
diff --git a/coin/provisioning/common/unix/squishInstall.sh b/coin/provisioning/common/unix/squishInstall.sh
index b160b9ea..0ed9b0a0 100755
--- a/coin/provisioning/common/unix/squishInstall.sh
+++ b/coin/provisioning/common/unix/squishInstall.sh
@@ -51,6 +51,9 @@ fi
squishLicenseUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/coin/"
squishLicenseFile=".squish-3-license.tar.gz"
+testSuite="suite_test_squish"
+testSuiteUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/coin/"
+
# These checks can be removed when Vanilla OS for all linux and Mac are in
if [ -d "$squishFolder" ]; then
echo "Move old squish to /tmp"
@@ -151,3 +154,14 @@ MountAndInstall "$squishLicenseUrl" "$squishFolder" "$squishLicenseFile"
echo "Installing squish $version.."
MountAndInstall "$squishUrl" "$squishFolder" "$squishFile"
+
+echo "Installing test suite for squish"
+MountAndInstall "$testSuiteUrl" "$squishFolder" "$testSuite.tar.gz"
+
+echo "Verifying Squish Installation"
+if "$squishFolder/package/bin/squishrunner" --testsuite "$squishFolder/$testSuite" | grep "Squish test run successfully" ; then
+ echo "Squish installation tested successfully"
+else
+ echo "Squish test failed! Package wasn't installed correctly."
+ exit 1
+fi
diff --git a/coin/provisioning/common/windows/squishInstall.ps1 b/coin/provisioning/common/windows/squishInstall.ps1
index fe221890..04eb563b 100644
--- a/coin/provisioning/common/windows/squishInstall.ps1
+++ b/coin/provisioning/common/windows/squishInstall.ps1
@@ -1,6 +1,6 @@
#############################################################################
##
-## Copyright (C) 2017 The Qt Company Ltd.
+## Copyright (C) 2018 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -48,6 +48,8 @@ $qtBranch = "59x"
$targetDir = "C:\Utils\squish"
$squishUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin"
$squishBranchUrl = "$squishUrl\$qtBranch"
+$testSuite = "suite_test_squish"
+$testSuiteUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin\$testSuite.7z"
# Squish license
$licensePackage = ".squish-3-license"
@@ -77,9 +79,13 @@ Function DownloadAndInstallSquish {
$squishPackage64bit = "$squishPackage`_64"
}
Rename-Item $targetDir\$squishPackage $targetDir\$squishPackage64bit
+ TestSquish $squishPackage64bit
} else {
if ($squishPackage.StartsWith("mingw")) {
Rename-Item $targetDir\$squishPackage $targetDir\mingw
+ TestSquish mingw
+ } else {
+ TestSquish $squishPackage
}
}
}
@@ -93,10 +99,27 @@ Function DownloadSquishLicence {
Copy-Item $squishUrl\$licensePackage ~\$licensePackage
}
+Function TestSquish {
+ Param (
+ [string]$squishPackage
+ )
+
+ echo "Verifying Squish Installation"
+ if (cmd /c "$targetDir\$squishPackage\bin\squishrunner.exe --testsuite $targetDir\$testSuite" |Select-String -Pattern "Squish test run successfully") {
+ echo "Squish installation tested successfully!"
+ } else {
+ echo "Squish test failed! $squishPackage wasn't installed correctly."
+ [Environment]::Exit(1)
+ }
+}
Write-Host "Creating $targetDir"
New-Item -ErrorAction Ignore -ItemType directory -Path "$targetDir"
+Write-Host "Download and install Test Suite for squish"
+Copy-Item $testSuiteUrl $targetDir/$testSuite.7z
+Extract-7Zip $targetDir/$testSuite.7z $targetDir
+
DownloadSquishLicence $squishUrl
if ($OSVersion -eq "Windows 10 Enterprise") {