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 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) {
|
||||
return configuration.toLowerCase() + '_' + os.toLowerCase()
|
||||
|
@ -28,6 +28,9 @@ def static getBuildJobName(def configuration, def os) {
|
|||
if (os == 'Windows_NT') {
|
||||
buildCommand = ".\\build.cmd -Configuration ${lowerConfiguration} Default"
|
||||
}
|
||||
else if (os == 'Windows_2016') {
|
||||
buildCommand = ".\\build.cmd -Configuration ${lowerConfiguration} -RunInstallerTestsInDocker Default"
|
||||
}
|
||||
else if (os == 'Ubuntu') {
|
||||
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)) {
|
||||
// Set the label.
|
||||
steps {
|
||||
if (os == 'Windows_NT') {
|
||||
if (os == 'Windows_NT' || os == 'Windows_2016') {
|
||||
// Batch
|
||||
batchFile(buildCommand)
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
param(
|
||||
[string]$Configuration="Debug",
|
||||
[switch]$NoPackage,
|
||||
[switch]$RunInstallerTestsInDocker,
|
||||
[switch]$Help)
|
||||
|
||||
if($Help)
|
||||
|
@ -15,6 +16,7 @@ if($Help)
|
|||
Write-Host "Options:"
|
||||
Write-Host " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
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 " <TARGETS...> The build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
exit 0
|
||||
|
@ -31,6 +33,11 @@ else
|
|||
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
||||
}
|
||||
|
||||
if ($RunInstallerTestsInDocker)
|
||||
{
|
||||
$env:RunInstallerTestsInDocker=1
|
||||
}
|
||||
|
||||
# Load Branch Info
|
||||
cat "$PSScriptRoot\..\branchinfo.txt" | ForEach-Object {
|
||||
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
|
||||
|
|
|
@ -69,10 +69,14 @@ try {
|
|||
|
||||
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)
|
||||
docker run `
|
||||
--rm `
|
||||
-v "$testBin\:D:" `
|
||||
-e "CLI_MSI=D:\$MsiFileName" `
|
||||
--net="none" `
|
||||
windowsservercore `
|
||||
D:\xunit.console.exe D:\$testName.dll | Out-Host
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue