未验证 提交 7e70f3ec 编写于 作者: T Tomáš Rylek 提交者: GitHub

Infra fixes for bugs uncovered by testing of the JIT/Methodical merged tests (#67393)

* Move copying of merged wrapper native components to copynative step

* Move export of test exclusion file before ILLink changing CORE_ROOT

* Fix file mode for test execution bash scripts

* Add out-of-proc test folders to Helix work item payloads

* Fix Helix publishing in the presence of out-of-process tests

* Use a marker file triggered off of a project property to determine which files to skip running the Mono AOT compiler on (some tests fail at AOT time, so we need this to work around that limitation)

* Pass runtimeVariant to the Core_Root construction for the test exclusion list creation

* Don't write the output element when there's no test output. This causes issues with Helix test uploading.

* Write xunit results the way xharness expects to read them for wasm so we correctly report failures and don't report a test harness failure.

* Fix GeneratedTestRunner to build.

* Fix copying native wrappers for merged test runners.

Pre-emptively mark another test as RequiresProcessIsolation as I stumbled upon it while fixing this

* Fix copying of native test components to merged wrapper outputs

Due to Pri0 / Pri1 test grouping we may end up building the
wrapper in a different group than its components. Make sure that
we populate all native components of merged wrapper dependencies
before we copy them over to the merged wrapper output folder.

* Exclude wasm support files.
Co-authored-by: NJeremy Koritzinsky <jekoritz@microsoft.com>
上级 0dc0bee0
......@@ -300,7 +300,7 @@ jobs:
# Compose the Core_Root folder containing all artifacts needed for running
# CoreCLR tests. This step also compiles the framework using Crossgen / Crossgen2
# in ReadyToRun jobs.
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) generatelayoutonly $(logRootNameArg)Layout $(runtimeFlavorArgs) $(crossgenArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(librariesOverrideArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) generatelayoutonly $(logRootNameArg)Layout $(runtimeFlavorArgs) $(crossgenArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(librariesOverrideArg) $(runtimeVariantArg)
displayName: Generate CORE_ROOT
# Build a Mono LLVM AOT cross-compiler for non-amd64 targets (in this case, just arm64)
......
......@@ -306,8 +306,6 @@ $__Command msbuild $CORE_ROOT/wasm-test-runner/WasmTestRunner.proj /p:NetCoreApp
<![CDATA[
$(BashLinkerTestLaunchCmds)
export TestExclusionListPath=$CORE_ROOT/TestExclusionList.txt
_DebuggerArgsSeparator=
if [[ "$_DebuggerFullPath" == *lldb* ]];
then
......@@ -549,6 +547,7 @@ $(BashCLRTestExitCodePrep)
$(IlasmRoundTripBashScript)
# Allow precommands to override the ExePath
ExePath=$(InputAssemblyName)
export TestExclusionListPath=$CORE_ROOT/TestExclusionList.txt
# PreCommands
$(BashCLRTestPreCommands)
# Launch
......@@ -561,15 +560,23 @@ $(BashCLRTestExitCodeCheck)
</PropertyGroup>
<PropertyGroup>
<ExecutionBashScriptPath>$(OutputPath)/$(MSBuildProjectName).sh</ExecutionBashScriptPath>
</PropertyGroup>
<!-- Write the file.
Note: under the hood, this will rely on Environment.NewLine for line
endings. This means that if the scripts are being generated on Windows,
the line endings will need to be changed from CR-LF to Unix (LF) line
endings before running the scripts on Unix platforms. -->
endings before running the scripts on Unix platforms. In our current lab
infra it shouldn't really matter as the execution scripts are regenerated
in the 'test run' phase before sending the items to Helix i.o.w. at
the point where we already know the exact targeting platform. -->
<WriteLinesToFile
File="$(OutputPath)\$(MSBuildProjectName).sh"
File="$(ExecutionBashScriptPath)"
Lines="$(_CLRTestExecutionScriptText)"
Overwrite="true" />
<Exec Command="chmod +x $(ExecutionBashScriptPath)" EchoOff="true" />
</Target>
</Project>
......@@ -301,8 +301,6 @@ COPY /y %CORE_ROOT%\CoreShim.dll .
$(BatchLinkerTestLaunchCmds)
$(BatchCopyCoreShimLocalCmds)
set TestExclusionListPath=%CORE_ROOT%\TestExclusionList.txt
IF NOT "%CLRCustomTestLauncher%"=="" (
set LAUNCHER=call %CLRCustomTestLauncher% %scriptPath%
) ELSE (
......@@ -449,6 +447,7 @@ $(IlasmRoundTripBatchScript)
REM Allow precommands to override the ExePath
set ExePath=$(InputAssemblyName)
set TestExclusionListPath=%CORE_ROOT%\TestExclusionList.txt
REM Precommands
$(CLRTestBatchPreCommands)
......
......@@ -191,4 +191,7 @@
</Target>
<!-- At this point Common test dependencies don't have any native components -->
<Target Name="CopyAllNativeProjectReferenceBinaries" />
</Project>
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.DotNet.XHarness.Common;
using Microsoft.DotNet.XHarness.TestRunners.Common;
......@@ -15,16 +16,20 @@ public sealed class GeneratedTestRunner : TestRunner
TestFilter.ISearchClause? _filter;
Func<TestFilter?, TestSummary> _runTestsCallback;
HashSet<string> _testExclusionList;
private readonly Boolean _writeBase64TestResults;
public GeneratedTestRunner(
LogWriter logger,
Func<TestFilter?, TestSummary> runTestsCallback,
string assemblyName,
HashSet<string> testExclusionList)
HashSet<string> testExclusionList,
bool writeBase64TestResults)
:base(logger)
{
_assemblyName = assemblyName;
_runTestsCallback = runTestsCallback;
_testExclusionList = testExclusionList;
_writeBase64TestResults = writeBase64TestResults;
ResultsFileName = $"{_assemblyName}.testResults.xml";
}
......@@ -53,7 +58,17 @@ public override string WriteResultsToFile(XmlResultJargon xmlResultJargon)
public override void WriteResultsToFile(TextWriter writer, XmlResultJargon jargon)
{
Debug.Assert(jargon == XmlResultJargon.xUnit);
writer.WriteLine(LastTestRun.GetTestResultOutput(_assemblyName));
string lastTestResults = LastTestRun.GetTestResultOutput(_assemblyName);
if (_writeBase64TestResults)
{
byte[] encodedBytes = Encoding.Unicode.GetBytes(lastTestResults);
string base64Results = Convert.ToBase64String(encodedBytes);
writer.WriteLine($"STARTRESULTXML {encodedBytes.Length} {base64Results} ENDRESULTXML");
}
else
{
writer.WriteLine(lastTestResults);
}
}
public override void SkipTests(IEnumerable<string> tests)
......
......@@ -36,6 +36,12 @@ public static class RunnerEntryPoint
bool anyFailedTests = false;
entryPoint.TestsCompleted += (o, e) => anyFailedTests = e.FailedTests > 0;
await entryPoint.RunAsync();
if (OperatingSystem.IsBrowser())
{
// Browser expects all xharness processes to exit with 0, even in case of failure
return 0;
}
return anyFailedTests ? 1 : 0;
}
......@@ -65,7 +71,7 @@ sealed class AppleEntryPoint : iOSApplicationEntryPointBase
protected override bool IsXunit => true;
protected override TestRunner GetTestRunner(LogWriter logWriter)
{
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionList);
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionList, writeBase64TestResults: true);
if (_methodNameToRun is not null)
{
runner.SkipMethod(_methodNameToRun, isExcluded: false);
......@@ -103,7 +109,7 @@ sealed class AndroidEntryPoint : AndroidApplicationEntryPointBase
protected override bool IsXunit => true;
protected override TestRunner GetTestRunner(LogWriter logWriter)
{
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionList);
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionList, writeBase64TestResults: false);
if (_methodNameToRun is not null)
{
runner.SkipMethod(_methodNameToRun, isExcluded: false);
......@@ -151,7 +157,7 @@ sealed class WasmEntryPoint : WasmApplicationEntryPointBase
protected override bool IsXunit => true;
protected override TestRunner GetTestRunner(LogWriter logWriter)
{
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionList);
var runner = new GeneratedTestRunner(logWriter, _runTestsCallback, _assemblyName, _testExclusionList, writeBase64TestResults: true);
if (_methodNameToRun is not null)
{
runner.SkipMethod(_methodNameToRun, isExcluded: false);
......
......@@ -70,9 +70,10 @@ public string GetTestResultOutput(string assemblyName)
foreach (var test in _testResults)
{
resultsFile.Append($@"<test name=""{test.Name}"" type=""{test.ContainingTypeName}"" method=""{test.MethodName}"" time=""{test.Duration.TotalSeconds:F6}"" ");
string outputElement = !string.IsNullOrWhiteSpace(test.Output) ? $"<output><![CDATA[{test.Output}]]></output>" : string.Empty;
if (test.Exception is not null)
{
resultsFile.AppendLine($@"result=""Fail""><failure exception-type=""{test.Exception.GetType()}""><message><![CDATA[{test.Exception.Message}]]></message><stack-trace><![CDATA[{test.Exception.StackTrace}]]></stack-trace></failure><output><![CDATA[{test.Output}]]></output></test>");
resultsFile.AppendLine($@"result=""Fail""><failure exception-type=""{test.Exception.GetType()}""><message><![CDATA[{test.Exception.Message}]]></message><stack-trace><![CDATA[{test.Exception.StackTrace}]]></stack-trace></failure>{outputElement}</test>");
}
else if (test.SkipReason is not null)
{
......@@ -80,7 +81,7 @@ public string GetTestResultOutput(string assemblyName)
}
else
{
resultsFile.AppendLine($@" result=""Pass""><output><![CDATA[{test.Output}]]></output></test>");
resultsFile.AppendLine($@" result=""Pass"">{outputElement}</test>");
}
}
......
......@@ -282,7 +282,8 @@
<Target Name="DiscoverMergedTestWrappers">
<ItemGroup>
<_MergedWrapperMarker Include="$(TestBinDir)**\*.MergedTestAssembly" />
<!-- Exclude WASM support files. They can interfere with our discovery process and create extra work items that don't work. -->
<_MergedWrapperMarker Include="$(TestBinDir)**\*.MergedTestAssembly" Exclude="$(TestBinDir)**\supportFiles\*.MergedTestAssembly" />
</ItemGroup>
</Target>
......@@ -294,14 +295,22 @@
<_MergedWrapperRunScript Include="$([System.IO.Path]::ChangeExtension('%(_MergedWrapperMarker.Identity)', '.$(TestScriptExtension)'))" />
</ItemGroup>
<PropertyGroup>
<_MergedWrapperDirectory>%(_MergedWrapperRunScript.RootDir)%(Directory)</_MergedWrapperDirectory>
<_MergedWrapperDirectory>$([System.IO.Path]::GetDirectoryName('%(_MergedWrapperRunScript.Identity)'))</_MergedWrapperDirectory>
<_MergedWrapperParentDirectory>$([System.IO.Path]::GetDirectoryName('$(_MergedWrapperDirectory)'))</_MergedWrapperParentDirectory>
<_MergedWrapperName>%(_MergedWrapperRunScript.FileName)</_MergedWrapperName>
<_MergedWrapperRunScriptRelative Condition="'%(_MergedWrapperRunScript.Identity)' != ''">$([System.IO.Path]::GetRelativePath($(TestBinDir), %(_MergedWrapperRunScript.FullPath)))</_MergedWrapperRunScriptRelative>
</PropertyGroup>
<ItemGroup>
<_MergedWrapperOutOfProcessTestMarkers Include="$(_MergedWrapperParentDirectory)/**/*.OutOfProcessTest" />
<_MergedWrapperOutOfProcessTestFiles
Include="%(_MergedWrapperOutOfProcessTestMarkers.RootDir)%(_MergedWrapperOutOfProcessTestMarkers.Directory)/**"
Condition="'@(_MergedWrapperOutOfProcessTestMarkers)' != ''" />
</ItemGroup>
<ItemGroup>
<_MergedPayloadGroups Include="$(_MergedWrapperName)" />
<_MergedPayloadFiles Include="$(_MergedWrapperDirectory)**" />
<_MergedPayloadFiles Include="$(_MergedWrapperDirectory)/**" />
<_MergedPayloadFiles Include="@(_MergedWrapperOutOfProcessTestFiles)" />
<_MergedPayloadFiles Update="@(_MergedPayloadFiles)">
<!-- Never use [MSBuild]::MakeRelative here! We have some files containing Unicode characters in their %(FullPath) and
MakeRelative function calls Escape function internally that replaces all the Unicode characters with %<xx>. -->
......@@ -312,7 +321,7 @@
<ItemGroup>
<!-- Remove the managed pdbs from our payloads.
This is for performance reasons to reduce our helix payload size -->
<ReducedMergedPayloadFilesFinal Include="@(_MergedPayloadFiles)" Condition=" '%(Extension)' != '.pdb' " />
<ReducedMergedPayloadFilesFinal Include="@(_MergedPayloadFiles)" Condition=" '%(Extension)' != '.pdb' and '%(Extension)' != '.OutOfProcessTest' " />
</ItemGroup>
<Copy SourceFiles="@(ReducedMergedPayloadFilesFinal)" DestinationFiles="@(ReducedMergedPayloadFilesFinal->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileRelativeToPayloadsRootDirectory)')" />
......
......@@ -114,21 +114,6 @@
<SkipImportILTargets Condition="'$(CLRTestBuildAllTargets)' != '' And '$(CLRTestNeedTarget)' != '$(CLRTestBuildAllTargets)'">true</SkipImportILTargets>
</PropertyGroup>
<Target Name="CopyMergedWrapperReferences"
Condition="'$(IsMergedTestRunnerAssembly)' == 'true'"
AfterTargets="Build"
BeforeTargets="CopyNativeProjectBinaries">
<ItemGroup>
<MergedWrapperReferenceFolders Include="@(ProjectReference->'$([System.IO.Path]::GetFullPath('%(ProjectReference.Identity)/..', '$(OutDir)/..'))/%(ProjectReference.FileName)')" />
<!-- For merged project wrappers, include native libraries in all project references -->
<MergedWrapperReferenceFiles Include="%(MergedWrapperReferenceFolders.Identity)/*$(LibSuffix)" />
</ItemGroup>
<Copy SourceFiles="@(MergedWrapperReferenceFiles)"
DestinationFiles="@(MergedWrapperReferenceFiles->'$(OutDir)/%(FileName)%(Extension)')"
SkipUnchangedFiles="true"
/>
</Target>
<Target Name="CopyNativeProjectBinaries" Condition="'$(_CopyNativeProjectBinaries)' == 'true'">
<ItemGroup Condition="'$(UseVisualStudioNativeBinariesLayout)' == 'true'">
<NativeProjectBinaries Include="$(NativeProjectOutputFolder)\*.*" />
......@@ -225,9 +210,26 @@
<MSBuild Projects="$(MSBuildProjectFile)" Targets="CopyNativeProjectBinaries" Properties="NativeProjectOutputFolder=%(NativeProjectOutputFoldersToCopy.Identity)" Condition="'@(NativeProjectReference)' != ''" />
<MSBuild Projects="@(ProjectReference)"
Targets="CopyAllNativeProjectReferenceBinaries"
Condition="'$(IsMergedTestRunnerAssembly)' == 'true'"
BuildInParallel="true" />
</Target>
<Target Name="CopyAllNativeProjectReferenceBinaries" DependsOnTargets="ResolveCMakeNativeProjectReference;ConsolidateNativeProjectReference" />
<Target Name="CopyAllNativeProjectReferenceBinaries"
DependsOnTargets="ResolveCMakeNativeProjectReference;ConsolidateNativeProjectReference">
<ItemGroup Condition="'$(IsMergedTestRunnerAssembly)' == 'true'">
<MergedWrapperReferenceFolders Include="@(ProjectReference->'$([System.IO.Path]::GetFullPath('%(ProjectReference.Identity)/..', '$(OutDir)/..'))/%(ProjectReference.FileName)')" />
<!-- For merged project wrappers, include native libraries in all project references -->
<MergedWrapperReferenceFiles Include="%(MergedWrapperReferenceFolders.Identity)/*$(LibSuffix)" />
</ItemGroup>
<Copy SourceFiles="@(MergedWrapperReferenceFiles)"
DestinationFiles="@(MergedWrapperReferenceFiles->'$(OutDir)/%(FileName)%(Extension)')"
SkipUnchangedFiles="true"
Condition="'@(MergedWrapperReferenceFiles)' != ''"
/>
</Target>
<!-- Build shell or command scripts whenever we copy native binaries -->
<Import Project="$(MSBuildThisFileDirectory)Common\CLRTest.Execute.targets" />
......@@ -259,20 +261,40 @@
</ItemGroup>
</Target>
<Target Name="AfterBuild">
<Target Name="GenerateMarkerFiles" BeforeTargets="AssignTargetPaths">
<ItemGroup>
<Content Include="$(AssemblyName).reflect.xml" Condition="Exists('$(AssemblyName).reflect.xml')" CopyToOutputDirectory="PreserveNewest" />
<MarkerFile Include="$(IntermediateOutputPath)\$(MSBuildProjectName).MergedTestAssembly" Condition="'$(IsMergedTestRunnerAssembly)' == 'true'" />
<MarkerFile Include="$(IntermediateOutputPath)\$(AssemblyName).NoMonoAot" Condition="'$(MonoAotIncompatible)' == 'true'" />
<Content Include="@(MarkerFile)" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Copy SourceFiles="$(AssemblyName).reflect.xml"
DestinationFolder="$(OutputPath)"
Condition="Exists('$(AssemblyName).reflect.xml')"/>
<WriteLinesToFile
Condition="'$(IsMergedTestRunnerAssembly)' == 'true'"
File="$(OutputPath)\$(MSBuildProjectName).MergedTestAssembly"
Lines="MergedTestAssembly" />
File="$(IntermediateOutputPath)\$(MSBuildProjectName).MergedTestAssembly"
Lines="MergedTestAssembly"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
<WriteLinesToFile
Condition="'$(MonoAotIncompatible)' == 'true'"
File="$(IntermediateOutputPath)\$(AssemblyName).NoMonoAot"
Lines="NoMonoAot"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
<!-- We don't want the out-of-process test marker file to be included in referencing projects, so we don't include it as content. -->
<WriteLinesToFile
Condition="'$(RequiresProcessIsolation)' == 'true' and '$(BuildAsStandalone)' != 'true'"
File="$(OutputPath)\$(MSBuildProjectName).OutOfProcessTest"
Lines="OutOfProcessTest" />
Lines="OutOfProcessTest"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
</Target>
<PropertyGroup>
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="ForeignThreadExceptions.cs" />
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="PInvokeAssemblyMarshallingEnabled/*.cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(InteropCommonDir)CheckGCMode.cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnmanagedCallersOnlyTest.cs" />
......
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
<PropertyGroup>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
</Project>
\ No newline at end of file
project(object_pin_mirror)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_library(mirror SHARED mirror.cpp)
SET_TARGET_PROPERTIES(mirror PROPERTIES COMPILE_FLAGS "-c")
# add the install targets (this "installs" the native file on Windows systems)
install(TARGETS mirror DESTINATION bin)
# This "installs" the native file on System V systems
set_target_properties(mirror PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/mirror)
project(PInvokeExampleNative)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_library(PInvokeExampleNative SHARED pinvokeexamplenative.cpp)
SET_TARGET_PROPERTIES(PInvokeExampleNative PROPERTIES COMPILE_FLAGS "-c")
# add the install targets (this "installs" the native file on Windows systems)
install(TARGETS PInvokeExampleNative DESTINATION bin)
# This "installs" the native file on System V systems
set_target_properties(PInvokeExampleNative PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/PInvokeExampleNative)
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Embedded</DebugType>
......
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
......
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
......
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
......
......@@ -3,6 +3,7 @@
<OutputType>Library</OutputType>
<CLRTestKind>BuildOnly</CLRTestKind>
<GenerateRunScript>false</GenerateRunScript>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>Full</DebugType>
......
project(jitstructtests)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(SOURCES structinregs.cpp structinregs.def)
add_library(jitstructtests_lib SHARED ${SOURCES})
# add the install targets (this "installs" the native file on Windows systems)
install(TARGETS jitstructtests_lib DESTINATION bin)
# This "installs" the native file on System V systems
set_target_properties(jitstructtests_lib PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/structinregs)
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<GCStressIncompatible>true</GCStressIncompatible>
<NoWarn>$(NoWarn);xUnit1013</NoWarn>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>pdbonly</DebugType>
......
project(b108129_test2)
include_directories(${INC_PLATFORM_DIR})
set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_library(test2 SHARED test2.cpp)
SET_TARGET_PROPERTIES(test2 PROPERTIES COMPILE_FLAGS "-c")
# add the install targets (this "installs" the native file on Windows systems)
install(TARGETS test2 DESTINATION bin)
# This "installs" the native file on System V systems
set_target_properties(test2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/test2)
project(hfa_interop)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_library(hfa_simple_f32_native_cpp SHARED hfa_native.cpp)
SET_TARGET_PROPERTIES(hfa_simple_f32_native_cpp PROPERTIES COMPILE_FLAGS "-c -DSIMPLE_HFA -DFLOAT32")
......@@ -14,16 +12,3 @@ SET_TARGET_PROPERTIES(hfa_nested_f32_native_cpp PROPERTIES COMPILE_FLAGS "-c -DN
add_library(hfa_nested_f64_native_cpp SHARED hfa_native.cpp)
SET_TARGET_PROPERTIES(hfa_nested_f64_native_cpp PROPERTIES COMPILE_FLAGS "-c -DNESTED_HFA -DFLOAT64")
# add the install targets (this "installs" the native file on Windows systems)
install(TARGETS hfa_simple_f32_native_cpp DESTINATION bin)
install(TARGETS hfa_simple_f64_native_cpp DESTINATION bin)
install(TARGETS hfa_nested_f32_native_cpp DESTINATION bin)
install(TARGETS hfa_nested_f64_native_cpp DESTINATION bin)
# This "installs" the native file on System V systems
set_target_properties(hfa_simple_f32_native_cpp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/hfa_simple_f32_native_cpp)
set_target_properties(hfa_simple_f64_native_cpp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/hfa_simple_f64_native_cpp)
set_target_properties(hfa_nested_f32_native_cpp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/hfa_nested_f32_native_cpp)
set_target_properties(hfa_nested_f64_native_cpp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/hfa_nested_f64_native_cpp)
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
......
project(mcc_native)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_library(native_i0c SHARED native_i0c.cpp)
add_library(native_i1c SHARED native_i1c.cpp)
add_library(native_i3c SHARED native_i3c.cpp)
......@@ -17,39 +15,3 @@ add_library(native_i5s SHARED native_i5s.cpp)
add_library(native_i6s SHARED native_i6s.cpp)
add_library(native_i7s SHARED native_i7s.cpp)
add_library(native_i8s SHARED native_i8s.cpp)
# add the install targets (this "installs" the native file on Windows systems)
install(TARGETS native_i0c DESTINATION bin)
install(TARGETS native_i1c DESTINATION bin)
install(TARGETS native_i3c DESTINATION bin)
install(TARGETS native_i5c DESTINATION bin)
install(TARGETS native_i6c DESTINATION bin)
install(TARGETS native_i7c DESTINATION bin)
install(TARGETS native_i8c DESTINATION bin)
install(TARGETS native_i0s DESTINATION bin)
install(TARGETS native_i1s DESTINATION bin)
install(TARGETS native_i3s DESTINATION bin)
install(TARGETS native_i5s DESTINATION bin)
install(TARGETS native_i6s DESTINATION bin)
install(TARGETS native_i7s DESTINATION bin)
install(TARGETS native_i8s DESTINATION bin)
# This "installs" the native file on System V systems
set_target_properties(native_i0c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i0c)
set_target_properties(native_i1c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i1c)
set_target_properties(native_i3c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i3c)
set_target_properties(native_i5c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i5c)
set_target_properties(native_i6c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i6c)
set_target_properties(native_i7c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i7c)
set_target_properties(native_i8c PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i8c)
set_target_properties(native_i0s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i0s)
set_target_properties(native_i1s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i1s)
set_target_properties(native_i3s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i3s)
set_target_properties(native_i5s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i5s)
set_target_properties(native_i6s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i6s)
set_target_properties(native_i7s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i7s)
set_target_properties(native_i8s PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/native_i8s)
\ No newline at end of file
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
<PropertyGroup>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -4,6 +4,7 @@
<!-- The test cannot be run twice in the same process since it moves a native dll that it uses for pinvoke later -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<CLRTestPriority>1</CLRTestPriority>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
</PropertyGroup>
<ItemGroup>
<Compile Include="FromNativePaths.cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>Exe</OutputType>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="Validate.cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="case03.cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="case04.cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="case05.cs" />
......
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
<PropertyGroup>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<MonoAotIncompatible>true</MonoAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="Simple.cs" />
......
......@@ -109,7 +109,9 @@
<Target Name="MonoAotCompileTests" DependsOnTargets="GetListOfTestCmds;FindCmdDirectories">
<ItemGroup>
<AllTestScripts Include="%(TestDirectories.Identity)\**\*.sh" />
<AllTestScripts Condition="'@(TestDirectories)' != ''" Include="%(TestDirectories.Identity)\**\*.sh" />
<AllTestScripts Condition="'@(MergedRunnableTestPaths)' != ''" Include="%(MergedRunnableTestPaths.RootDir)%(MergedRunnableTestPaths.Directory)*.dll" />
<AllTestScripts Condition="'@(OutOfProcessTestPaths)' != ''" Include="%(OutOfProcessTestPaths.RootDir)%(OutOfProcessTestPaths.Directory)*.sh" />
<TestExclusions Include="@(ExcludeList->Metadata('FullPath'))" Condition="$(HaveExcludes)" />
<TestScripts Include="@(AllTestScripts)" Exclude="@(TestExclusions)" />
......@@ -121,7 +123,7 @@
<Output TaskParameter="Filtered" ItemName="TestDirs" />
</RemoveDuplicates>
<ItemGroup>
<TestsAndAssociatedAssemblies Include="%(TestDirs.Identity)/*.dll" />
<TestsAndAssociatedAssemblies Include="%(TestDirs.Identity)/*.dll" Exclude="@(NoMonoAotAssemblyPaths)" />
<CoreRootDlls Include="$(CORE_ROOT)/*.dll" Exclude="$(CORE_ROOT)/xunit.performance.api.dll" />
<AllDlls Condition="'$(MonoFullAot)' == 'true'" Include="@(TestsAndAssociatedAssemblies);@(CoreRootDlls)" />
<AllDlls Condition="'$(MonoFullAot)' != 'true'" Include="@(TestsAndAssociatedAssemblies)" />
......@@ -396,6 +398,8 @@
<MergedRunnableTestPaths Include="$([System.IO.Path]::ChangeExtension('%(MergedAssemblyMarkerPaths.Identity)', '.$(TestScriptExtension)'))" />
<OutOfProcessTestMarkerPaths Include="$(XunitTestBinBase)\**\*.OutOfProcessTest"/>
<OutOfProcessTestPaths Include="$([System.IO.Path]::ChangeExtension('%(OutOfProcessTestMarkerPaths.Identity)', '.$(TestScriptExtension)'))" />
<NoMonoAotMarkerPaths Include="$(XunitTestBinBase)\**\*.NoMonoAot" />
<NoMonoAotAssemblyPaths Include="$([System.IO.Path]::ChangeExtension('%(NoMonoAotMarkerPaths.Identity)', '.dll'))" />
</ItemGroup>
<!-- Remove the cmd/sh scripts for merged test runner app bundles from our list. -->
<PropertyGroup Condition="'$(TargetsMobile)' == 'true'">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册