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

Unified Diff: testing/legion/examples/hello_world/host_test.py

Issue 870103005: Adding a server side, non-blocking subprocess mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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
Index: testing/legion/examples/hello_world/host_test.py
diff --git a/testing/legion/examples/hello_world/host_test.py b/testing/legion/examples/hello_world/host_test.py
index 0094d9bd5611c2b7aefb872be3b4b367e9c3a5a5..261e2cd8ce1a50df798b32250ee7254eae3f07a3 100755
--- a/testing/legion/examples/hello_world/host_test.py
+++ b/testing/legion/examples/hello_world/host_test.py
@@ -65,8 +65,11 @@ class ExampleController(host_controller.HostController):
def CallClientTest(self, client):
"""Call client_test.py name on a client."""
logging.info('Calling Subprocess to run "./client_test.py %s"', client.name)
- retcode, stdout, stderr = client.rpc.Subprocess(
- ['./client_test.py', client.name])
+ proc = client.rpc.subprocess.Popen(['./client_test.py', client.name])
+ client.rpc.subprocess.Wait(proc)
+ retcode = client.rpc.subprocess.GetReturncode(proc)
+ stdout = client.rpc.subprocess.GetStdout(proc)
+ stderr = client.rpc.subprocess.GetStderr(proc)
logging.info('retcode: %s, stdout: %s, stderr: %s', retcode, stdout, stderr)

Powered by Google App Engine
This is Rietveld 408576698