From dc5f851e787821733bc67c4a0328bc3db17be775 Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Fri, 19 Jan 2018 10:20:04 +0200 Subject: Provisioning: Add common shared folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Common shared folder includes scripts of files which are common for all operating system families. Changes under shared folder will trigger provisioning for all platforms Change-Id: I0789f87b76876d5f92673fe2f0e72d770e5f5ea4 Task-number: QTQAINFRA-1451 Reviewed-by: Tony Sarajärvi --- coin/provisioning/common/windows/libclang.ps1 | 2 +- coin/provisioning/common/windows/set-network-test-server.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'coin/provisioning/common/windows') diff --git a/coin/provisioning/common/windows/libclang.ps1 b/coin/provisioning/common/windows/libclang.ps1 index 9d857051..208d1ed4 100644 --- a/coin/provisioning/common/windows/libclang.ps1 +++ b/coin/provisioning/common/windows/libclang.ps1 @@ -4,7 +4,7 @@ param([Int32]$archVer=32) # PySide versions following 5.6 use a C++ parser based on Clang (http://clang.org/). # The Clang library (C-bindings), version 3.9 or higher is required for building. -Get-Content "$PSScriptRoot\..\sw_versions.txt" | Foreach-Object { +Get-Content "$PSScriptRoot\..\shared\sw_versions.txt" | Foreach-Object { $var = $_.Split('=') New-Variable -Name $var[0] -Value $var[1] $libclang_version = $libclang_version -replace '["."]' diff --git a/coin/provisioning/common/windows/set-network-test-server.ps1 b/coin/provisioning/common/windows/set-network-test-server.ps1 index 69059a2a..e6e92d48 100644 --- a/coin/provisioning/common/windows/set-network-test-server.ps1 +++ b/coin/provisioning/common/windows/set-network-test-server.ps1 @@ -35,7 +35,7 @@ # This script will set the network test server IP in to hosts file -$n = Get-Content "$PSScriptRoot\..\network_test_server_ip.txt" +$n = Get-Content "$PSScriptRoot\..\shared\network_test_server_ip.txt" $n = $n.Split('=') New-Variable -Name $n[0] -Value $n[1] -- cgit v1.2.3 From 462a2aae2b8ba298d893ba52d16c1b13435f04ff Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Mon, 24 Apr 2017 12:31:38 +0300 Subject: Provisioning: Add Squish provisioning for Release Test Automation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squish is required by RTA for testing. Task-number: QTQAINFRA-1523 Change-Id: I0c3653565f19cc9b798a0b63325c47b017cf5537 Reviewed-by: Joni Jäntti Reviewed-by: Matti Paaso --- coin/provisioning/common/windows/helpers.ps1 | 16 ++ coin/provisioning/common/windows/squishInstall.ps1 | 163 +++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 coin/provisioning/common/windows/squishInstall.ps1 (limited to 'coin/provisioning/common/windows') diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1 index f6a9fd90..4248d0ed 100644 --- a/coin/provisioning/common/windows/helpers.ps1 +++ b/coin/provisioning/common/windows/helpers.ps1 @@ -127,3 +127,19 @@ function is64bitWinHost return 0 } } + +Function Execute-Command +{ + Param ( + [string]$command + ) + Try { + echo "Executing command '$command'..." + $process = Start-Process -FilePath "cmd" -ArgumentList "/c $command" -PassThru -Wait -WindowStyle Hidden + if ($process.ExitCode) {throw "Error running command: '$command'"} + } + Catch { + $_.Exception.Message + exit 1 + } +} diff --git a/coin/provisioning/common/windows/squishInstall.ps1 b/coin/provisioning/common/windows/squishInstall.ps1 new file mode 100644 index 00000000..7641c9fe --- /dev/null +++ b/coin/provisioning/common/windows/squishInstall.ps1 @@ -0,0 +1,163 @@ +############################################################################# +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +. "$PSScriptRoot\helpers.ps1" + + +# This script will install squish package for Windows. +# Squish is need by Release Test Automation (RTA) + +$version = "6.3.0" +# Qt branch without dot (*.*) +$qtBranch = "59x" +$targetDir = "C:\Utils\squish" +$squishUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin" +$squishBranchUrl = "$squishUrl\$qtBranch" + +# Squish license +$licensePackage = ".squish-3-license" + +$OSVersion = (get-itemproperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName + +# This can be removed when using vanilla os +if((Test-Path -Path "$targetDir" )){ + try { + echo "Renaming old Squish" + echo "Rename-Item -ErrorAction 'Stop' $targetDir $targetDir_deleted" + Rename-Item -ErrorAction 'Stop' "$targetDir" squish_deleted + } catch {} +} + +Function DownloadAndInstallSquish { + + Param ( + [string]$version, + [string]$squishBranchUrl, + [string]$qtBranch, + [string]$bit, + [string]$targetDir, + [string]$squishPackage + ) + + $SquishUrl = $squishBranchUrl + "\squish-" + $version + "-qt" + $qtBranch + "-" + $bit + "-" + $squishPackage + ".exe" + $SquishInstaller = "$targetDir\$squishPackage.exe" + $SquishParameters = "unattended=1 targetdir=$targetDir\$squishPackage" + $Command = "$SquishInstaller $SquishParameters" + + echo "Fetching from URL ..." + Copy-Item "$SquishUrl" "$SquishInstaller" + echo "Installing Squish" + Execute-Command $Command + remove-item $SquishInstaller +} + +Function DownloadSquishLicence { + + Param ( + [string]$licensePackage, + [string]$squishUrl, + [string]$targetDir + ) + + # This can be removed when using vanilla os + if ($Env:SQUISH_LICENSEKEY_DIR) + { + echo "Removing SQUISH_LICENSEKEY_DIR env variable" + Remove-Item Env:\SQUISH_LICENSEKEY_DIR + } + + echo "Installing Squish license to home directory" + Copy-Item $squishUrl\$licensePackage ~\$licensePackage +} + +echo "Creating $targetDir" +New-Item -ErrorAction Ignore -ItemType directory -Path "$targetDir" + +DownloadSquishLicence $licensePackage $squishUrl $targetDir + +if(($OSVersion -eq "Windows 10 Enterprise") -or ($OSVersion -eq "Windows 8.1 Enterprise")) +{ + # Squish for Visual Studio 2015 + $squishPackage = "msvc14" + $squishPackage64bit = "msvc14_64" + + if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) + { + echo "Installing $squishPackage_64" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win64 $targetDir $squishPackage + mv $targetDir\$squishPackage $targetDir\$squishPackage64bit + } + + echo "Installing $squishPackage" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win32 $targetDir $squishPackage +} +if($OSVersion -eq "Windows 8.1 Enterprise") +{ + # Squish for Visual Studio 2013 + $squishPackage64bit = "msvc12_64" + + if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) + { + echo "Installing $squishPackage_64" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win64 $targetDir $squishPackage + mv $targetDir\$squishPackage $targetDir\$squishPackage64bit + } + else + { + echo "Change secret file to normal one" + attrib -h C:\Users\qt\.squish-3-license + } +} +else +{ + # Windows 7 + + # Squish for MinGW + $squishPackageMingw = "mingw_gcc53_posix_dwarf" + echo "Installing $squishPackageMingw" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win32 $targetDir $squishPackageMingw + mv $targetDir\$squishPackageMingw $targetDir\mingw + + # Squish for Visual Studio 2015 + $squishPackage = "msvc14" + $squishPackage64bit = "msvc14_64" + + if(($env:PROCESSOR_ARCHITECTURE -eq "AMD64") -or ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64")) + { + echo "Installing $squishPackage64bit" + DownloadAndInstallSquish $version $squishBranchUrl $qtBranch win64 $targetDir $squishPackage + mv $targetDir\$squishPackage $targetDir\$squishPackage64bit + } + + +} -- cgit v1.2.3