Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 6580bd6

Browse files
committed
Merge pull request #4 from ramarag/msic_test_cleanup
Changes to Miscellaneous test project and runtest
2 parents 26603c8 + 4cd70e5 commit 6580bd6

File tree

17 files changed

+48
-98
lines changed

17 files changed

+48
-98
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ dlldata.c
5858
*.tmp
5959
*.tmp_proj
6060
*.log
61+
*.html
6162
*.vspscc
6263
*.vssscc
6364
.builds

tests/buildtest.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if not defined __BuildArch set __BuildArch=x64
2121
if not defined __BuildType set __BuildType=debug
2222
if not defined __TestWorkingDir set __TestWorkingDir=%__ProjectFilesDir%\..\binaries\tests\%__BuildArch%\%__BuildType%
2323

24-
if not defined __LogsDir set __LogsDir=%__ProjectFilesDir%
24+
if not defined __LogsDir set __LogsDir=%__ProjectFilesDir%..\binaries\Logs
2525

2626
set __TestBuildLog=%__LogsDir%\Tests_%__BuildArch%__%__BuildType%.log
2727
set __XunitWrapperBuildLog=%__LogsDir%\Tests_XunitWrapper_%__BuildArch%__%__BuildType%.log

tests/runtest.cmd

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ if /i "%1" == "x64" (set __BuildArch=x64&set __MSBuildBuildArch=x64&shift&got
77

88
if /i "%1" == "debug" (set __BuildType=debug&shift&goto Arg_Loop)
99
if /i "%1" == "release" (set __BuildType=release&shift&goto Arg_Loop)
10-
if /i "%1" == "SkipWrapperGeneration" (set __SkipWrapperGeneration=yes&shift&goto Arg_Loop)
10+
if /i "%1" == "SkipWrapperGeneration" (set __SkipWrapperGeneration=true&shift&goto Arg_Loop)
1111

1212
if /i "%1" == "/?" (goto Usage)
1313

1414
set Core_Root=%1
15-
15+
shift
1616
:ArgsDone
1717
:: Check prerequisites
1818

@@ -38,7 +38,7 @@ if not defined __BuildArch set __BuildArch=x64
3838
if not defined __BuildType set __BuildType=debug
3939
if not defined __BinDir set __BinDir=%__ProjectFilesDir%..\binaries\Product\%__BuildArch%\%__BuildType%
4040
if not defined __TestWorkingDir set __TestWorkingDir=%__ProjectFilesDir%..\binaries\tests\%__BuildArch%\%__BuildType%
41-
if not defined __LogsDir set __LogsDir=%CD%
41+
if not defined __LogsDir set __LogsDir=%__ProjectFilesDir%..\binaries\Logs\
4242

4343
:: Default global test environmet variables
4444
if not defined XunitTestBinBase set XunitTestBinBase=%__TestWorkingDir%\
@@ -53,15 +53,17 @@ set Core_Root=%__BinDir%
5353
if not exist %XunitTestBinBase% echo Error: Ensure the Test Binaries are built and are present at %XunitTestBinBase%, Run - buildtest.cmd %__BuildArch% %__BuildType% to build the tests first. && exit /b 1
5454
if "%Core_Root%" == "" echo Error: Ensure you have done a successful build of the Product and Run - runtest BuildArch BuildType {path to product binaries}. && exit /b 1
5555
if not exist %Core_Root%\coreclr.dll echo Error: Ensure you have done a successful build of the Product and %Core_Root% contains runtime binaries. && exit /b 1
56-
56+
if not exist %__LogsDir% md %__LogsDir%
5757

5858
:SkipDefaultCoreRootSetup
5959
set __XunitWrapperBuildLog=%__LogsDir%\Tests_XunitWrapper_%__BuildArch%__%__BuildType%.log
6060
set __TestRunBuildLog=%__LogsDir%\TestRunResults_%__BuildArch%__%__BuildType%.log
61-
set __TestRunHtmlLog=%__LogsDir%\\TestRun_%__BuildArch%__%__BuildType%.html
61+
set __TestRunHtmlLog=%CD%\TestRun_%__BuildArch%_%__BuildType%.html
6262

63-
echo "Core_Root to be used will be %Core_Root%"
63+
echo "Core_Root that will be used is : %Core_Root%"
6464
echo "Starting The Test Run .. "
65+
if "%__SkipWrapperGeneration%"=="true" goto :preptests
66+
6567
:: Log build command line
6668
set _buildprefix=echo
6769
set _buildpostfix=^> "%__TestRunBuildLog%"
@@ -74,28 +76,51 @@ set _buildpostfix=
7476
set _buildappend=
7577
call :PerformXunitWrapperBuild
7678

79+
IF %BUILDERRORLEVEL% NEQ 0 echo XunitWrapperBuild build failed. Refer %__XunitWrapperBuildLog% for details. && exit /b %BUILDERRORLEVEL%
80+
81+
call :preptests
7782
goto :eof
7883

7984
:PerformXunitWrapperBuild
80-
if "%__SkipWrapperGeneration%"=="true" goto :preptests
8185

82-
%_buildprefix% %_msbuildexe% "%__ProjectFilesDir%runtest.proj" /p:NoRun=true /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__XunitWrapperBuildLog%";Append %* %_buildappend%%_buildpostfix%
86+
%_buildprefix% %_msbuildexe% "%__ProjectFilesDir%runtest.proj" /p:NoRun=true /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__XunitWrapperBuildLog%";Append %1 %_buildappend%%_buildpostfix%
87+
88+
set BUILDERRORLEVEL=%ERRORLEVEL%
89+
90+
goto :eof
8391

84-
IF ERRORLEVEL 1 echo XunitWrapperBuild build failed. Refer %__XunitWrapperBuildLog% for details. && exit /b 1
8592
:preptests
86-
%_buildprefix% if not "%noCore_RootSet%"=="true" goto :runtests %_buildpostfix%
87-
%_buildprefix% set Core_Root=%XunitTestBinBase%\Tests\Core_Root %_buildpostfix%
88-
%_buildprefix% rd /s /q %Core_Root% %_buildpostfix%
89-
%_buildprefix% md %Core_Root% %_buildpostfix%
90-
%_buildprefix% echo d | xcopy /s %__BinDir% %Core_Root% %_buildpostfix%
93+
:: Log build command line
94+
set _buildprefix=echo
95+
set _buildpostfix=^> "%__TestRunBuildLog%"
96+
set _buildappend=^>
97+
call :runtests
98+
99+
:: Build
100+
set _buildprefix=
101+
set _buildpostfix=
102+
set _buildappend=
103+
if not "%noCore_RootSet%"=="true" goto :runtests
104+
set Core_Root=%XunitTestBinBase%\Tests\Core_Root
105+
echo "Using Default Core_Root as %Core_Root% "
106+
echo "Copying Built binaries from %__BinDir% to %Core_Root%"
107+
if exist %Core_Root% rd /s /q %Core_Root%
108+
md %Core_Root%
109+
xcopy /s %__BinDir% %Core_Root%
110+
call :runtests
111+
112+
IF %BUILDERRORLEVEL% NEQ 0 echo Test Run failed. Refer %__TestRunBuildLog% for details. && exit /b %BUILDERRORLEVEL%
113+
goto :eof
91114

92115
:runtests
93-
%_buildprefix% %_msbuildexe% "%__ProjectFilesDir%runtest.proj" /p:NoBuild=true /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__TestRunBuildLog%";Append %* %_buildpostfix%
116+
%_buildprefix% %_msbuildexe% "%__ProjectFilesDir%runtest.proj" /p:NoBuild=true /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__TestRunBuildLog%";Append %1 %_buildpostfix%
117+
118+
set BUILDERRORLEVEL=%ERRORLEVEL%
119+
goto :eof
94120

95121
%_buildprefix% echo "Core_Root that was used is %Core_Root%" %_buildpostfix%
96122
echo "Find details of the run in %__TestRunHtmlLog%
97123

98-
IF ERRORLEVEL 1 echo Test Run failed. Refer %__TestRunBuildLog% for details. && exit /b 1
99124

100125
goto :eof
101126

@@ -109,3 +134,4 @@ echo BuildType can be: Debug, Release
109134
echo SkipWrapperGeneration- Optional parameter this will run the same set of tests as the last time it was run
110135
echo CORE_ROOT The path to the runtime
111136
goto :eof
137+

tests/src/Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,4 @@
4646
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
4747
</ItemGroup>
4848
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
49-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
50-
<PropertyGroup>
51-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
52-
</PropertyGroup>
53-
</Target>
54-
</Project>
49+
</Project>

tests/src/Common/Coreclr.TestWrapper/Coreclr.TestWrapper.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,4 @@
3737
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
3838
</ItemGroup>
3939
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
40-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
41-
<PropertyGroup>
42-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
43-
</PropertyGroup>
44-
</Target>
4540
</Project>

tests/src/Exceptions/Finalization/Finalizer.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,4 @@
3737
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
3838
</ItemGroup>
3939
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
40-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
41-
<PropertyGroup>
42-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
43-
</PropertyGroup>
44-
</Target>
45-
</Project>
40+
</Project>

tests/src/JIT/CodeGenBringUpTests/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,4 @@
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
3939
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
4040
</PropertyGroup>
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
4741
</Project>

tests/src/JIT/Directed/Arrays/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,4 @@
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
3939
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
4040
</PropertyGroup>
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
4741
</Project>

tests/src/Loader/regressions/classloader-generics/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,4 @@
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
3939
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
4040
</PropertyGroup>
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
4741
</Project>

tests/src/Loader/regressions/classloader/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,4 @@
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
3939
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
4040
</PropertyGroup>
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
4741
</Project>

tests/src/Loader/regressions/polyrec/Polyrec.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,4 @@
3838
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
3939
</ItemGroup>
4040
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
4641
</Project>

tests/src/Loader/typeinitialization/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,4 @@
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
3939
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
4040
</PropertyGroup>
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
4741
</Project>

tests/src/Regressions/assemblyref/assem.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,4 @@
3838
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
3939
</ItemGroup>
4040
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
</Project>
41+
</Project>

tests/src/Regressions/assemblyref/test.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,4 @@
4343
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
4444
</ItemGroup>
4545
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
46-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
47-
<PropertyGroup>
48-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
49-
</PropertyGroup>
50-
</Target>
5146
</Project>

tests/src/Regressions/common/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,4 @@
4343
</ProjectReference>
4444

4545
</ItemGroup>
46-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
47-
<PropertyGroup>
48-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
49-
</PropertyGroup>
50-
</Target>
51-
5246
</Project>

tests/src/Regressions/expl_double/expl_double.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,4 @@
3636
<None Include="packages.config" />
3737
</ItemGroup>
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
39-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
40-
<PropertyGroup>
41-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
42-
</PropertyGroup>
43-
</Target>
44-
</Project>
39+
</Project>

tests/src/Threading/ThreadStatics/cs_template.proj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,4 @@
3838
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
3939
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
4040
</PropertyGroup>
41-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
42-
<PropertyGroup>
43-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
44-
</PropertyGroup>
45-
</Target>
46-
4741
</Project>

0 commit comments

Comments
 (0)