Skip to content

Commit d4d4bec

Browse files
Enable System.Runtime.Tests on WASI
1 parent 4044fde commit d4d4bec

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

eng/testing/FindWasmHostExecutable.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if exist "%__WasmBinaryPathWithoutExtension%.js" (
2727

2828
if "%__WasmBinaryExtension%" == ".wasm" (
2929
:: Assume wasmtime is in PATH.
30-
set WASM_HOST_EXECUTABLE=wasmtime run -S http
30+
set WASM_HOST_EXECUTABLE=wasmtime run -S http --dir=.
3131
) else (
3232
if "%NODEJS_EXECUTABLE%" == "" (
3333
:: When running tests locally, assume NodeJS is in PATH.

eng/testing/FindWasmHostExecutable.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ elif [ -e "${dirname}/main.mjs" ]; then
2121
WASM_HOST_EXECUTABLE=$node
2222
WASM_BINARY_TO_EXECUTE="${dirname}/main.mjs"
2323
elif [ -e "${dirname}/${exename}.wasm" ]; then
24-
WASM_HOST_EXECUTABLE="wasmtime run -S http"
24+
WASM_HOST_EXECUTABLE="wasmtime run -S http --dir=."
2525
WASM_BINARY_TO_EXECUTE="${dirname}/${exename}.wasm"
2626
fi

eng/testing/tests.singlefile.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646
<PropertyGroup Condition="'$(PublishSingleFile)' == 'true' or '$(TestNativeAot)' == 'true'">
4747
<DefineConstants>$(DefineConstants);SINGLE_FILE_TEST_RUNNER</DefineConstants>
48+
<DefineConstants Condition="'$(TargetsWasi)' == 'true'">$(DefineConstants);TARGET_WASI</DefineConstants> <!-- Used by WasmTestRunner.cs -->
4849
</PropertyGroup>
4950

5051
<PropertyGroup Condition="'$(TestReadyToRun)' == 'true'">

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Threading/PeriodicTimerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace System.Threading.Tests
99
{
10-
[ActiveIssue("https://github.com/dotnet/runtimelab/issues/2505", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsWasm))]
10+
[ActiveIssue("https://github.com/dotnet/runtimelab/issues/2505", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsBrowser))]
1111
public class PeriodicTimerTests
1212
{
1313
[Fact]

src/libraries/tests.proj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,7 @@
613613
<SmokeTestProject Remove="@(SmokeTestProject)" />
614614
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Collections.Specialized\tests\System.Collections.Specialized.Tests.csproj" />
615615
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Diagnostics.StackTrace\tests\System.Diagnostics.StackTrace.Tests.csproj" />
616-
<!-- S.R.Tests aren't yet passing upstream on WASI. -->
617-
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests\System.Runtime.Tests.csproj" Condition="'$(TargetsBrowser)' == 'true'" />
616+
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests\System.Runtime.Tests.csproj" />
618617
</ItemGroup>
619618

620619
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(WasmEnableThreads)' == 'true'">

0 commit comments

Comments
 (0)