Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
75ca428b
R
runtime
项目概览
dotNET Platform
/
runtime
12 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
75ca428b
编写于
6月 30, 2022
作者:
A
Ankit Jain
提交者:
GitHub
6月 30, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[wasm] Clean up debugger tests output (#71483)
上级
7f18fd59
变更
31
显示空白变更内容
内联
并排
Showing
31 changed file
with
207 addition
and
69 deletion
+207
-69
src/mono/wasm/Makefile
src/mono/wasm/Makefile
+2
-2
src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs
+5
-1
src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs
...no/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs
+4
-0
src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs
+4
-0
src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs
...no/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/CustomViewTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/CustomViewTests.cs
+4
-0
src/mono/wasm/debugger/DebuggerTestSuite/DateTimeTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/DateTimeTests.cs
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
+20
-14
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestFirefox.cs
...no/wasm/debugger/DebuggerTestSuite/DebuggerTestFirefox.cs
+5
-4
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj
.../wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/DelegateTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/DelegateTests.cs
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/EnvironmentVariables.cs
...o/wasm/debugger/DebuggerTestSuite/EnvironmentVariables.cs
+14
-0
src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs
...sm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs
+6
-2
src/mono/wasm/debugger/DebuggerTestSuite/ExceptionTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/ExceptionTests.cs
+7
-3
src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs
...ono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs
+7
-3
src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs
+4
-0
src/mono/wasm/debugger/DebuggerTestSuite/HotReloadTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/HotReloadTests.cs
+4
-3
src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs
src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs
+30
-13
src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
+4
-2
src/mono/wasm/debugger/DebuggerTestSuite/MonoJsTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/MonoJsTests.cs
+4
-0
src/mono/wasm/debugger/DebuggerTestSuite/PointerTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/PointerTests.cs
+3
-0
src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs
+5
-2
src/mono/wasm/debugger/DebuggerTestSuite/SetVariableValueTests.cs
.../wasm/debugger/DebuggerTestSuite/SetVariableValueTests.cs
+4
-0
src/mono/wasm/debugger/DebuggerTestSuite/Settings.cs
src/mono/wasm/debugger/DebuggerTestSuite/Settings.cs
+13
-0
src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs
src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs
+5
-1
src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessProxy.cs
src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessProxy.cs
+20
-9
src/mono/wasm/debugger/DebuggerTestSuite/WasmHostProvider.cs
src/mono/wasm/debugger/DebuggerTestSuite/WasmHostProvider.cs
+1
-1
src/mono/wasm/runtime/startup.ts
src/mono/wasm/runtime/startup.ts
+9
-9
src/tests/BuildWasmApps/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj
...ldWasmApps/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj
+5
-0
未找到文件。
src/mono/wasm/Makefile
浏览文件 @
75ca428b
...
...
@@ -130,9 +130,9 @@ submit-tests-helix:
run-debugger-tests
:
rm
-f
$(TOP)
/artifacts/bin/DebuggerTestSuite/x64/Debug/
*
log
;
\
if
[
!
-z
"
$(TEST_FILTER)
"
]
;
then
\
$(DOTNET)
test
$(TOP)
/src/mono/wasm/debugger/DebuggerTestSuite
$(MSBUILD_ARGS
)
--filter
"Category!=failing&FullyQualifiedName~
$(TEST_FILTER)
"
$(TEST_ARGS)
;
\
$(DOTNET)
test
$(TOP)
/src/mono/wasm/debugger/DebuggerTestSuite
$(MSBUILD_ARGS)
"-l:trx;LogFileName=DebuggerTestsResults.xml"
--results-directory
$(TOP)
/artifacts/log/
$(CONFIG
)
--filter
"Category!=failing&FullyQualifiedName~
$(TEST_FILTER)
"
$(TEST_ARGS)
;
\
else
\
$(DOTNET)
test
$(TOP)
/src/mono/wasm/debugger/DebuggerTestSuite
$(MSBUILD_ARGS)
--filter
"Category!=failing"
$(TEST_ARGS)
;
\
$(DOTNET)
test
$(TOP)
/src/mono/wasm/debugger/DebuggerTestSuite
$(MSBUILD_ARGS)
"-l:trx;LogFileName=DebuggerTestsResults.xml"
--results-directory
$(TOP)
/artifacts/log/
$(CONFIG)
--filter
"Category!=failing"
$(TEST_ARGS)
;
\
fi
build-dbg-proxy
:
...
...
src/mono/wasm/debugger/DebuggerTestSuite/ArrayTests.cs
浏览文件 @
75ca428b
...
...
@@ -6,11 +6,14 @@
using
System.Threading.Tasks
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
ArrayTests
:
DebuggerTests
{
public
ArrayTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
Theory
]
[
InlineData
(
19
,
8
,
"PrimitiveTypeLocals"
,
false
,
0
,
false
)]
...
...
src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs
浏览文件 @
75ca428b
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using
System
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
AssignmentTests
:
DebuggerTests
{
public
AssignmentTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
public
static
TheoryData
<
string
,
JObject
,
JObject
>
GetTestData
=>
new
TheoryData
<
string
,
JObject
,
JObject
>
{
{
"MONO_TYPE_OBJECT"
,
TObject
(
"object"
,
is_null
:
true
),
TObject
(
"object"
)
},
...
...
src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,11 +7,14 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
AsyncTests
:
DebuggerTests
{
public
AsyncTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
// FIXME: method with multiple async blocks - so that we have two separate classes for that method!
// FIXME: nested blocks
...
...
src/mono/wasm/debugger/DebuggerTestSuite/BadHarnessInitTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,6 +7,7 @@
using
System.Threading.Tasks
;
using
Microsoft.WebAssembly.Diagnostics
;
using
Xunit
;
using
Xunit.Abstractions
;
#
nullable
enable
...
...
@@ -14,6 +15,9 @@ namespace DebuggerTests
{
public
class
BadHarnessInitTests
:
DebuggerTests
{
public
BadHarnessInitTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
public
override
async
Task
InitializeAsync
()
=>
await
Task
.
CompletedTask
;
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
...
...
src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs
浏览文件 @
75ca428b
...
...
@@ -9,12 +9,16 @@
using
System.IO
;
using
Xunit
;
using
Xunit.Sdk
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
BreakpointTests
:
DebuggerTests
{
public
BreakpointTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
CreateGoodBreakpoint
()
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,12 +7,15 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
CallFunctionOnTests
:
DebuggerTests
{
public
CallFunctionOnTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
// This tests `callFunctionOn` with a function that the vscode-js-debug extension uses
// Using this here as a non-trivial test case
...
...
src/mono/wasm/debugger/DebuggerTestSuite/CustomViewTests.cs
浏览文件 @
75ca428b
...
...
@@ -9,12 +9,16 @@
using
System.Threading
;
using
Xunit
;
using
System.Collections.Generic
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
CustomViewTests
:
DebuggerTests
{
public
CustomViewTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
UsingDebuggerDisplay
()
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/DateTimeTests.cs
浏览文件 @
75ca428b
...
...
@@ -5,11 +5,14 @@
using
System.Globalization
;
using
System.Threading.Tasks
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
DateTimeTests
:
DebuggerTests
{
public
DateTimeTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
Theory
]
[
InlineData
(
"en-US"
,
"dddd, MMMM d, yyyy h:mm:ss tt"
,
"dddd, MMMM d, yyyy"
,
"h:mm:ss tt"
,
"M/d/yyyy"
,
"h:mm tt"
)]
...
...
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs
浏览文件 @
75ca428b
...
...
@@ -13,6 +13,7 @@
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Sdk
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
...
...
@@ -22,7 +23,11 @@ public class DebuggerTests :
#else
DebuggerTestFirefox
#endif
{
public
DebuggerTests
(
ITestOutputHelper
testOutput
,
string
driver
=
"debugger-driver.html"
)
:
base
(
testOutput
,
driver
)
{}
}
public
class
DebuggerTestBase
:
IAsyncLifetime
{
...
...
@@ -46,6 +51,7 @@ public static WasmHost RunningOn
private
const
int
DefaultTestTimeoutMs
=
1
*
60
*
1000
;
protected
TimeSpan
TestTimeout
=
TimeSpan
.
FromMilliseconds
(
DefaultTestTimeoutMs
);
protected
ITestOutputHelper
_testOutput
;
static
string
s_debuggerTestAppPath
;
static
int
s_idCounter
=
-
1
;
...
...
@@ -65,7 +71,7 @@ public static string DebuggerTestAppPath
static
protected
string
FindTestPath
()
{
string
test_app_path
=
Environment
.
GetEnvironmentVariable
(
"DEBUGGER_TEST_PATH"
)
;
string
test_app_path
=
Environment
Variables
.
DebuggerTestPath
;
if
(
string
.
IsNullOrEmpty
(
test_app_path
))
{
...
...
@@ -100,27 +106,27 @@ public static string TestLogPath
{
if
(
s_testLogPath
==
null
)
{
string
logPathVar
=
Environment
.
GetEnvironmentVariable
(
"TEST_LOG_PATH"
)
;
string
logPathVar
=
Environment
Variables
.
TestLogPath
;
logPathVar
=
string
.
IsNullOrEmpty
(
logPathVar
)
?
Environment
.
CurrentDirectory
:
logPathVar
;
Interlocked
.
CompareExchange
(
ref
s_testLogPath
,
logPathVar
,
null
);
Console
.
WriteLine
(
$"logPathVar:
{
logPathVar
}
, s_testLogPath:
{
s_testLogPath
}
"
);
}
return
s_testLogPath
;
}
}
public
DebuggerTestBase
(
string
driver
=
"debugger-driver.html"
)
public
DebuggerTestBase
(
ITestOutputHelper
testOutput
,
string
driver
=
"debugger-driver.html"
)
{
_testOutput
=
testOutput
;
Id
=
Interlocked
.
Increment
(
ref
s_idCounter
);
// the debugger is working in locale of the debugged application. For example Datetime.ToString()
// we want the test to mach it. We are also starting chrome with --lang=en-US
System
.
Globalization
.
CultureInfo
.
CurrentCulture
=
new
System
.
Globalization
.
CultureInfo
(
"en-US"
);
insp
=
new
Inspector
(
Id
);
insp
=
new
Inspector
(
Id
,
_testOutput
);
cli
=
insp
.
Client
;
scripts
=
SubscribeToScripts
(
insp
);
startTask
=
TestHarnessProxy
.
Start
(
DebuggerTestAppPath
,
driver
,
UrlToRemoteDebugging
());
startTask
=
TestHarnessProxy
.
Start
(
DebuggerTestAppPath
,
driver
,
UrlToRemoteDebugging
()
,
testOutput
);
}
public
virtual
async
Task
InitializeAsync
()
...
...
@@ -232,7 +238,7 @@ internal virtual async Task<JObject> WaitFor(string what)
var
res
=
await
cli
.
SendCommand
(
EvaluateCommand
(),
CreateEvaluateArgs
(
eval_expression
),
token
);
if
(!
res
.
IsOk
)
{
Console
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
CreateEvaluateArgs
(
eval_expression
)?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
_testOutput
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
CreateEvaluateArgs
(
eval_expression
)?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
Assert
.
True
(
false
,
$"SendCommand for
{
method
}
failed with
{
res
.
Error
.
ToString
()}
"
);
}
var
pause_location
=
await
WaitFor
(
Inspector
.
PAUSE
);
...
...
@@ -428,7 +434,7 @@ internal async Task<Result> SendCommand(string method, JObject args)
var
res
=
await
cli
.
SendCommand
(
method
,
args
,
token
);
if
(!
res
.
IsOk
)
{
Console
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
args
?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
_testOutput
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
args
?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
Assert
.
True
(
false
,
$"SendCommand for
{
method
}
failed with
{
res
.
Error
.
ToString
()}
"
);
}
return
res
;
...
...
@@ -542,7 +548,7 @@ internal async Task<Result> SetValueOnObject(JToken obj, string property, string
var
res
=
await
cli
.
SendCommand
(
method
,
args
,
token
);
if
(!
res
.
IsOk
)
{
Console
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
args
?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
_testOutput
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
args
?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
Assert
.
True
(
false
,
$"SendCommand for
{
method
}
failed with
{
res
.
Error
.
ToString
()}
"
);
}
...
...
@@ -825,7 +831,7 @@ internal async Task CheckValue(JToken actual_val, JToken exp_val, string label)
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
$"
{
ex
.
Message
}
\nExpected:
{
exp_val
}
\nActual:
{
actual_val
}
"
);
_testOutput
.
WriteLine
(
$"
{
ex
.
Message
}
\nExpected:
{
exp_val
}
\nActual:
{
actual_val
}
"
);
throw
;
}
}
...
...
@@ -1020,7 +1026,7 @@ internal async Task RuntimeEvaluateAndCheck(params (string expression, JObject e
}
catch
{
Console
.
WriteLine
(
$"CheckValue failed for
{
arg
.
expression
}
. Expected:
{
arg
.
expected
}
, vs
{
eval_val
}
"
);
_testOutput
.
WriteLine
(
$"CheckValue failed for
{
arg
.
expression
}
. Expected:
{
arg
.
expected
}
, vs
{
eval_val
}
"
);
throw
;
}
}
...
...
@@ -1116,7 +1122,7 @@ internal async Task EvaluateOnCallFrameAndCheck(string call_frame_id, params (st
}
catch
{
Console
.
WriteLine
(
$"CheckValue failed for
{
arg
.
expression
}
. Expected:
{
arg
.
expected
}
, vs
{
eval_val
}
"
);
_testOutput
.
WriteLine
(
$"CheckValue failed for
{
arg
.
expression
}
. Expected:
{
arg
.
expected
}
, vs
{
eval_val
}
"
);
throw
;
}
}
...
...
@@ -1392,7 +1398,7 @@ public async Task<JObject> WaitForBreakpointResolvedEvent()
try
{
var
res
=
await
insp
.
WaitForEvent
(
"Debugger.breakpointResolved"
);
Console
.
WriteLine
(
$"breakpoint resolved to
{
res
}
"
);
_testOutput
.
WriteLine
(
$"breakpoint resolved to
{
res
}
"
);
return
res
;
}
catch
(
TaskCanceledException
)
...
...
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestFirefox.cs
浏览文件 @
75ca428b
...
...
@@ -8,13 +8,14 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
;
public
class
DebuggerTestFirefox
:
DebuggerTestBase
{
internal
FirefoxInspectorClient
_client
;
public
DebuggerTestFirefox
(
string
driver
=
"debugger-driver.html"
):
base
(
driver
)
public
DebuggerTestFirefox
(
ITestOutputHelper
testOutput
,
string
driver
=
"debugger-driver.html"
):
base
(
testOutput
,
driver
)
{
if
(
insp
.
Client
is
not
FirefoxInspectorClient
)
throw
new
Exception
(
$"Bug: client should be
{
nameof
(
FirefoxInspectorClient
)}
for use with
{
nameof
(
DebuggerTestFirefox
)}
"
);
...
...
@@ -47,8 +48,8 @@ public override async Task InitializeAsync()
{
var
script_id
=
args
?[
"source"
]?[
"actor"
].
Value
<
string
>();
var
url
=
args
?[
"source"
]?[
"sourceMapBaseURL"
]?.
Value
<
string
>();
/*
Console
.WriteLine(script_id);
Console
.WriteLine(args);*/
/*
_testOutput
.WriteLine(script_id);
_testOutput
.WriteLine(args);*/
if
(
script_id
.
StartsWith
(
"dotnet://"
))
{
var
dbgUrl
=
args
?[
"source"
]?[
"dotNetUrl"
]?.
Value
<
string
>();
...
...
@@ -186,7 +187,7 @@ private JObject ConvertFirefoxToDefaultFormat(JArray frames, JObject wait_res)
var
res
=
await
cli
.
SendCommand
(
method
,
args
,
token
);
if
(!
res
.
IsOk
)
{
Console
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
args
?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
_testOutput
.
WriteLine
(
$"Failed to run command
{
method
}
with args:
{
args
?.
ToString
()}
\nresult:
{
res
.
Error
.
ToString
()}
"
);
Assert
.
True
(
false
,
$"SendCommand for
{
method
}
failed with
{
res
.
Error
.
ToString
()}
"
);
}
var
wait_res
=
await
WaitFor
(
waitForEvent
);
...
...
src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj
浏览文件 @
75ca428b
...
...
@@ -18,6 +18,9 @@
<Content Include="appsettings.json" CopyToOutputDirectory="PreserveNewest" />
<Compile Include="..\BrowserDebugProxy\Common\*.cs" />
<Compile Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging\tests\DI.Common\Common\src\XunitLoggerFactoryExtensions.cs" />
<Compile Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging\tests\DI.Common\Common\src\XunitLoggerProvider.cs" />
</ItemGroup>
<ItemGroup>
...
...
src/mono/wasm/debugger/DebuggerTestSuite/DelegateTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,12 +7,15 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
DelegateTests
:
DebuggerTests
{
public
DelegateTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalTheory
(
nameof
(
RunningOnChrome
))]
[
InlineData
(
0
,
53
,
8
,
"DelegatesTest"
,
false
)]
...
...
src/mono/wasm/debugger/DebuggerTestSuite/EnvironmentVariables.cs
0 → 100644
浏览文件 @
75ca428b
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using
System
;
#
nullable
enable
namespace
DebuggerTests
;
internal
static
class
EnvironmentVariables
{
public
static
readonly
string
?
DebuggerTestPath
=
Environment
.
GetEnvironmentVariable
(
"DEBUGGER_TEST_PATH"
);
public
static
readonly
string
?
TestLogPath
=
Environment
.
GetEnvironmentVariable
(
"TEST_LOG_PATH"
);
}
src/mono/wasm/debugger/DebuggerTestSuite/EvaluateOnCallFrameTests.cs
浏览文件 @
75ca428b
...
...
@@ -9,12 +9,16 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
// TODO: static async, static method args
public
class
EvaluateOnCallFrameTests
:
DebuggerTests
{
public
EvaluateOnCallFrameTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
public
static
IEnumerable
<
object
[
]>
InstanceMethodsTestData
(
string
type_name
)
{
yield
return
new
object
[]
{
type_name
,
"InstanceMethod"
,
"InstanceMethod"
,
false
};
...
...
@@ -88,7 +92,7 @@ public async Task EvaluateInstanceMethodArguments(string type, string method, st
{
var
id
=
pause_location
[
"callFrames"
][
0
][
"callFrameId"
].
Value
<
string
>();
var
DTProp
=
new
DateTime
(
2010
,
9
,
8
,
7
,
6
,
5
).
AddMinutes
(
10
);
Console
.
WriteLine
(
$"------- test running the bits.."
);
_testOutput
.
WriteLine
(
$"------- test running the bits.."
);
await
EvaluateOnCallFrameAndCheck
(
id
,
(
"g"
,
TNumber
(
400
)),
(
"h"
,
TNumber
(
123
)),
...
...
@@ -101,7 +105,7 @@ public async Task EvaluateInstanceMethodArguments(string type, string method, st
(
"me.DTProp.Second + (me.IntProp - 5)"
,
TNumber
(
DTProp
.
Second
+
4
)))
.
ConfigureAwait
(
false
);
Console
.
WriteLine
(
$"------- test done!"
);
_testOutput
.
WriteLine
(
$"------- test done!"
);
});
[
Theory
]
...
...
src/mono/wasm/debugger/DebuggerTestSuite/ExceptionTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,12 +7,16 @@
using
System.Threading
;
using
Xunit
;
using
Xunit.Sdk
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
ExceptionTests
:
DebuggerTests
{
public
ExceptionTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
ExceptionTestAll
()
{
...
...
@@ -107,7 +111,7 @@ async Task<JObject> WaitForJSException(JObject pause_location, string exp_fn_nam
// return if we hit a managed exception, or an uncaught one
if
(
pause_location
[
"data"
]?[
"objectId"
]?.
Value
<
string
>()?.
StartsWith
(
"dotnet:object:"
,
StringComparison
.
Ordinal
)
==
true
)
{
Console
.
WriteLine
(
$"Hit an unexpected managed exception, with function name:
{
actual_fn_name
}
.
{
pause_location
}
"
);
_testOutput
.
WriteLine
(
$"Hit an unexpected managed exception, with function name:
{
actual_fn_name
}
.
{
pause_location
}
"
);
throw
new
XunitException
(
$"Hit an unexpected managed exception, with function name:
{
actual_fn_name
}
"
);
}
...
...
@@ -176,7 +180,7 @@ public async Task JSExceptionTestNone()
}
catch
(
ArgumentException
ae
)
{
Console
.
WriteLine
(
$"
{
ae
}
"
);
_testOutput
.
WriteLine
(
$"
{
ae
}
"
);
var
eo
=
JObject
.
Parse
(
ae
.
Message
);
AssertEqual
(
line
,
eo
[
"exceptionDetails"
]?[
"lineNumber"
]?.
Value
<
int
>(),
"lineNumber"
);
...
...
@@ -296,7 +300,7 @@ await insp.WaitFor(Inspector.PAUSE)
break
;
}
}
Console
.
WriteLine
(
$"* Resumed
{
count
}
times"
);
_testOutput
.
WriteLine
(
$"* Resumed
{
count
}
times"
);
var
eval_expr
=
"window.setTimeout(function() { invoke_static_method ("
+
$"'
{
entry_method_name
}
'"
+
...
...
src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs
浏览文件 @
75ca428b
...
...
@@ -9,11 +9,15 @@
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Sdk
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
GetPropertiesTests
:
DebuggerTests
{
public
GetPropertiesTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
public
static
TheoryData
<
string
,
bool
?,
bool
?,
string
[],
Dictionary
<
string
,
(
JObject
,
bool
)>,
bool
>
ClassGetPropertiesTestData
(
bool
is_async
)
{
// FIXME: invoking getter on the hidden(base) properties - is that supported??
...
...
@@ -416,7 +420,7 @@ private async Task CheckExpectedProperties(string[] expected_names, Func<string,
}
}
private
static
void
AssertHasOnlyExpectedProperties
(
string
[]
expected_names
,
IEnumerable
<
JObject
>
actual
)
private
void
AssertHasOnlyExpectedProperties
(
string
[]
expected_names
,
IEnumerable
<
JObject
>
actual
)
{
bool
fail
=
false
;
var
exp
=
new
HashSet
<
string
>(
expected_names
);
...
...
@@ -425,7 +429,7 @@ private static void AssertHasOnlyExpectedProperties(string[] expected_names, IEn
{
if
(!
exp
.
Contains
(
obj
[
"name"
]?.
Value
<
string
>()))
{
Console
.
WriteLine
(
$"Unexpected:
{
obj
}
"
);
_testOutput
.
WriteLine
(
$"Unexpected:
{
obj
}
"
);
fail
=
true
;
}
}
...
...
@@ -433,7 +437,7 @@ private static void AssertHasOnlyExpectedProperties(string[] expected_names, IEn
var
act
=
new
HashSet
<
string
>(
actual
.
Select
(
a
=>
a
[
"name"
].
Value
<
string
>()));
foreach
(
var
obj
in
expected_names
.
Where
(
ename
=>
!
act
.
Contains
(
ename
)))
{
Console
.
WriteLine
(
$"Missing:
{
obj
}
"
);
_testOutput
.
WriteLine
(
$"Missing:
{
obj
}
"
);
fail
=
true
;
}
...
...
src/mono/wasm/debugger/DebuggerTestSuite/HarnessTests.cs
浏览文件 @
75ca428b
...
...
@@ -6,6 +6,7 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
#
nullable
enable
...
...
@@ -13,6 +14,9 @@ namespace DebuggerTests
{
public
class
HarnessTests
:
DebuggerTests
{
public
HarnessTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
TimedOutWaitingForInvalidBreakpoint
()
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/HotReloadTests.cs
浏览文件 @
75ca428b
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using
System
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
System.IO
;
using
Xunit
;
using
System.Threading
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
HotReloadTests
:
DebuggerTests
{
public
HotReloadTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
DebugHotReloadMethodChangedUserBreak
()
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/Inspector.cs
浏览文件 @
75ca428b
...
...
@@ -4,7 +4,6 @@
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.IO
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Threading
;
...
...
@@ -13,6 +12,7 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
System.Runtime.ExceptionServices
;
using
Xunit.Abstractions
;
#
nullable
enable
...
...
@@ -37,28 +37,35 @@ class Inspector
private
Exception
?
_isFailingWithException
;
protected
static
Lazy
<
ILoggerFactory
>
s_loggerFactory
=
new
(()
=>
LoggerFactory
.
Create
(
builder
=>
{
if
(
TestOptions
.
LogToConsole
)
{
return
LoggerFactory
.
Create
(
builder
=>
builder
// .AddFile(logFilePath, minimumLevel: LogLevel.Debug)
.
AddSimpleConsole
(
options
=>
{
options
.
SingleLine
=
true
;
options
.
TimestampFormat
=
"[HH:mm:ss] "
;
})
.
AddFilter
(
null
,
LogLevel
.
Trace
));
});
.
AddFilter
(
null
,
LogLevel
.
Debug
);
// .AddFile(logFilePath, minimumLevel: LogLevel.Debug)
}
}));
protected
ILogger
_logger
;
public
int
Id
{
get
;
init
;
}
public
Inspector
(
int
testId
)
public
Inspector
(
int
testId
,
ITestOutputHelper
testOutput
)
{
Id
=
testId
;
_cancellationTokenSource
=
new
CancellationTokenSource
();
Token
=
_cancellationTokenSource
.
Token
;
_logger
=
s_loggerFactory
.
Value
.
CreateLogger
(
$"
{
nameof
(
Inspector
)}
-
{
Id
}
"
);
if
(
Id
==
0
)
s_loggerFactory
.
Value
.
AddXunit
(
testOutput
);
_logger
=
s_loggerFactory
.
Value
.
CreateLogger
(
$"
{
nameof
(
Inspector
)}
-
{
Id
}
"
);
if
(
DebuggerTestBase
.
RunningOnChrome
)
Client
=
new
InspectorClient
(
_logger
);
else
...
...
@@ -146,7 +153,7 @@ void FailAllWaiters(Exception? exception = null)
}
}
private
static
string
FormatConsoleAPICalled
(
JObject
args
)
private
(
string
line
,
string
type
)
FormatConsoleAPICalled
(
JObject
args
)
{
string
?
type
=
args
?[
"type"
]?.
Value
<
string
>();
List
<
string
>
consoleArgs
=
new
();
...
...
@@ -156,8 +163,9 @@ private static string FormatConsoleAPICalled(JObject args)
consoleArgs
.
Add
(
arg
![
"value"
]!.
ToString
());
}
type
??=
"log"
;
if
(
consoleArgs
.
Count
==
0
)
return
"console: <message missing>"
;
return
(
line
:
"console: <message missing>"
,
type
)
;
int
position
=
1
;
string
first
=
consoleArgs
[
0
];
...
...
@@ -180,7 +188,7 @@ private static string FormatConsoleAPICalled(JObject args)
output
=
output
[..^
1
];
}
return
$"console.
{
type
}
:
{
output
}
"
;
return
(
$"console.
{
type
}
:
{
output
}
"
,
type
)
;
}
async
Task
OnMessage
(
string
method
,
JObject
args
,
CancellationToken
token
)
...
...
@@ -196,8 +204,17 @@ async Task OnMessage(string method, JObject args, CancellationToken token)
break
;
case
"Runtime.consoleAPICalled"
:
{
string
line
=
FormatConsoleAPICalled
(
args
);
_logger
.
LogInformation
(
line
);
(
string
line
,
string
type
)
=
FormatConsoleAPICalled
(
args
);
switch
(
type
)
{
case
"log"
:
_logger
.
LogInformation
(
line
);
break
;
case
"debug"
:
_logger
.
LogDebug
(
line
);
break
;
case
"error"
:
_logger
.
LogError
(
line
);
break
;
case
"warn"
:
_logger
.
LogWarning
(
line
);
break
;
case
"trace"
:
_logger
.
LogTrace
(
line
);
break
;
default
:
_logger
.
LogInformation
(
line
);
break
;
}
if
(
DetectAndFailOnAssertions
&&
(
line
.
Contains
(
"console.error: [MONO]"
)
||
line
.
Contains
(
"console.warning: [MONO]"
)))
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,7 +7,7 @@
using
System.Threading.Tasks
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.
Sdk
;
using
Xunit.
Abstractions
;
[
assembly
:
CollectionBehavior
(
CollectionBehavior
.
CollectionPerAssembly
)]
...
...
@@ -16,6 +16,8 @@ namespace DebuggerTests
public
class
MiscTests
:
DebuggerTests
{
public
MiscTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
Fact
]
public
void
CheckThatAllSourcesAreSent
()
...
...
@@ -525,7 +527,7 @@ public async Task InspectLocalsForToStringDescriptions(int line, int col, string
$"'
{
entry_method_name
}
',"
+
(
call_other
?
"true"
:
"false"
)
+
"); }, 1);"
;
Console
.
WriteLine
(
$"
{
eval_expr
}
"
);
_testOutput
.
WriteLine
(
$"
{
eval_expr
}
"
);
var
pause_location
=
await
EvaluateAndCheck
(
eval_expr
,
debugger_test_loc
,
line
,
col
,
invoke_async
?
"MoveNext"
:
method_name
);
...
...
src/mono/wasm/debugger/DebuggerTestSuite/MonoJsTests.cs
浏览文件 @
75ca428b
...
...
@@ -8,11 +8,15 @@
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
MonoJsTests
:
DebuggerTests
{
public
MonoJsTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
BadRaiseDebugEventsTest
()
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/PointerTests.cs
浏览文件 @
75ca428b
...
...
@@ -7,12 +7,15 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
PointerTests
:
DebuggerTests
{
public
PointerTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
public
static
TheoryData
<
string
,
string
,
string
,
int
,
string
,
bool
>
PointersTestData
=>
new
TheoryData
<
string
,
string
,
string
,
int
,
string
,
bool
>
...
...
src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs
浏览文件 @
75ca428b
...
...
@@ -8,12 +8,15 @@
using
Newtonsoft.Json.Linq
;
using
System.IO
;
using
Xunit
;
using
System.Threading
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
;
public
class
SetNextIpTests
:
DebuggerTests
{
public
SetNextIpTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalFact
(
nameof
(
RunningOnChrome
))]
public
async
Task
SetAndCheck
()
{
...
...
src/mono/wasm/debugger/DebuggerTestSuite/SetVariableValueTests.cs
浏览文件 @
75ca428b
...
...
@@ -9,11 +9,15 @@
using
Microsoft.WebAssembly.Diagnostics
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
SetVariableValueTests
:
DebuggerTests
{
public
SetVariableValueTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
ConditionalTheory
(
nameof
(
RunningOnChrome
))]
[
InlineData
(
"a"
,
1
,
30
,
130
)]
[
InlineData
(
"a"
,
1
,
-
30
,
-
130
)]
...
...
src/mono/wasm/debugger/DebuggerTestSuite/Settings.cs
0 → 100644
浏览文件 @
75ca428b
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using
System
;
#
nullable
enable
namespace
DebuggerTests
;
internal
static
class
TestOptions
{
internal
static
readonly
bool
LogToConsole
=
Environment
.
GetEnvironmentVariable
(
"SKIP_LOG_TO_CONSOLE"
)
!=
"1"
;
}
src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs
浏览文件 @
75ca428b
...
...
@@ -6,11 +6,15 @@
using
System.Threading.Tasks
;
using
Newtonsoft.Json.Linq
;
using
Xunit
;
using
Xunit.Abstractions
;
namespace
DebuggerTests
{
public
class
SteppingTests
:
DebuggerTests
{
public
SteppingTests
(
ITestOutputHelper
testOutput
)
:
base
(
testOutput
)
{}
[
Fact
]
public
async
Task
TrivalStepping
()
{
...
...
@@ -343,7 +347,7 @@ public async Task InspectLocalsInAsyncMethods(bool use_cfo)
await
CheckObject
(
locals
,
"this"
,
"Math.NestedInMath"
);
}
);
Console
.
WriteLine
(
wait_res
);
_testOutput
.
WriteLine
(
wait_res
.
ToString
()
);
#if false // Disabled for now, as we don't have proper async traces
var
locals
=
await
GetProperties
(
wait_res
[
"callFrames"
][
2
][
"callFrameId"
].
Value
<
string
>());
...
...
src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessProxy.cs
浏览文件 @
75ca428b
...
...
@@ -15,6 +15,7 @@
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.WebAssembly.Diagnostics
;
using
Xunit.Abstractions
;
#
nullable
enable
...
...
@@ -33,7 +34,7 @@ public class TestHarnessProxy
private
static
readonly
ConcurrentDictionary
<
int
,
WeakReference
<
Action
<
RunLoopExitState
>>>
s_exitHandlers
=
new
();
private
static
readonly
ConcurrentDictionary
<
string
,
RunLoopExitState
>
s_statusTable
=
new
();
public
static
Task
Start
(
string
appPath
,
string
pagePath
,
string
url
)
public
static
Task
Start
(
string
appPath
,
string
pagePath
,
string
url
,
ITestOutputHelper
testOutput
)
{
lock
(
proxyLock
)
{
...
...
@@ -47,13 +48,23 @@ public static Task Start(string appPath, string pagePath, string url)
config
.
AddEnvironmentVariables
(
prefix
:
"WASM_TESTS_"
);
})
.
ConfigureLogging
(
logging
=>
{
if
(
TestOptions
.
LogToConsole
)
{
logging
.
AddSimpleConsole
(
options
=>
{
options
.
SingleLine
=
true
;
options
.
TimestampFormat
=
"[HH:mm:ss] "
;
})
.
AddFilter
(
"DevToolsProxy"
,
LogLevel
.
Debug
)
.
AddFilter
(
"DevToolsProxy"
,
LogLevel
.
Debug
);
}
else
{
// remove the default logger - console
logging
.
ClearProviders
();
}
logging
.
AddXunit
(
testOutput
)
.
AddFile
(
Path
.
Combine
(
DebuggerTestBase
.
TestLogPath
,
"proxy.log"
),
minimumLevel
:
LogLevel
.
Trace
,
levelOverrides
:
new
Dictionary
<
string
,
LogLevel
>
...
...
@@ -79,7 +90,7 @@ public static Task Start(string appPath, string pagePath, string url)
hostTask
=
host
.
StartAsync
(
cts
.
Token
);
}
Console
.
WriteLine
(
"WebServer Ready!"
);
testOutput
.
WriteLine
(
"WebServer Ready!"
);
return
hostTask
;
}
...
...
src/mono/wasm/debugger/DebuggerTestSuite/WasmHostProvider.cs
浏览文件 @
75ca428b
...
...
@@ -80,7 +80,7 @@ protected ProcessStartInfo GetProcessStartInfo(string browserPath, string argume
{
_process
.
Exited
+=
(
_
,
_
)
=>
{
Console
.
WriteLine
(
$"**Browser died!**"
);
//
Console.WriteLine ($"**Browser died!**");
Dispose
();
};
...
...
src/mono/wasm/runtime/startup.ts
浏览文件 @
75ca428b
...
...
@@ -213,7 +213,7 @@ function _handle_fetched_asset(asset: AssetEntry, url?: string) {
const
bytes
=
new
Uint8Array
(
asset
.
buffer
);
if
(
ctx
.
tracing
)
console
.
log
(
`MONO_WASM: Loaded:
${
asset
.
name
}
as
${
asset
.
behavior
}
size
${
bytes
.
length
}
from
${
url
}
`
);
console
.
trace
(
`MONO_WASM: Loaded:
${
asset
.
name
}
as
${
asset
.
behavior
}
size
${
bytes
.
length
}
from
${
url
}
`
);
const
virtualName
:
string
=
typeof
(
asset
.
virtual_path
)
===
"
string
"
?
asset
.
virtual_path
...
...
@@ -244,7 +244,7 @@ function _handle_fetched_asset(asset: AssetEntry, url?: string) {
fileName
=
fileName
.
substr
(
1
);
if
(
parentDirectory
)
{
if
(
ctx
.
tracing
)
console
.
log
(
`MONO_WASM: Creating directory '
${
parentDirectory
}
'`
);
console
.
trace
(
`MONO_WASM: Creating directory '
${
parentDirectory
}
'`
);
Module
.
FS_createPath
(
"
/
"
,
parentDirectory
,
true
,
true
// fixme: should canWrite be false?
...
...
@@ -254,7 +254,7 @@ function _handle_fetched_asset(asset: AssetEntry, url?: string) {
}
if
(
ctx
.
tracing
)
console
.
log
(
`MONO_WASM: Creating file '
${
fileName
}
' in directory '
${
parentDirectory
}
'`
);
console
.
trace
(
`MONO_WASM: Creating file '
${
fileName
}
' in directory '
${
parentDirectory
}
'`
);
if
(
!
mono_wasm_load_data_archive
(
bytes
,
parentDirectory
))
{
Module
.
FS_createDataFile
(
...
...
@@ -498,7 +498,7 @@ async function mono_download_assets(config: MonoConfig | MonoConfigError | undef
++
parallel_count
;
if
(
parallel_count
==
max_parallel_downloads
)
{
if
(
ctx
!
.
tracing
)
console
.
log
(
"
MONO_WASM: Throttling further parallel downloads
"
);
console
.
trace
(
"
MONO_WASM: Throttling further parallel downloads
"
);
throttling_promise
=
new
Promise
((
resolve
)
=>
{
throttling_promise_resolve
=
resolve
;
...
...
@@ -537,10 +537,10 @@ async function mono_download_assets(config: MonoConfig | MonoConfigError | undef
}
if
(
asset
.
name
===
attemptUrl
)
{
if
(
ctx
!
.
tracing
)
console
.
log
(
`MONO_WASM: Attempting to fetch '
${
attemptUrl
}
'`
);
console
.
trace
(
`MONO_WASM: Attempting to fetch '
${
attemptUrl
}
'`
);
}
else
{
if
(
ctx
!
.
tracing
)
console
.
log
(
`MONO_WASM: Attempting to fetch '
${
attemptUrl
}
' for
${
asset
.
name
}
`
);
console
.
trace
(
`MONO_WASM: Attempting to fetch '
${
attemptUrl
}
' for
${
asset
.
name
}
`
);
}
try
{
const
response
=
await
runtimeHelpers
.
fetch
(
attemptUrl
);
...
...
@@ -567,7 +567,7 @@ async function mono_download_assets(config: MonoConfig | MonoConfigError | undef
--
parallel_count
;
if
(
throttling_promise
&&
parallel_count
==
((
max_parallel_downloads
/
2
)
|
0
))
{
if
(
ctx
!
.
tracing
)
console
.
log
(
"
MONO_WASM: Resuming more parallel downloads
"
);
console
.
trace
(
"
MONO_WASM: Resuming more parallel downloads
"
);
throttling_promise_resolve
!
();
throttling_promise
=
undefined
;
}
...
...
@@ -611,8 +611,8 @@ function finalize_assets(config: MonoConfig | MonoConfigError | undefined): void
ctx
.
loaded_files
.
forEach
(
value
=>
MONO
.
loaded_files
.
push
(
value
.
url
));
if
(
ctx
.
tracing
)
{
console
.
log
(
"
MONO_WASM: loaded_assets:
"
+
JSON
.
stringify
(
ctx
.
loaded_assets
));
console
.
log
(
"
MONO_WASM: loaded_files:
"
+
JSON
.
stringify
(
ctx
.
loaded_files
));
console
.
trace
(
"
MONO_WASM: loaded_assets:
"
+
JSON
.
stringify
(
ctx
.
loaded_assets
));
console
.
trace
(
"
MONO_WASM: loaded_files:
"
+
JSON
.
stringify
(
ctx
.
loaded_files
));
}
}
catch
(
err
:
any
)
{
Module
.
printErr
(
"
MONO_WASM: Error in finalize_assets:
"
+
err
);
...
...
src/tests/BuildWasmApps/Wasm.Debugger.Tests/Wasm.Debugger.Tests.csproj
浏览文件 @
75ca428b
...
...
@@ -46,6 +46,11 @@
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export BROWSER_PATH_FOR_TESTS=$HELIX_CORRELATION_PAYLOAD/firefox/firefox" />
</ItemGroup>
<ItemGroup Label="Don't log to console on CI" Condition="'$(ContinuousIntegrationBuild)' == 'true'">
<RunScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export SKIP_LOG_TO_CONSOLE=1" />
<RunScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set SKIP_LOG_TO_CONSOLE=1" />
</ItemGroup>
<PropertyGroup>
<_DotnetCommand Condition="'$(OS)' != 'Windows_NT'">dotnet</_DotnetCommand>
<_DotnetCommand Condition="'$(OS)' == 'Windows_NT'">dotnet.exe</_DotnetCommand>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录