Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b78c830
Did some cleanup
Daniel-Genkin Jun 15, 2021
644d165
faked loading async while supporting actual async loading
Daniel-Genkin Jun 15, 2021
93255ad
more cleanup and fixes
Daniel-Genkin Jun 15, 2021
7f9105f
removed export
Daniel-Genkin Jun 16, 2021
9489f23
more cleanup
Daniel-Genkin Jun 16, 2021
57fd10c
more cleanup
Daniel-Genkin Jun 16, 2021
e6e5615
removed unused variables
Daniel-Genkin Jun 16, 2021
1d60b57
var -> let or const
Daniel-Genkin Jun 16, 2021
3253d86
slight readability fix
Daniel-Genkin Jun 16, 2021
eef11f4
Addressed PR comments
Daniel-Genkin Jun 17, 2021
ac87c42
Fixed typo
Daniel-Genkin Jun 17, 2021
4afc45f
works but in a hacky way as the Module and FS defined in dotnet.js ne…
Daniel-Genkin Jun 18, 2021
92f50d5
commented IOHandler
Daniel-Genkin Jun 18, 2021
ddc2d51
fixed issue with this and scoping (but this is already addressed by t…
Daniel-Genkin Jun 18, 2021
8c2bdf1
No more need to edit dotnet.js to make it work + much nicer syntax ho…
Daniel-Genkin Jun 18, 2021
6cc767e
fixed last error
Daniel-Genkin Jun 19, 2021
5b80d1a
Added node TargetOS
Daniel-Genkin Jun 19, 2021
f01285d
Added run-node script generation
Daniel-Genkin Jun 19, 2021
9ddb659
merge mono config branch
Daniel-Genkin Jun 19, 2021
cca0678
sync with origin
Daniel-Genkin Jun 19, 2021
fa8bd01
updated config loading
Daniel-Genkin Jun 20, 2021
a7d3007
Added node build target to MSbuild and tests
Daniel-Genkin Jun 21, 2021
d4513e8
continued work on adding the new build target
Daniel-Genkin Jun 21, 2021
80d36e2
Merge branch 'main' of https://github.com/dotnet/runtime into wasm-node
Daniel-Genkin Jun 21, 2021
dd3d200
Continued working on adding node build target
Daniel-Genkin Jun 22, 2021
300e9d1
removed hardcoded path
Daniel-Genkin Jun 22, 2021
3df92f2
Removed duplicate preInit
Daniel-Genkin Jun 22, 2021
95f7920
Merge branch 'main' into wasm-node
Daniel-Genkin Jun 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('SOLARIS'))">Solaris</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSUnixLike())">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('WINDOWS'))">windows</TargetOS>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">true</TargetsMobile>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">true</TargetsMobile>
</PropertyGroup>

<!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
Expand All @@ -27,7 +27,7 @@
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm'">arm</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armel'">armel</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm64'">arm64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetOS)' == 'Browser'">wasm</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and ('$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node')">wasm</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetsMobile)' == 'true'">x64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<Platform Condition="'$(Platform)' == '' and '$(InferPlatformFromTargetArchitecture)' == 'true'">$(TargetArchitecture)</Platform>
Expand Down Expand Up @@ -124,7 +124,7 @@
<_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos</_portableOS>
<_portableOS Condition="'$(_runtimeOSFamily)' == 'Solaris'">solaris</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'Browser'">browser</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'Browser' or '$(_runtimeOS)' == 'Node'">browser</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'maccatalyst'">maccatalyst</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'ios'">ios</_portableOS>
<_portableOS Condition="'$(_runtimeOS)' == 'iOSSimulator'">iossimulator</_portableOS>
Expand All @@ -146,9 +146,9 @@
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(TargetArchitecture.StartsWith('arm')) and !$(_hostArch.StartsWith('arm'))">linux-x64</_toolRuntimeRID>

<!-- There are no WebAssembly tools, so use the default ones -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser'">linux-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' or '$(_runtimeOS)' == 'node'">linux-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="('$(_runtimeOS)' == 'browser' or '$(_runtimeOS)' == 'node') and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID>
<_toolRuntimeRID Condition="('$(_runtimeOS)' == 'browser' or '$(_runtimeOS)' == 'node') and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID>

<!-- There are no Android tools, so use the default ones -->
<_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android'">linux-x64</_toolRuntimeRID>
Expand Down Expand Up @@ -179,7 +179,7 @@
<_outputRID Condition="'$(TargetOS)' == 'tvOS'">tvos-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'tvOSSimulator'">tvossimulator-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Android'">android-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Browser'">browser-$(TargetArchitecture)</_outputRID>
<_outputRID Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">browser-$(TargetArchitecture)</_outputRID>

<OutputRid Condition="'$(OutputRid)' == ''">$(PackageRID)</OutputRid>
<OutputRid Condition="'$(PortableBuild)' == 'true'">$(_outputRID)</OutputRid>
Expand All @@ -198,7 +198,7 @@
<TargetsiOSSimulator Condition="'$(TargetOS)' == 'iOSSimulator'">true</TargetsiOSSimulator>
<TargetstvOSSimulator Condition="'$(TargetOS)' == 'tvOSSimulator'">true</TargetstvOSSimulator>
<TargetsAndroid Condition="'$(TargetOS)' == 'Android'">true</TargetsAndroid>
<TargetsBrowser Condition="'$(TargetOS)' == 'Browser'">true</TargetsBrowser>
<TargetsBrowser Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">true</TargetsBrowser>
<TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows>
<TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages</DefaultMonoSubsets>

Expand Down Expand Up @@ -228,7 +228,7 @@
</ItemGroup>

<!-- Mono sets -->
<ItemGroup Condition="$(_subset.Contains('+mono.llvm+')) or $(_subset.Contains('+mono.aotcross+')) or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">
<ItemGroup Condition="$(_subset.Contains('+mono.llvm+')) or $(_subset.Contains('+mono.aotcross+')) or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator' or '$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">
<ProjectToBuild Include="$(MonoProjectRoot)llvm\llvm-init.proj" Category="mono" />
</ItemGroup>

Expand Down
10 changes: 5 additions & 5 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Param(
[string][Alias('f')]$framework,
[string]$vs,
[string][Alias('v')]$verbosity = "minimal",
[ValidateSet("windows","Linux","OSX","Android","Browser")][string]$os,
[ValidateSet("windows","Linux","OSX","Android","Browser", "Node")][string]$os,
[switch]$allconfigurations,
[switch]$coverage,
[string]$testscope,
Expand Down Expand Up @@ -37,7 +37,7 @@ function Get-Help() {
Write-Host " -help (-h) Print help and exit."
Write-Host " -librariesConfiguration (-lc) Libraries build configuration: Debug or Release."
Write-Host " [Default: Debug]"
Write-Host " -os Target operating system: windows, Linux, OSX, Android or Browser."
Write-Host " -os Target operating system: windows, Linux, OSX, Android, Browser or Node."
Write-Host " [Default: Your machine's OS.]"
Write-Host " -runtimeConfiguration (-rc) Runtime build configuration: Debug, Release or Checked."
Write-Host " Checked is exclusive to the CLR runtime. It is the same as Debug, except code is"
Expand Down Expand Up @@ -249,12 +249,12 @@ foreach ($argument in $PSBoundParameters.Keys)

$failedBuilds = @()

if ($os -eq "Browser") {
if ($os -eq "Browser" -or $os -eq "Node") {
# override default arch for Browser, we only support wasm
$arch = "wasm"

if ($msbuild -eq $True) {
Write-Error "Using the -msbuild option isn't supported when building for Browser on Windows, we need need ninja for Emscripten."
Write-Error "Using the -msbuild option isn't supported when building for Browser or Node on Windows, we need need ninja for Emscripten."
exit 1
}
}
Expand All @@ -263,7 +263,7 @@ foreach ($config in $configuration) {
$argumentsWithConfig = $arguments + " -configuration $((Get-Culture).TextInfo.ToTitleCase($config))";
foreach ($singleArch in $arch) {
$argumentsWithArch = "/p:TargetArchitecture=$singleArch " + $argumentsWithConfig
if ($os -eq "Browser") {
if ($os -eq "Browser" -or $os -eq "Node") {
$env:__DistroRid="browser-$singleArch"
} else {
$env:__DistroRid="win-$singleArch"
Expand Down
10 changes: 6 additions & 4 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ usage()
echo " --librariesConfiguration (-lc) Libraries build configuration: Debug or Release."
echo " [Default: Debug]"
echo " --os Target operating system: windows, Linux, FreeBSD, OSX, MacCatalyst, tvOS,"
echo " tvOSSimulator, iOS, iOSSimulator, Android, Browser, NetBSD, illumos or Solaris."
echo " tvOSSimulator, iOS, iOSSimulator, Android, Browser, Node, NetBSD, illumos or Solaris."
echo " [Default: Your machine's OS.]"
echo " --projects <value> Project or solution file(s) to build."
echo " --runtimeConfiguration (-rc) Runtime build configuration: Debug, Release or Checked."
Expand Down Expand Up @@ -277,13 +277,15 @@ while [[ $# > 0 ]]; do
os="Android" ;;
browser)
os="Browser" ;;
node)
os="Node" ;;
illumos)
os="illumos" ;;
solaris)
os="Solaris" ;;
*)
echo "Unsupported target OS '$2'."
echo "The allowed values are windows, Linux, FreeBSD, OSX, MacCatalyst, tvOS, tvOSSimulator, iOS, iOSSimulator, Android, Browser, illumos and Solaris."
echo "The allowed values are windows, Linux, FreeBSD, OSX, MacCatalyst, tvOS, tvOSSimulator, iOS, iOSSimulator, Android, Browser, Node, illumos and Solaris."
exit 1
;;
esac
Expand Down Expand Up @@ -461,8 +463,8 @@ if [ ${#actInt[@]} -eq 0 ]; then
arguments="-restore -build $arguments"
fi

if [ "$os" = "Browser" ] && [ "$arch" != "wasm" ]; then
# override default arch for Browser, we only support wasm
if [[ "$os" = "Browser" ] || [ "$os" = "Node" ]] && [ "$arch" != "wasm" ]; then
# override default arch for Browser and Node, we only support wasm
arch=wasm
fi

Expand Down
6 changes: 3 additions & 3 deletions eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,22 @@
$(LibrariesNativeArtifactsPath)*.pdb"
IsNative="true"
Exclude="@(ExcludeNativeLibrariesRuntimeFiles)" />
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser'"
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'"
Include="
$(LibrariesNativeArtifactsPath)dotnet.js;
$(LibrariesNativeArtifactsPath)dotnet.wasm;
$(LibrariesNativeArtifactsPath)dotnet.timezones.blat;
$(LibrariesNativeArtifactsPath)*.dat;"
IsNative="true" />
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser'"
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'"
Include="
$(LibrariesNativeArtifactsPath)src\*.c;
$(LibrariesNativeArtifactsPath)src\*.js;
$(LibrariesNativeArtifactsPath)src\emcc-default.rsp;
$(LibrariesNativeArtifactsPath)src\Emcc.props;"
NativeSubDirectory="src"
IsNative="true" />
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser'"
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'"
Include="
$(LibrariesNativeArtifactsPath)include\wasm\*.h;"
NativeSubDirectory="include\wasm"
Expand Down
2 changes: 1 addition & 1 deletion eng/targetframeworksuffix.props
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<PackageTargetRuntime>solaris</PackageTargetRuntime>
</PropertyGroup>
</When>
<When Condition="'$(TargetFrameworkSuffix)' == 'Browser'">
<When Condition="'$(TargetFrameworkSuffix)' == 'Browser' or '$(TargetFrameworkSuffix)' == 'Node'">
<PropertyGroup>
<TargetsBrowser>true</TargetsBrowser>
<PackageTargetRuntime>browser</PackageTargetRuntime>
Expand Down
4 changes: 2 additions & 2 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<_MobileIntermediateOutputPath>$(IntermediateOutputPath)mobile</_MobileIntermediateOutputPath>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)tests.wasm.targets" Condition="'$(TargetOS)' == 'Browser'" />
<Import Project="$(MSBuildThisFileDirectory)tests.wasm.targets" Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'" />

<UsingTask TaskName="RuntimeConfigParserTask"
AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)"
Expand Down Expand Up @@ -270,7 +270,7 @@
<ItemGroup>
<_runnerFilesToPublish Include="$(AndroidTestRunnerDir)*" Condition="'$(TargetOS)' == 'Android'" />
<_runnerFilesToPublish Include="$(AppleTestRunnerDir)*" Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'" />
<_runnerFilesToPublish Include="$(WasmTestRunnerDir)*" Condition="'$(TargetOS)' == 'Browser'" />
<_runnerFilesToPublish Include="$(WasmTestRunnerDir)*" Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'" />

<!-- Remove runner files that already exist in ResolvedFileToPublish to avoid double publishing -->
<_resolvedFilesToPublishToFileName Include="@(ResolvedFileToPublish -> '%(FileName)%(Extension)')" />
Expand Down
18 changes: 9 additions & 9 deletions eng/testing/tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<RunScriptInputName Condition="'$(TargetOS)' != 'windows'">RunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'MacCatalyst' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'iOSSimulator' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'tvOSSimulator'">AppleRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Android'">AndroidRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Browser' and '$(OS)' != 'Windows_NT'">WasmRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="'$(TargetOS)' == 'Browser' and '$(OS)' == 'Windows_NT'">WasmRunnerTemplate.cmd</RunScriptInputName>
<RunScriptInputName Condition="('$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node') and '$(OS)' != 'Windows_NT'">WasmRunnerTemplate.sh</RunScriptInputName>
<RunScriptInputName Condition="('$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node') and '$(OS)' == 'Windows_NT'">WasmRunnerTemplate.cmd</RunScriptInputName>

<RunScriptInputPath>$(MSBuildThisFileDirectory)$(RunScriptInputName)</RunScriptInputPath>

<RunScriptOutputName Condition="'$(TargetOS)' != 'windows'">RunTests.sh</RunScriptOutputName>
<RunScriptOutputName Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'Browser' and '$(OS)' == 'Windows_NT')">RunTests.cmd</RunScriptOutputName>
<RunScriptOutputName Condition="'$(TargetOS)' == 'windows' or (('$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node') and '$(OS)' == 'Windows_NT')">RunTests.cmd</RunScriptOutputName>
<RunScriptOutputPath>$([MSBuild]::NormalizePath('$(OutDir)', '$(RunScriptOutputName)'))</RunScriptOutputPath>

<RunScriptHostDir Condition="'$(TargetOS)' == 'windows'">%RUNTIME_PATH%\</RunScriptHostDir>
Expand All @@ -35,19 +35,19 @@
<!-- For browser we need to hook up the target with DependsOnTargets in PublishTestAsSelfContained
because we do a Publish which runs after Build, if we run after PrepareForRun we would generated
an empty zip because we haven't published the selfcontained app. -->
<ArchiveTestsAfterTargets Condition="'$(TargetOS)' == 'Browser' or '$(TestSingleFile)' == 'true'" />
<ArchiveTestsAfterTargets Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node' or '$(TestSingleFile)' == 'true'" />
</PropertyGroup>

<!-- Archive test binaries. -->
<Target Name="ArchiveTests"
Condition="'$(ArchiveTests)' == 'true' and '$(IgnoreForCI)' != 'true' and ('$(TargetsMobile)' != 'true' or '$(TargetOS)' == 'Browser')"
Condition="'$(ArchiveTests)' == 'true' and '$(IgnoreForCI)' != 'true' and ('$(TargetsMobile)' != 'true' or '$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node')"
AfterTargets="$(ArchiveTestsAfterTargets)"
DependsOnTargets="GenerateRunScript">
<Error Condition="'$(TestArchiveTestsDir)' == ''" Text="TestArchiveTestsDir property to archive the test folder must be set." />

<PropertyGroup>
<_ZipSourceDirectory>$(OutDir)</_ZipSourceDirectory>
<_ZipSourceDirectory Condition="'$(TargetOS)' == 'Browser' or '$(TestSingleFile)' == 'true'">$(BundleDir)</_ZipSourceDirectory>
<_ZipSourceDirectory Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node' or '$(TestSingleFile)' == 'true'">$(BundleDir)</_ZipSourceDirectory>
</PropertyGroup>

<MakeDir Directories="$(TestArchiveTestsDir)" />
Expand All @@ -63,8 +63,8 @@
<Target Name="GenerateRunScript">
<PropertyGroup>
<!-- RSP file support. -->
<RunScriptCommand Condition="'$(TargetOS)' != 'windows' and ('$(TargetOS)' != 'Browser' or '$(OS)' != 'Windows_NT')">$(RunScriptCommand) $RSP_FILE</RunScriptCommand>
<RunScriptCommand Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'Browser' and '$(OS)' == 'Windows_NT')">$(RunScriptCommand) %RSP_FILE%</RunScriptCommand>
<RunScriptCommand Condition="'$(TargetOS)' != 'windows' and (('$(TargetOS)' != 'Browser' and '$(TargetOS)' != 'Node') or '$(OS)' != 'Windows_NT')">$(RunScriptCommand) $RSP_FILE</RunScriptCommand>
<RunScriptCommand Condition="'$(TargetOS)' == 'windows' or (('$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node') and '$(OS)' == 'Windows_NT')">$(RunScriptCommand) %RSP_FILE%</RunScriptCommand>

<!-- Escape potential user input. -->
<RunScriptCommand>$([MSBuild]::Escape('$(RunScriptCommand)'))</RunScriptCommand>
Expand Down Expand Up @@ -108,7 +108,7 @@
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)'))">$(RunTestsCommand) --runtime-path "$(NetCoreAppCurrentTestHostPath.TrimEnd('\/'))"</RunTestsCommand>
<RunTestsCommand Condition="'$(TestRspFile)' != '' and '$(RuntimeFlavor)' != 'Mono'">$(RunTestsCommand) --rsp-file "$(TestRspFile)"</RunTestsCommand>
<RunTestsCommand Condition="'$(TargetsMobile)' == 'true'">"$(RunScriptOutputPath)" $(AssemblyName) $(TargetArchitecture) $(TargetOS.ToLowerInvariant()) $(TestProjectName) $(AdditionalXHarnessArguments)</RunTestsCommand>
<RunTestsCommand Condition="'$(TargetOS)' == 'Browser'">"$(RunScriptOutputPath)" $(JSEngine) $(AssemblyName).dll $(Scenario)</RunTestsCommand>
<RunTestsCommand Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">"$(RunScriptOutputPath)" $(JSEngine) $(AssemblyName).dll $(Scenario)</RunTestsCommand>
</PropertyGroup>

<!-- Invoke the run script with the test host as the runtime path. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup Condition="'$(TargetOS)' == 'Browser'">
<PropertyGroup Condition="'$(TargetOS)' == 'Browser' or '$(TargetOS)' == 'Node'">
<Scenario>WasmTestOnBrowser</Scenario>
<TestArchiveTestsRoot>$(TestArchiveRoot)browseronly/</TestArchiveTestsRoot>
<TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
Expand Down
Loading