output meson valgrind unit test log

When the unit tests are run with valgrind, the failure details were not
being written to stdout

Tested:
Ensured testlog-valgrind.txt is now written to stdout

Change-Id: I74873ec0bb2cad1b6962048d83765c56319b6e2f
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index a3ce157..e6f3a32 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -664,12 +664,19 @@
     if not is_valgrind_safe():
         sys.stderr.write("###### Skipping valgrind ######\n")
         return
-    if meson_setup_exists('valgrind'):
-        check_call_cmd('meson', 'test', '-C', 'build',
-                       '--setup', 'valgrind')
-    else:
-        check_call_cmd('meson', 'test', '-C', 'build',
-                       '--wrapper', 'valgrind')
+    try:
+        if meson_setup_exists('valgrind'):
+            check_call_cmd('meson', 'test', '-C', 'build',
+                           '--setup', 'valgrind')
+        else:
+            check_call_cmd('meson', 'test', '-C', 'build',
+                           '--wrapper', 'valgrind')
+    except CalledProcessError:
+        for root, _, files in os.walk(os.getcwd()):
+            if 'testlog-valgrind.txt' not in files:
+                continue
+            check_call_cmd('cat', os.path.join(root, 'testlog-valgrind.txt'))
+        raise Exception('Valgrind tests failed')
 
 def maybe_make_valgrind():
     """