Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: runtime/tests/vm/dart/hello_fuchsia_test.dart

Issue 2581363002: Fuchsia: resolve executable name, fetch environment vars (Closed)
Patch Set: Cleanup Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/bin/platform_fuchsia.cc ('K') | « runtime/bin/platform_fuchsia.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/vm/dart/hello_fuchsia_test.dart
diff --git a/runtime/tests/vm/dart/hello_fuchsia_test.dart b/runtime/tests/vm/dart/hello_fuchsia_test.dart
index bcda2bfab336050b20e3c2ecf5a6ccfaad3dd7e0..ce9cd7da7fe07ea3b22ca17885b71472a80364d1 100644
--- a/runtime/tests/vm/dart/hello_fuchsia_test.dart
+++ b/runtime/tests/vm/dart/hello_fuchsia_test.dart
@@ -380,10 +380,12 @@ Future testGoogleHttps(SecurityContext context, String outcome) async {
}
Future testProcess() async {
- Process p = await Process.start(Platform.executable, ["--version"]);
+ String exe = Platform.resolvedExecutable;
+ print("Running $exe --version");
+ Process p = await Process.start(exe, ["--version"]);
p.stderr.transform(UTF8.decoder).listen(print);
int code = await p.exitCode;
- print("dart --version exited with code $code");
+ print("$exe --version exited with code $code");
}
Future testLs(String path) async {
@@ -393,6 +395,14 @@ Future testLs(String path) async {
}
}
+void testPlatformEnvironment() {
+ Map<String, String> env = Platform.environment;
+ for (String k in env.keys) {
+ String v = env[k];
+ print("$k = '$v'");
+ }
+}
+
main() async {
print("Hello, Fuchsia!");
@@ -428,6 +438,10 @@ main() async {
await testLs("/");
print("lsTest done");
+ print("testPlatformEnvironment");
+ testPlatformEnvironment();
+ print("testPlatformEnvironment done");
+
print("testProcess");
await testProcess();
print("testProcess done");
« runtime/bin/platform_fuchsia.cc ('K') | « runtime/bin/platform_fuchsia.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698