Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
f611efcf
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,发现更多精彩内容 >>
未验证
提交
f611efcf
编写于
12月 14, 2017
作者:
A
Ashley Hauck
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add mono as a test runner
上级
9866191f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
101 addition
and
19 deletion
+101
-19
build.sh
build.sh
+13
-1
build/Targets/Tools.props
build/Targets/Tools.props
+1
-0
build/scripts/build_mono.sh
build/scripts/build_mono.sh
+16
-0
build/scripts/obtain_mono.sh
build/scripts/obtain_mono.sh
+26
-0
build/scripts/tests.sh
build/scripts/tests.sh
+33
-8
netci.groovy
netci.groovy
+8
-8
src/Compilers/CSharp/Test/Symbol/Symbols/Metadata/MetadataTypeTests.cs
.../CSharp/Test/Symbol/Symbols/Metadata/MetadataTypeTests.cs
+2
-1
src/Compilers/CSharp/Test/Symbol/Symbols/Metadata/PE/LoadingAttributes.cs
...harp/Test/Symbol/Symbols/Metadata/PE/LoadingAttributes.cs
+2
-1
未找到文件。
build.sh
浏览文件 @
f611efcf
...
...
@@ -16,6 +16,7 @@ usage()
echo
" --restore Restore projects required to build"
echo
" --build Build all projects"
echo
" --test Run unit tests"
echo
" --mono Run unit tests with mono"
echo
" --build-bootstrap Build the bootstrap compilers"
echo
" --use-bootstrap Use the built bootstrap compilers when running main build"
echo
" --bootstrap Implies --build-bootstrap and --use-bootstrap"
...
...
@@ -30,6 +31,7 @@ build_configuration=Debug
restore
=
false
build
=
false
test_
=
false
use_mono
=
false
build_bootstrap
=
false
use_bootstrap
=
false
stop_vbcscompiler
=
false
...
...
@@ -74,6 +76,10 @@ do
test_
=
true
shift
1
;;
--mono
)
use_mono
=
true
shift
1
;;
--build-bootstrap
)
build_bootstrap
=
true
shift
1
...
...
@@ -149,5 +155,11 @@ fi
if
[[
"
${
test_
}
"
==
true
]]
then
"
${
root_path
}
"
/build/scripts/tests.sh
"
${
build_configuration
}
"
if
[[
"
${
use_mono
}
"
==
true
]]
then
test_runtime
=
mono
else
test_runtime
=
dotnet
fi
"
${
root_path
}
"
/build/scripts/tests.sh
"
${
build_configuration
}
"
"
${
test_runtime
}
"
fi
build/Targets/Tools.props
浏览文件 @
f611efcf
...
...
@@ -5,5 +5,6 @@
<dotnetRuntimeVersion>
2.0.0
</dotnetRuntimeVersion>
<dotnetSdkVersion>
2.2.0-preview1-007622
</dotnetSdkVersion>
<nugetExeVersion>
4.3.0
</nugetExeVersion>
<monoVersion>
5.8.0.88
</monoVersion>
</PropertyGroup>
</Project>
build/scripts/build_mono.sh
0 → 100755
浏览文件 @
f611efcf
#!/usr/bin/env bash
mkdir
-p
../../Binaries/mono_build
cd
../../Binaries/mono_build
sudo
apt-get
install
git autoconf libtool automake build-essential mono-devel gettext cmake
PREFIX
=
$PWD
/mono
VERSION
=
5.8.0.88
curl https://download.mono-project.com/sources/mono/mono-
${
VERSION
}
.tar.bz2 |
tar
xj
pushd
mono-
$VERSION
./configure
--prefix
=
$PREFIX
make
make
install
popd
tar
czf mono-
${
VERSION
}
.tar.gz mono
build/scripts/obtain_mono.sh
0 → 100755
浏览文件 @
f611efcf
#!/usr/bin/env bash
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Source this script to ensure mono is installed and on the path.
# This is a function to keep variable assignments out of the parent script (that is sourcing this file)
install_mono
()
{
# Download and install `mono` locally
local
THIS_DIR
=
"
$(
cd
-P
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
source
"
${
THIS_DIR
}
"
/build-utils.sh
local
MONO_VERSION
=
"
$(
get_tool_version mono
)
"
# the tar file has `mono` as the root directory
local
MONO_PATH
=
"
${
THIS_DIR
}
"
/../../Binaries/Tools
if
[[
!
-x
"
${
MONO_PATH
}
/mono/bin/mono"
]]
then
echo
"Downloading mono
${
MONO_VERSION
}
"
mkdir
-p
"
${
MONO_PATH
}
"
curl
-L
https://roslyninfra.blob.core.windows.net/jenkins/mono/mono-
${
MONO_VERSION
}
.tar.gz |
tar
xz
-C
"
${
MONO_PATH
}
"
fi
export
PATH
=
"
${
MONO_PATH
}
/mono/bin:
${
PATH
}
"
}
install_mono
build/scripts/tests.sh
浏览文件 @
f611efcf
...
...
@@ -6,6 +6,7 @@ set -e
set
-u
build_configuration
=
${
1
:-
Debug
}
runtime
=
${
2
:-
dotnet
}
this_dir
=
"
$(
cd
-P
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
source
"
${
this_dir
}
"
/build-utils.sh
...
...
@@ -15,9 +16,19 @@ binaries_path="${root_path}"/Binaries
unittest_dir
=
"
${
binaries_path
}
"
/
"
${
build_configuration
}
"
/UnitTests
log_dir
=
"
${
binaries_path
}
"
/
"
${
build_configuration
}
"
/xUnitResults
nuget_dir
=
"
${
HOME
}
"
/.nuget/packages
target_framework
=
netcoreapp2.0
xunit_console_version
=
"
$(
get_package_version dotnet-xunit
)
"
xunit_console
=
"
${
nuget_dir
}
"
/dotnet-xunit/
"
${
xunit_console_version
}
"
/tools/
"
${
target_framework
}
"
/xunit.console.dll
if
[[
"
${
runtime
}
"
==
"dotnet"
]]
;
then
target_framework
=
netcoreapp2.0
xunit_console
=
"
${
nuget_dir
}
"
/dotnet-xunit/
"
${
xunit_console_version
}
"
/tools/
${
target_framework
}
/xunit.console.dll
elif
[[
"
${
runtime
}
"
==
"mono"
]]
;
then
source
${
root_path
}
/build/scripts/obtain_mono.sh
target_framework
=
net461
xunit_console
=
"
${
nuget_dir
}
"
/dotnet-xunit/
"
${
xunit_console_version
}
"
/tools/net452/xunit.console.exe
else
echo
"Unknown runtime:
${
runtime
}
"
exit
1
fi
UNAME
=
"
$(
uname
)
"
if
[
"
$UNAME
"
==
"Darwin"
]
;
then
...
...
@@ -37,6 +48,7 @@ echo "Using ${xunit_console}"
# Discover and run the tests
mkdir
-p
"
${
log_dir
}
"
exit_code
=
0
for
test_path
in
"
${
unittest_dir
}
"
/
*
/
"
${
target_framework
}
"
do
file_name
=(
"
${
test_path
}
"
/
*
.UnitTests.dll
)
...
...
@@ -45,17 +57,30 @@ do
runtimeconfig_json
=
"
${
file_name
%.*
}
"
.runtimeconfig.json
# If the user specifies a test on the command line, only run that one
# "${
2
:-}" => take second arg, empty string if unset
if
[[
(
"
${
2
:-}
"
!=
""
)
&&
(!
"
${
file_name
}
"
=
~
"
${
2
:-}
"
)
]]
# "${
3
:-}" => take second arg, empty string if unset
if
[[
(
"
${
3
:-}
"
!=
""
)
&&
(!
"
${
file_name
}
"
=
~
"
${
2
:-}
"
)
]]
then
echo
"Skipping
${
file_name
}
"
continue
fi
echo
Running
"
${
file_name
[@]
}
"
dotnet
exec
--depsfile
"
${
deps_json
}
"
--runtimeconfig
"
${
runtimeconfig_json
}
"
"
${
xunit_console
}
"
"
${
file_name
[@]
}
"
-xml
"
${
log_file
}
"
if
[[
$?
-ne
0
]]
;
then
echo
Unit
test
failed
exit
1
if
[[
"
${
runtime
}
"
==
"dotnet"
]]
;
then
runner
=
"dotnet exec --depsfile
${
deps_json
}
--runtimeconfig
${
runtimeconfig_json
}
"
elif
[[
"
${
runtime
}
"
==
"mono"
]]
;
then
runner
=
mono
if
[[
"
${
file_name
[@]
}
"
==
*
'Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.dll'
||
"
${
file_name
[@]
}
"
==
*
'Roslyn.Compilers.CompilerServer.UnitTests.dll'
]]
then
echo
"Skipping
${
file_name
[@]
}
"
continue
fi
fi
if
${
runner
}
"
${
xunit_console
}
"
"
${
file_name
[@]
}
"
-xml
"
${
log_file
}
"
then
echo
"Assembly
${
file_name
[@]
}
passed"
else
echo
"Assembly
${
file_name
[@]
}
failed"
exit_code
=
1
fi
done
exit
${
exit_code
}
netci.groovy
浏览文件 @
f611efcf
...
...
@@ -99,11 +99,11 @@ commitPullList.each { isPr ->
}
}
// Ubuntu 1
4
.04
// Ubuntu 1
6
.04
commitPullList
.
each
{
isPr
->
def
jobName
=
Utilities
.
getFullJobName
(
projectName
,
"ubuntu_1
4
_debug"
,
isPr
)
def
jobName
=
Utilities
.
getFullJobName
(
projectName
,
"ubuntu_1
6
_debug"
,
isPr
)
def
myJob
=
job
(
jobName
)
{
description
(
"Ubuntu 1
4
.04 tests"
)
description
(
"Ubuntu 1
6
.04 tests"
)
steps
{
shell
(
"./build/scripts/cibuild.sh --debug"
)
}
...
...
@@ -111,18 +111,18 @@ commitPullList.each { isPr ->
def
triggerPhraseOnly
=
false
def
triggerPhraseExtra
=
"linux"
Utilities
.
setMachineAffinity
(
myJob
,
'Ubuntu1
4
.04'
,
'latest-or-auto'
)
Utilities
.
setMachineAffinity
(
myJob
,
'Ubuntu1
6
.04'
,
'latest-or-auto'
)
Utilities
.
addXUnitDotNETResults
(
myJob
,
'**/xUnitResults/*.xml'
)
addRoslynJob
(
myJob
,
jobName
,
branchName
,
isPr
,
triggerPhraseExtra
,
triggerPhraseOnly
)
}
// Ubuntu 16.04
// Ubuntu 16.04
mono
commitPullList
.
each
{
isPr
->
def
jobName
=
Utilities
.
getFullJobName
(
projectName
,
"ubuntu_16_debug"
,
isPr
)
def
jobName
=
Utilities
.
getFullJobName
(
projectName
,
"ubuntu_16_
mono_
debug"
,
isPr
)
def
myJob
=
job
(
jobName
)
{
description
(
"Ubuntu 16.04 tests"
)
description
(
"Ubuntu 16.04
mono
tests"
)
steps
{
shell
(
"./build/scripts/cibuild.sh --debug"
)
shell
(
"./build/scripts/cibuild.sh --debug
--mono
"
)
}
}
...
...
src/Compilers/CSharp/Test/Symbol/Symbols/Metadata/MetadataTypeTests.cs
浏览文件 @
f611efcf
...
...
@@ -492,7 +492,8 @@ class [mscorlib]System.Collections.Generic.IEnumerator`1<object>,
Assert
.
Equal
(
stateMachineClass
,
comp
.
GetTypeByMetadataName
(
"C+<I<System.Int32>.F>d__0"
));
// GetTypeByMetadataName works.
}
[
Fact
]
[
ConditionalFact
(
typeof
(
ClrOnly
))]
[
WorkItem
(
23761
,
"https://github.com/dotnet/roslyn/issues/23761"
)]
// reason for skipping mono
public
void
EmptyNamespaceNames
()
{
var
ilSource
=
...
...
src/Compilers/CSharp/Test/Symbol/Symbols/Metadata/PE/LoadingAttributes.cs
浏览文件 @
f611efcf
...
...
@@ -1316,8 +1316,9 @@ public void M1(decimal d1 = -7)
});
}
[
Fact
]
[
ConditionalFact
(
typeof
(
ClrOnly
))
]
[
WorkItem
(
530209
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530209"
)]
[
WorkItem
(
23760
,
"https://github.com/dotnet/roslyn/issues/23760"
)]
// reason for skipping Mono
public
void
Bug530209_DecimalConstant_FromIL
()
{
var
ilSource
=
@"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录