Wasm.Build.Tests.csproj 2.5 KB
Newer Older
1 2 3 4 5 6 7 8 9
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppToolCurrent)</TargetFrameworks>
    <SkipTestUtilitiesReference>true</SkipTestUtilitiesReference>
    <IsTestProject>true</IsTestProject>
    <BundleXunitRunner>true</BundleXunitRunner>
    <CLRTestKind>BuildAndRun</CLRTestKind>
    <TestFramework>xunit</TestFramework>
    <WasmGenerateAppBundle>false</WasmGenerateAppBundle>
10 11
    <EnableDefaultItems>true</EnableDefaultItems>
    <DefineConstants Condition="'$(ContinuousIntegrationBuild)' != 'true'">TEST_DEBUG_CONFIG_ALSO</DefineConstants>
12 13 14 15 16 17

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

  <PropertyGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
18 19 20 21
    <_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>
22 23 24
  </PropertyGroup>

  <PropertyGroup>
25 26 27 28
    <_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>
29

30 31
    <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>
32 33 34 35 36 37 38 39
    <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>