unit-test: Disable valgrind testing for ppc64

There is an issue caused by inlining of a strcmp function in optimized
code that valgrind picks up as use of uninitialized memory in jmp / mov.
Just ignore running valgrind tests on powerpc for now.
https://github.com/openbmc/openbmc/issues/3315

Change-Id: I1252efdcea3acb05f1fb8043ac995645d6631805
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index d8e1d7f..86efea0 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -15,6 +15,7 @@
 import argparse
 import multiprocessing
 import re
+import platform
 
 
 class DepTree():
@@ -408,6 +409,12 @@
     Parameter descriptions:
     top_dir             The root directory of our project
     """
+    # Valgrind testing is currently broken by an aggressive strcmp optimization
+    # that is inlined into optimized code for POWER by gcc 7+. Until we find
+    # a workaround, just don't run valgrind tests on POWER.
+    # https://github.com/openbmc/openbmc/issues/3315
+    if re.match('ppc64', platform.machine()) is not None:
+        return
     if not make_target_exists('check-valgrind'):
         return