Propagate apitrace trace error codes.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 9 May 2012 13:18:22 +0000 (14:18 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 9 May 2012 13:18:22 +0000 (14:18 +0100)
app_driver.py

index 56d839cd89971e0229e8b38513953132960f9e0e..ce3b1c43ca3dc16a7f6e041d78c2908754e04e5a 100755 (executable)
@@ -167,7 +167,7 @@ class AppDriver(Driver):
 
         p = popen(self.cmd, cwd=self.cwd)
         p.wait()
-        if p.returncode:
+        if p.returncode != 0:
             skip('application returned code %i' % p.returncode)
 
     api_trace_map = {
@@ -226,6 +226,8 @@ class AppDriver(Driver):
 
         p = popen(cmd, env=env, cwd=self.cwd)
         p.wait()
+        if p.returncode != 0:
+            fail('`apitrace trace` returned code %i' % p.returncode)
 
         if not os.path.exists(self.trace_file):
             fail('no trace file generated\n')