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

Unified Diff: collate.py

Issue 752333002: Add missing files for PNaCl. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm-testsuite.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « codereview.settings ('k') | include/memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: collate.py
diff --git a/collate.py b/collate.py
new file mode 100755
index 0000000000000000000000000000000000000000..d242a8c1852864e9dd8edf0b4332638209f154d4
--- /dev/null
+++ b/collate.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+# Copyright (c) 2013 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Runs a subprocess (command and args taken from argv), and collates
+# its output to stdout such that the subprocess's stdout is printed
+# followed by its stderr. This matches the collation in
+# native_client/run.py so that PNaCl and native output can be compared
+# accurately.
+
+import subprocess
+import sys
+
+def main(argv):
+ p = subprocess.Popen(argv[1:], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (stdout_contents, stderr_contents) = p.communicate()
+ sys.stdout.write((stdout_contents or '') + (stderr_contents or ''))
+ return p.returncode
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
« no previous file with comments | « codereview.settings ('k') | include/memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698