versioner: merge stdout and stderr in the test runner.

Some of the error messages emitted by versioner (the ones where it was
invoked incorrectly) go to stderr, which meant that the test runner
ignored them. Merge stdout and stderr, and switch from testing for
exact equality to endswith, because of the compilation errors test.

Change-Id: I0e2c25bcc9dea4c12ea82a6a05b29e561a61a902
diff --git a/tools/versioner/run_tests.py b/tools/versioner/run_tests.py
old mode 100644
new mode 100755
index f5a31f2..18b2aa9
--- a/tools/versioner/run_tests.py
+++ b/tools/versioner/run_tests.py
@@ -20,13 +20,13 @@
 def run_test(test_name, path):
     os.chdir(path)
     process = subprocess.Popen(
-        ["/bin/sh", "run.sh"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    (output, error) = process.communicate()
+        ["/bin/sh", "run.sh"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+    (output, _) = process.communicate()
 
     if os.path.exists("expected_fail"):
         with open("expected_fail") as f:
             expected_output = f.read()
-            if output != expected_output:
+            if not output.endswith(expected_output):
                 print("{} {}: expected output mismatch".format(
                     prefix_fail, test_name))
                 print("")