Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
66feb6e8
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
66feb6e8
编写于
7月 07, 2017
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More cleanly separate out the build phases
上级
77c94b0c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
63 addition
and
51 deletion
+63
-51
build/scripts/build.ps1
build/scripts/build.ps1
+63
-51
未找到文件。
build/scripts/build.ps1
浏览文件 @
66feb6e8
...
...
@@ -12,14 +12,17 @@ param (
# Test options
[
switch
]
$test32
=
$false
,
[
switch
]
$test64
=
$false
,
[
switch
]
$testDeterminism
=
$false
,
[
switch
]
$testBuildCorrectness
=
$false
,
[
switch
]
$testPerfCorrectness
=
$false
,
[
switch
]
$testPerfRun
=
$false
,
[
switch
]
$testVsi
=
$false
,
[
switch
]
$testVsiNetCore
=
$false
,
[
switch
]
$testDesktop
=
$false
,
[
switch
]
$testCoreClr
=
$false
,
# Special test options
[
switch
]
$testDeterminism
=
$false
,
[
switch
]
$testBuildCorrectness
=
$false
,
[
switch
]
$testPerfCorrectness
=
$false
,
[
switch
]
$testPerfRun
=
$false
,
[
parameter
(
ValueFromRemainingArguments
=
$true
)]
$badArgs
)
Set-StrictMode
-version
2.0
...
...
@@ -41,8 +44,12 @@ function Print-Usage() {
Write-Host
" -testCoreClr Run CoreClr unit tests"
Write-Host
" -testVsi Run all integration tests"
Write-Host
" -testVsiNetCore Run just dotnet core integration tests"
Write-Host
""
Write-Host
"Special Test options"
Write-Host
" -testBuildCorrectness Run build correctness tests"
Write-Host
" -testDeterminism Run determinism tests"
Write-Host
" -testPerfCorrectness Run perf correctness tests"
Write-Host
" -testPerfCorrectness Run perf tests"
}
# Process the command line arguments and establish defaults for the values which
...
...
@@ -66,12 +73,14 @@ function Process-Arguments() {
exit
1
}
$
script
:
isAnyTestSpecial
=
$testBuildCorrectness
-or
$testDeterminism
-or
$testPerfCorrectness
-or
$testPerfRun
if
(
$isAnyTestSpecial
-and
(
$anyUnit
-or
$anyVsi
))
{
Write-Host
"Cannot combine special testing with any other action"
exit
1
}
$
script
:
test32
=
-not
$test64
$
script
:
debug
=
-not
$release
if
(
$testDeterminism
)
{
$
script
:
bootstrap
=
$true
}
}
function
Run-MSBuild
([
string
]
$buildArgs
=
""
,
[
string
]
$logFile
=
""
)
{
...
...
@@ -122,6 +131,44 @@ function Make-BootstrapBuild() {
return
$dir
}
function
Build-Artifacts
()
{
Run-MSBuild
"Roslyn.sln /p:Configuration=
$buildConfiguration
/p:DeployExtension=false"
if
(
$testDesktop
)
{
Run-MSBuild
"src\Samples\Samples.sln /p:Configuration=
$buildConfiguration
/p:DeployExtension=false"
}
Stop-BuildProcesses
}
# These are tests that don't follow our standard restore, build, test pattern. They customize
# the processes in order to test specific elements of our build and hence are handled
# separately from our other tests
function
Test-Special
()
{
if
(
$restore
)
{
Write-Host
"Running restore"
Restore-All
-msbuildDir
$msbuildDir
}
if
(
$testBuildCorrectness
)
{
Exec-Block
{
&
".\build\scripts\test-build-correctness.ps1"
-config
$buildConfiguration
}
|
Out-Host
}
elseif
(
$testDeterminism
)
{
$bootstrapDir
=
Make-BootstrapBuild
Exec-Block
{
&
".\build\scripts\test-determinism.ps1"
-bootstrapDir
$bootstrapDir
}
|
Out-Host
}
elseif
(
$testPerfCorrectness
)
{
Test-PerfCorrectness
}
elseif
(
$testPerfRun
)
{
Test-PerfRun
}
else
{
throw
"Not a special test"
}
}
function
Test-PerfCorrectness
()
{
Run-MSBuild
"Roslyn.sln /p:Configuration=
$buildConfiguration
/p:DeployExtension=false"
Exec-Block
{
&
".\Binaries\
$buildConfiguration
\Exes\Perf.Runner\Roslyn.Test.Performance.Runner.exe"
--ci-test
}
|
Out-Host
...
...
@@ -189,25 +236,7 @@ function Test-XUnit() {
return
}
# To help the VS SDK team track down their issues around install via build temporarily
# re-enabling the build based deployment
#
# https://github.com/dotnet/roslyn/issues/17456
$deployExtensionViaBuild
=
$false
if
(
$build
)
{
$deployArg
=
if
(
$deployExtensionViaBuild
)
{
"true"
}
else
{
"false"
}
Run-MSBuild
"Roslyn.sln /p:Configuration=
$buildConfiguration
/p:DeployExtension=
$deployArg
"
if
(
$testDesktop
)
{
Run-MSBuild
"src\Samples\Samples.sln /p:Configuration=
$buildConfiguration
/p:DeployExtension=false"
}
Stop-BuildProcesses
}
$anyVsi
=
$testVsi
-or
$TestVsiNetCore
if
(
$anyVsi
-and
(
-not
$deployExtensionViaBuild
))
{
if
(
$testVsi
-or
$testVsiNetCore
)
{
Deploy-VsixViaTool
}
...
...
@@ -397,45 +426,28 @@ try {
Redirect-Temp
}
if
(
$isAnyTestSpecial
)
{
Test-Special
exit
0
}
if
(
$restore
)
{
Write-Host
"Running restore"
Restore-All
-msbuildDir
$msbuildDir
}
if
(
$testBuildCorrectness
)
{
Exec-Block
{
&
".\build\scripts\test-build-correctness.ps1"
-config
$buildConfiguration
}
|
Out-Host
exit
0
}
if
(
$bootstrap
)
{
Write-Host
"Making bootstrap"
$bootstrapDir
=
Make-BootstrapBuild
}
if
(
$testDeterminism
)
{
Exec-Block
{
&
".\build\scripts\test-determinism.ps1"
-bootstrapDir
$bootstrapDir
}
|
Out-Host
exit
0
}
if
(
$testPerfCorrectness
)
{
Test-PerfCorrectness
exit
0
}
if
(
$testPerfRun
)
{
Test-PerfRun
exit
0
if
(
$build
)
{
Build-Artifacts
}
if
(
$testDesktop
-or
$testCoreClr
-or
$testVsi
-or
$testVsiNetCore
)
{
Test-XUnit
exit
0
}
if
(
$build
)
{
Run-MSBuild
"Roslyn.sln /p:Configuration=
$buildConfiguration
/p:DeployExtension=false"
}
exit
0
}
catch
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录