Skip to content

Pass working directory to Process.run when building debug extension in tests #1726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion dwds/debug_extension/tool/build_extension.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ echo "Building DDC-compiled extension to dev_build/web directory."
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
dart run build_runner build web --delete-conflicting-outputs --output dev_build
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"Updating the manifest.json file in dev_build/web directory."
echo "Updating the manifest.json file in dev_build/web directory."
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
dart tool/update_dev_manifest.dart
16 changes: 6 additions & 10 deletions dwds/test/fixtures/context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -435,16 +435,12 @@ class TestContext {
throw StateError(
'Expected to be in /dwds directory, instead path was $currentDir.');
}
try {
Directory.current = '$currentDir/debug_extension';
final process = await Process.run(
'tool/build_extension.sh',
['prod'],
);
print(process.stdout);
} finally {
Directory.current = currentDir;
}
final process = await Process.run(
'tool/build_extension.sh',
['prod'],
workingDirectory: '$currentDir/debug_extension',
);
print(process.stdout);
}

Future<ChromeTab> _fetchDartDebugExtensionTab(
Expand Down