提交 c758f3e8 编写于 作者: J Jared Parsons 提交者: Jared Parsons

Move the unix legs to consume SDK 2.0

This changes the unix legs to use the 2.0 SDK. They are likely to suffer from the
same problem as the windows CoreClr leg in that they aren't producing XML files. But
we should be able to fix both of those at the same time.
上级 ddd4ccaa
......@@ -174,7 +174,8 @@
<Import Project="$(NuGetPackageRoot)\Microsoft.VSSDK.BuildTools\$(VisualStudioBuildToolsVersion)\build\Microsoft.VsSDK.BuildTools.props" />
</ImportGroup>
<Import Project="$(ToolsetCompilerPropsFilePath)" Condition="Exists('$(ToolsetCompilerPropsFilePath)') AND '$(BootstrapBuildPath)' == ''" />
<!-- PROTOTYPE undo the OS check -->
<Import Project="$(ToolsetCompilerPropsFilePath)" Condition="Exists('$(ToolsetCompilerPropsFilePath)') AND '$(BootstrapBuildPath)' == '' AND '$(OS)' == 'Windows_NT'" />
<!--
Language specifc settings
......
......@@ -21,14 +21,14 @@ fi
# This is a function to keep variable assignments out of the parent script (that is sourcing this file)
install_dotnet () {
# Download and install `dotnet` locally
local DOTNET_VERSION=1.0.1
local DOTNET_VERSION=2.0.0-preview3-006923
local THIS_DIR=$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)
local DOTNET_PATH=${THIS_DIR}/../../Binaries/dotnet-cli
if [[ ! -x "${DOTNET_PATH}/dotnet" ]]
then
echo "Downloading and installing .NET CLI version ${DOTNET_VERSION} to ${DOTNET_PATH}"
curl https://raw.githubusercontent.com/dotnet/cli/rel/${DOTNET_VERSION}/scripts/obtain/dotnet-install.sh | \
curl https://dot.net/v1/dotnet-install.sh | \
/usr/bin/env bash -s -- --version "${DOTNET_VERSION}" --install-dir "${DOTNET_PATH}"
else
echo "Skipping download of .NET CLI: Already installed at ${DOTNET_PATH}"
......
......@@ -9,21 +9,58 @@ BUILD_CONFIGURATION=${1:-Debug}
THIS_DIR=$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)
BINARIES_PATH=${THIS_DIR}/../../Binaries
SRC_PATH=${THIS_DIR}/../../src
TEST_DIR=${BINARIES_PATH}/${BUILD_CONFIGURATION}/CoreClrTest
SRC_PATH=${THIS_DIR}/../..
TEST_DIR=${BINARIES_PATH}/${BUILD_CONFIGURATION}/UnitTests
RUNTIME_ID=$(dotnet --info | awk '/RID:/{print $2;}')
TARGET_FRAMEWORK=netcoreapp2.0
# Need to publish projects that have runtime assets before running tests
NEED_PUBLISH=(
'src\Compilers\CSharp\Test\Symbol\CSharpCompilerSymbolTest.csproj'
)
BUILD_ARGS="--no-restore -c ${BUILD_CONFIGURATION} -consoleloggerparameters:Verbosity=minimal;summary -p:RuntimeIdentifier=${RUNTIME_ID} -p:TargetFramework=${TARGET_FRAMEWORK}"
for p in $NEED_PUBLISH
do
echo Publishing ${p}
dotnet publish --no-restore ${SRC_PATH}/${p} -p:RoslynRuntimeIdentifier=${RUNTIME_ID} -p:RuntimeIdentifier=${RUNTIME_ID} -p:TargetFramework=${TARGET_FRAMEWORK}
done
# Discover and run the tests
pushd ${TEST_DIR}
for d in *
do
TEST_PATH=${TEST_DIR}/${d}/${TARGET_FRAMEWORK}
PUBLISH_TEST_PATH=${TEST_PATH}/${RUNTIME_ID}/publish
if [ -d ${PUBLISH_TEST_PATH} ]
then
TEST_PATH=${PUBLISH_TEST_PATH}
fi
pushd $TEST_PATH
FILE_NAME=$(ls *.UnitTests.dll)
echo Running ${TEST_PATH}/${FILE_NAME}
dotnet vstest $FILE_NAME
if [ $? -ne 0 ]; then
echo Unit test failed
exit 1
fi
popd
done
popd
BUILD_ARGS="-c ${BUILD_CONFIGURATION} -r ${RUNTIME_ID} /consoleloggerparameters:Verbosity=minimal;summary /p:RoslynRuntimeIdentifier=${RUNTIME_ID}"
dotnet publish ${SRC_PATH}/Test/DeployCoreClrTestRuntime -o ${TEST_DIR} ${BUILD_ARGS}
#BUILD_ARGS="-c ${BUILD_CONFIGURATION} -r ${RUNTIME_ID} /consoleloggerparameters:Verbosity=minimal;summary /p:RoslynRuntimeIdentifier=${RUNTIME_ID}"
#dotnet publish ${SRC_PATH}/Test/DeployCoreClrTestRuntime -o ${TEST_DIR} ${BUILD_ARGS}
cd ${TEST_DIR}
#cd ${TEST_DIR}
mkdir -p xUnitResults
#mkdir -p xUnitResults
dotnet exec ./xunit.console.netcore.exe *.UnitTests.dll -parallel all -xml xUnitResults/TestResults.xml
#dotnet exec ./xunit.console.netcore.exe *.UnitTests.dll -parallel all -xml xUnitResults/TestResults.xml
if [ $? -ne 0 ]; then
echo Unit test failed
exit 1
fi
#if [ $? -ne 0 ]; then
# echo Unit test failed
# exit 1
#fi
......@@ -105,7 +105,7 @@ dotnet restore ${RESTORE_ARGS} ${THIS_DIR}/build/ToolsetPackages/BaseToolset.csp
echo "Restoring CrossPlatform.sln"
dotnet restore ${RESTORE_ARGS} ${THIS_DIR}/CrossPlatform.sln
BUILD_ARGS="-c ${BUILD_CONFIGURATION} -r ${RUNTIME_ID} /nologo /consoleloggerparameters:Verbosity=minimal;summary /filelogger /fileloggerparameters:Verbosity=normal;logFile=${BUILD_LOG_PATH} /p:RoslynRuntimeIdentifier=${RUNTIME_ID} /maxcpucount:1"
BUILD_ARGS="--no-restore -c ${BUILD_CONFIGURATION} -r ${RUNTIME_ID} /nologo /consoleloggerparameters:Verbosity=minimal;summary /filelogger /fileloggerparameters:Verbosity=normal;logFile=${BUILD_LOG_PATH} /p:RoslynRuntimeIdentifier=${RUNTIME_ID} /maxcpucount:1"
echo "Building bootstrap CscCore"
dotnet publish ${SRC_PATH}/Compilers/CSharp/CscCore -o ${BOOTSTRAP_PATH}/csc ${BUILD_ARGS}
......
......@@ -12,7 +12,7 @@
<StartupObject>Microsoft.CodeAnalysis.CSharp.CommandLine.Program</StartupObject>
<ServiceablePackage>true</ServiceablePackage>
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;osx.10.12-x64</RuntimeIdentifiers>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
......@@ -43,4 +43,4 @@
</ItemGroup>
<Import Project="..\..\Core\CommandLine\CommandLine.projitems" Label="Shared" />
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
......@@ -12,7 +12,7 @@
<StartupObject>Microsoft.CodeAnalysis.VisualBasic.CommandLine.Program</StartupObject>
<ServiceablePackage>true</ServiceablePackage>
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;osx.10.12-x64</RuntimeIdentifiers>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
......@@ -45,4 +45,4 @@
</ItemGroup>
<Import Project="..\..\Core\CommandLine\CommandLine.projitems" Label="Shared" />
<Import Project="..\..\..\..\build\Targets\Imports.targets" />
</Project>
\ No newline at end of file
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册