Wasm.Build.Tests.csproj 2.8 KB
Newer Older
1 2 3 4
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
    <SkipTestUtilitiesReference>true</SkipTestUtilitiesReference>
5
    <SkipXunitTrimmerDescriptor>true</SkipXunitTrimmerDescriptor>
6 7 8 9 10
    <IsTestProject>true</IsTestProject>
    <BundleXunitRunner>true</BundleXunitRunner>
    <CLRTestKind>BuildAndRun</CLRTestKind>
    <TestFramework>xunit</TestFramework>
    <WasmGenerateAppBundle>false</WasmGenerateAppBundle>
11 12
    <EnableDefaultItems>true</EnableDefaultItems>
    <DefineConstants Condition="'$(ContinuousIntegrationBuild)' != 'true'">TEST_DEBUG_CONFIG_ALSO</DefineConstants>
13 14
    <!-- This project should not build against the live built .NETCoreApp targeting pack as it contributes to the build itself. -->
    <UseLocalTargetingRuntimePack>false</UseLocalTargetingRuntimePack>
15 16 17 18 19 20

    <!-- don't run any wasm build steps -->
    <WasmBuildAppAfterThisTarget />
  </PropertyGroup>

  <PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
21 22 23 24
    <_PreCommand Condition="'$(OS)' != 'Windows_NT'">WasmBuildSupportDir=%24{HELIX_CORRELATION_PAYLOAD}/build</_PreCommand>
    <_PreCommand Condition="'$(OS)' == 'Windows_NT'">set WasmBuildSupportDir=%HELIX_CORRELATION_PAYLOAD%/build &amp;</_PreCommand>
    <_PreCommand Condition="'$(OS)' != 'Windows_NT'">$(_PreCommand) DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1</_PreCommand>
    <_PreCommand Condition="'$(OS)' == 'Windows_NT'">$(_PreCommand) set DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 &amp;</_PreCommand>
25 26 27
  </PropertyGroup>

  <PropertyGroup>
28 29 30 31
    <_PreCommand Condition="'$(OS)' != 'Windows_NT'">$(_PreCommand) TEST_LOG_PATH=%24{XHARNESS_OUT}/logs</_PreCommand>
    <_PreCommand Condition="'$(OS)' != 'Windows_NT'">$(_PreCommand) HARNESS_RUNNER=%24{HARNESS_RUNNER}</_PreCommand>
    <_PreCommand Condition="'$(OS)' == 'Windows_NT'">$(_PreCommand) set TEST_LOG_PATH=%XHARNESS_OUT%\logs &amp;</_PreCommand>
    <_PreCommand Condition="'$(OS)' == 'Windows_NT'">$(_PreCommand) set HARNESS_RUNNER=%HARNESS_RUNNER% &amp;</_PreCommand>
32

33 34
    <RunScriptCommand Condition="'$(OS)' != 'Windows_NT'">$(_PreCommand) dotnet exec xunit.console.dll $(AssemblyName).dll -xml %24XHARNESS_OUT/testResults.xml</RunScriptCommand>
    <RunScriptCommand Condition="'$(OS)' == 'Windows_NT'">$(_PreCommand) dotnet.exe exec xunit.console.dll $(AssemblyName).dll -xml %XHARNESS_OUT%\testResults.xml</RunScriptCommand>
35 36 37 38 39 40 41 42
    <RunScriptCommand Condition="'$(ContinuousIntegrationBuild)' == 'true'">$(RunScriptCommand) -nocolor</RunScriptCommand>
    <RunScriptCommand Condition="'$(ContinuousIntegrationBuild)' == 'true' or '$(XUnitShowProgress)' == 'true'">$(RunScriptCommand) -verbose</RunScriptCommand>
  </PropertyGroup>

  <ItemGroup>
    <None Include="$(RepoRoot)\src\mono\wasm\runtime-test.js" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>
</Project>