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 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'coin/provisioning/common/windows/helpers.ps1') 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 + } +} -- cgit v1.2.3