Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Respond to PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
A-And committed Jan 27, 2018
1 parent 037ff38 commit 00c532c
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 24 deletions.
2 changes: 2 additions & 0 deletions src/Framework/Framework-uapaot.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<FileToInclude Include="System.Reflection.Primitives" />
<FileToInclude Include="System.Runtime.InteropServices" />
<FileToInclude Include="System.Text.RegularExpressions" />
<FileToInclude Include="System.Private.Xml" />
<FileToInclude Include="System.Private.Xml.Linq" />

<FileToInclude Include="System.Private.Reflection.Metadata.Ecma335" />
</ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion tests/CoreFX/build-and-run-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if not exist %TestFolder%\%TestExecutable%.exe (
:: Not a test we support yet, exit silently
exit /b 0
)

:: Workaround until we have a better reflection engine
:: Add name of currently executing test to rd.xml
powershell -Command "(Get-Content %TestFolder%\default.rd.xml).replace('*Application*', '%TestFileName%') | Set-Content %TestFolder%\default.rd.xml"
Expand All @@ -37,7 +38,11 @@ if "%CoreRT_BuildArch%" == "x64" (

echo Build %TestFileName%

call "%CoreRT_CliDir%\dotnet.exe" publish %TestFolder%\Test.csproj /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%CoreRT_ToolchainDir%" "/p:DebugSymbols=false" "/p:Configuration=%CoreRT_BuildType%" "/p:FrameworkLibPath=%~dp0..\..\bin\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\lib" "/p:FrameworkObjPath=%~dp0..\..\bin\obj\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\Framework" /p:DisableFrameworkLibGeneration=true /p:TestRootDir=%~dp0 /p:ExecutableName=%TestExecutable%
call "%CoreRT_CliDir%\dotnet.exe" publish %TestFolder%\Test.csproj /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%CoreRT_ToolchainDir%" "/p:DebugSymbols=false" "/p:Configuration=%CoreRT_BuildType%" "/p:FrameworkLibPath=%~dp0..\..\bin\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\lib" "/p:FrameworkObjPath=%~dp0..\..\bin\obj\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\Framework" /p:DisableFrameworkLibGeneration=true /p:TestRootDir=%~dp0 /p:ExecutableName=%TestExecutable% /nologo
if errorlevel 1 (
echo Building %TestFileName% failed
exit /b 1
)

echo Executing %TestFileName%

Expand Down
3 changes: 0 additions & 3 deletions tests/CoreFX/runtest/CoreFXTestHarness/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
<ItemGroup>
<!-- Some tests consist of multiple assemblies - make sure ILC sees them -->
<IlcCompileInput Include="$(MSBuildProjectDirectory)\*.dll" />
<!-- TODO Get both assemblies from somewhere else? -->
<IlcCompileInput Include="$(ToolsDir)System.Private.Xml.Linq.dll" />
<IlcCompileInput Include="$(ToolsDir)System.Private.Xml.dll" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

Expand Down
34 changes: 18 additions & 16 deletions tests/CoreFX/runtest/runtest.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ if not defined VS%__VSProductVersion%COMNTOOLS goto NoVS
set __VSToolsRoot=!VS%__VSProductVersion%COMNTOOLS!
if %__VSToolsRoot:~-1%==\ set "__VSToolsRoot=%__VSToolsRoot:~0,-1%"

set _msbuildexe="%VSINSTALLDIR%\MSBuild\15.0\Bin\MSBuild.exe"

if not exist !_msbuildexe! (echo Error: Could not find MSBuild.exe. Please see https://github.com/dotnet/corert/blob/master/Documentation/prerequisites-for-building.md for build instructions. && exit /b 1)

:: Set the environment for the build- VS cmd prompt
echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat"
call "%__VSToolsRoot%\VsDevCmd.bat"
Expand All @@ -78,18 +74,6 @@ if not defined VSINSTALLDIR (
exit /b 1
)

:: Note: We've disabled node reuse because it causes file locking issues.
:: The issue is that we extend the build with our own targets which
:: means that that rebuilding cannot successfully delete the task
:: assembly.
set __msbuildCommonArgs=/nologo /nodeReuse:false %__msbuildExtraArgs% /p:Platform=%__MSBuildBuildArch%

if not defined __Sequential (
set __msbuildCommonArgs=%__msbuildCommonArgs% /maxcpucount
) else (
set __msbuildCommonArgs=%__msbuildCommonArgs% /p:ParallelRun=false
)

:: Iterate through unzipped CoreFX tests
for /D %%i in ("%XunitTestBinBase%\*" ) do (
set TestFolderName=%%i
Expand All @@ -98,3 +82,21 @@ for /D %%i in ("%XunitTestBinBase%\*" ) do (
echo %FXCustomTestLauncher% !TestFolderName! !TestFileName!
call %FXCustomTestLauncher% !TestFolderName! !TestFileName!
)

exit /b 0

:Usage
echo.
echo Usage:
echo %0 BuildArch BuildType [SkipWrapperGeneration] [Exclude EXCLUSION_TARGETS] [TestEnv TEST_ENV_SCRIPT] [VSVersion] CORE_ROOT
echo where:
echo.
echo./? -? /h -h /help -help: view this message.
echo BuildArch- Optional parameter - x64 or x86 ^(default: x64^).
echo BuildType- Optional parameter - Debug, Release, or Checked ^(default: Debug^).
exit /b 1

:NoVS
echo Visual Studio 2017 ^(Community is free^) is a prerequisite to build this repository.
echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
exit /b 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
using System;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/// <summary>
/// This helper class is used to fetch CoreFX tests from a specified URL, unarchive them and create a flat directory structure
/// through which to iterate.
/// </summary>

using System;
using System.Collections.Generic;
using System.CommandLine;
using System.Diagnostics;
Expand Down
9 changes: 8 additions & 1 deletion tests/CoreFX/runtest/src/TestUtils/XUnit/ResultFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
using System;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/// <summary>
/// This helper class reads xunit xml log files and prints the tallied test results to the console
/// </summary>
using System;
using System.Collections.Generic;
using System.CommandLine;
using System.Diagnostics;
Expand Down
10 changes: 8 additions & 2 deletions tests/runtest.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,21 @@ goto :eof

:: Explicitly restore the test helper project
"%CoreRT_CliDir%\dotnet.exe" msbuild /t:Restore "%CoreRT_TestFileHelperProjectPath%"
if errorlevel 1 (
exit /b 1
)
"%CoreRT_CliDir%\dotnet.exe" msbuild /t:Restore "%CoreRT_XunitHelperProjectPath%"
if errorlevel 1 (
exit /b 1
)

:: Build the test helper project
:: Build the test helper projects
"%CoreRT_CliDir%\dotnet.exe" msbuild /m /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%CoreRT_ToolchainDir%" "/p:Configuration=%CoreRT_BuildType%" "/p:OSGroup=%CoreRT_BuildOS%" "/p:Platform=%CoreRT_BuildArch%" "/p:RepoLocalBuild=true" "/p:FrameworkLibPath=%CoreRT_TestRoot%..\bin\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\lib" "/p:FrameworkObjPath=%~dp0..\bin\obj\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\Framework" "/p:OutputPath=%CoreRT_TestingUtilitiesOutputDir%" /p:RepoLocalBuild=true "%CoreRT_TestFileHelperProjectPath%"
if errorlevel 1 (
exit /b 1
)

"%CoreRT_CliDir%\dotnet.exe" msbuild /m /ConsoleLoggerParameters:ForceNoAlign "/p:IlcPath=%CoreRT_ToolchainDir%" "/p:Configuration=%CoreRT_BuildType%" "/p:OSGroup=%CoreRT_BuildOS%" "/p:Platform=%CoreRT_BuildArch%" "/p:RepoLocalBuild=true" "/p:FrameworkLibPath=%CoreRT_TestRoot%..\bin\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\lib" "/p:FrameworkObjPath=%~dp0..\bin\obj\%CoreRT_BuildOS%.%CoreRT_BuildArch%.%CoreRT_BuildType%\Framework" "/p:OutputPath=%CoreRT_TestingUtilitiesOutputDir%" /p:RepoLocalBuild=true "%CoreRT_XunitHelperProjectPath%"

if errorlevel 1 (
exit /b 1
)
Expand Down

0 comments on commit 00c532c

Please sign in to comment.