Skip to content

[wasm][filesystem] add arg to testharness for setting working dir#42020

Merged
tqiu8 merged 3 commits into
dotnet:masterfrom
tqiu8:working-dir-fix
Sep 17, 2020
Merged

[wasm][filesystem] add arg to testharness for setting working dir#42020
tqiu8 merged 3 commits into
dotnet:masterfrom
tqiu8:working-dir-fix

Conversation

@tqiu8

@tqiu8 tqiu8 commented Sep 9, 2020

Copy link
Copy Markdown
Contributor

fix #39998

@tqiu8 tqiu8 requested review from kjpou1 and lewing September 9, 2020 16:53
@tqiu8 tqiu8 requested a review from marek-safar as a code owner September 9, 2020 16:53
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-Infrastructure-coreclr Only use for closed issues label Sep 9, 2020
Comment thread src/mono/wasm/runtime-test.js Outdated
Comment thread src/mono/wasm/runtime-test.js Outdated
…irectory

- This test was failing because it checks for
`Path.GetFileName(Directory.GetCurrentDirectory())` which returns `""`
for cwd==`"/"`.

- So, we add a dummy directory to the output, and use a new
`--working-dir` argument to set that as the cwd.

- And this is passed to the runtests script via a new msbuild property
called `$(RunTestsJSArguments)`
runtime_args = [];
enable_gc = true;
enable_zoneinfo = false;
working_dir='/';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the default working_dir generall?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried printing cwd for other tests, and it was /.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, we weren't setting it at all. And FS.cwd said /

@lewing lewing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for taking care of this @tqiu8

@tqiu8 tqiu8 merged commit 876980c into dotnet:master Sep 17, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure-coreclr Only use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[browser][filesystem] FileSystem test not passing due to working directory

4 participants