未验证 提交 ef785f5d 编写于 作者: I Ilona Tomkowicz 提交者: GitHub

[wasm][debugger] Run debugger test in codespace (#64746)

* Tmp change for debugging.

* Added chromium, needed for running debugger tests.

* Corrected line breaking, removed suso.

* Removed update duplicate.

* Prevent regex on null.

* Set special env variable only for containers.

* Locally docker build crashes without it.

* Applied @eerhardt suggestion.

* Moved env assignment to a place that is executed by onCreateCommand.sh

* Revert accidential new line removal.

* Upgrade is unnecessary, works without it.

* Moved all logic to C# code.

* Remove duplicated line.

* Applied @thays's and @lewing's comments.

* Enabling @radical approach for chromium installation.
Co-authored-by: NAnkit Jain <radical@gmail.com>
上级 31bd72de
......@@ -18,4 +18,19 @@ RUN curl -sSL "https://netcorenativeassets.blob.core.windows.net/resource-packag
&& unzip ./v8.zip -d /usr/local/v8 \
&& echo $'#!/usr/bin/env bash\n\
"/usr/local/v8/d8" --snapshot_blob="/usr/local/v8/snapshot_blob.bin" "$@"\n' > /usr/local/bin/v8 \
&& chmod +x /usr/local/bin/v8
\ No newline at end of file
&& chmod +x /usr/local/bin/v8
# install chromium dependencies to run debugger tests:
RUN sudo apt-get install libnss3 -y \
&& apt-get install libatk1.0-0 -y \
&& apt-get install libatk-bridge2.0-0 -y \
&& apt-get install libcups2 -y \
&& apt-get install libdrm2 -y \
&& apt-get install libxkbcommon-x11-0 -y \
&& apt-get install libxcomposite-dev -y \
&& apt-get install libxdamage1 -y \
&& apt-get install libxrandr2 -y \
&& apt-get install libgbm-dev -y \
&& apt-get install libpango-1.0-0 -y \
&& apt-get install libcairo2 -y \
&& apt-get install libasound2 -y
\ No newline at end of file
......@@ -103,10 +103,13 @@ async Task SendNodeList(HttpContext context)
if (tcs.Task.IsCompleted)
return;
var match = parseConnection.Match(str);
if (match.Success)
if (!string.IsNullOrEmpty(str))
{
tcs.TrySetResult(match.Groups[1].Captures[0].Value);
var match = parseConnection.Match(str);
if (match.Success)
{
tcs.TrySetResult(match.Groups[1].Captures[0].Value);
}
}
};
......@@ -197,6 +200,11 @@ public void Configure(IApplicationBuilder app, IOptionsMonitor<TestHarnessOption
var psi = new ProcessStartInfo();
psi.Arguments = $"--headless --disable-gpu --lang=en-US --incognito --remote-debugging-port={devToolsUrl.Port} http://{TestHarnessProxy.Endpoint.Authority}/{options.PagePath}";
if (File.Exists("/.dockerenv"))
{
Logger.LogInformation("Detected a container, disabling sandboxing for debugger tests.");
psi.Arguments = "--no-sandbox " + psi.Arguments;
}
psi.UseShellExecute = false;
psi.FileName = options.ChromePath;
psi.RedirectStandardError = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册