Enable installer tests in our CI.
This commit is contained in:
parent
962411969e
commit
2685d282b8
3 changed files with 16 additions and 2 deletions
|
@ -8,7 +8,7 @@ import jobs.generation.Utilities;
|
||||||
def project = GithubProject
|
def project = GithubProject
|
||||||
def branch = GithubBranchName
|
def branch = GithubBranchName
|
||||||
|
|
||||||
def osList = ['Ubuntu', 'OSX', 'Windows_NT', 'CentOS7.1']
|
def osList = ['Ubuntu', 'OSX', 'Windows_NT', 'Windows_2016', 'CentOS7.1']
|
||||||
|
|
||||||
def static getBuildJobName(def configuration, def os) {
|
def static getBuildJobName(def configuration, def os) {
|
||||||
return configuration.toLowerCase() + '_' + os.toLowerCase()
|
return configuration.toLowerCase() + '_' + os.toLowerCase()
|
||||||
|
@ -28,6 +28,9 @@ def static getBuildJobName(def configuration, def os) {
|
||||||
if (os == 'Windows_NT') {
|
if (os == 'Windows_NT') {
|
||||||
buildCommand = ".\\build.cmd -Configuration ${lowerConfiguration} Default"
|
buildCommand = ".\\build.cmd -Configuration ${lowerConfiguration} Default"
|
||||||
}
|
}
|
||||||
|
else if (os == 'Windows_2016') {
|
||||||
|
buildCommand = ".\\build.cmd -Configuration ${lowerConfiguration} -RunInstallerTestsInDocker Default"
|
||||||
|
}
|
||||||
else if (os == 'Ubuntu') {
|
else if (os == 'Ubuntu') {
|
||||||
buildCommand = "./build.sh --skip-prereqs --configuration ${lowerConfiguration} --docker ubuntu Default"
|
buildCommand = "./build.sh --skip-prereqs --configuration ${lowerConfiguration} --docker ubuntu Default"
|
||||||
}
|
}
|
||||||
|
@ -39,7 +42,7 @@ def static getBuildJobName(def configuration, def os) {
|
||||||
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
|
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
|
||||||
// Set the label.
|
// Set the label.
|
||||||
steps {
|
steps {
|
||||||
if (os == 'Windows_NT') {
|
if (os == 'Windows_NT' || os == 'Windows_2016') {
|
||||||
// Batch
|
// Batch
|
||||||
batchFile(buildCommand)
|
batchFile(buildCommand)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
param(
|
param(
|
||||||
[string]$Configuration="Debug",
|
[string]$Configuration="Debug",
|
||||||
[switch]$NoPackage,
|
[switch]$NoPackage,
|
||||||
|
[switch]$RunInstallerTestsInDocker,
|
||||||
[switch]$Help)
|
[switch]$Help)
|
||||||
|
|
||||||
if($Help)
|
if($Help)
|
||||||
|
@ -15,6 +16,7 @@ if($Help)
|
||||||
Write-Host "Options:"
|
Write-Host "Options:"
|
||||||
Write-Host " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
Write-Host " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||||
Write-Host " -NoPackage Skip packaging targets"
|
Write-Host " -NoPackage Skip packaging targets"
|
||||||
|
Write-Host " -RunInstallerTestsInDocker Runs the .msi installer tests in a Docker container. Requires Windows 2016 TP4 or higher"
|
||||||
Write-Host " -Help Display this help message"
|
Write-Host " -Help Display this help message"
|
||||||
Write-Host " <TARGETS...> The build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
Write-Host " <TARGETS...> The build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -31,6 +33,11 @@ else
|
||||||
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($RunInstallerTestsInDocker)
|
||||||
|
{
|
||||||
|
$env:RunInstallerTestsInDocker=1
|
||||||
|
}
|
||||||
|
|
||||||
# Load Branch Info
|
# Load Branch Info
|
||||||
cat "$PSScriptRoot\..\branchinfo.txt" | ForEach-Object {
|
cat "$PSScriptRoot\..\branchinfo.txt" | ForEach-Object {
|
||||||
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
|
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
|
||||||
|
|
|
@ -69,10 +69,14 @@ try {
|
||||||
|
|
||||||
Write-Host "Running installer tests in Windows Container"
|
Write-Host "Running installer tests in Windows Container"
|
||||||
|
|
||||||
|
# --net="none" works around a networking issue on the containers on the CI machines.
|
||||||
|
# Since our installer tests don't require the network, it is fine to shut it off.
|
||||||
$MsiFileName = [System.IO.Path]::GetFileName($inputMsi)
|
$MsiFileName = [System.IO.Path]::GetFileName($inputMsi)
|
||||||
docker run `
|
docker run `
|
||||||
|
--rm `
|
||||||
-v "$testBin\:D:" `
|
-v "$testBin\:D:" `
|
||||||
-e "CLI_MSI=D:\$MsiFileName" `
|
-e "CLI_MSI=D:\$MsiFileName" `
|
||||||
|
--net="none" `
|
||||||
windowsservercore `
|
windowsservercore `
|
||||||
D:\xunit.console.exe D:\$testName.dll | Out-Host
|
D:\xunit.console.exe D:\$testName.dll | Out-Host
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue