diff --git a/test/lit.cfg b/test/lit.cfg
index d8023fd..1ce2d57 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -83,6 +83,8 @@ class LibcxxTestFormat(lit.formats.FileBasedTest):
                     return lit.Test.FAIL, report
 
                 cmd = [exec_path]
+                if lit_config.useValgrind:
+                    cmd = lit_config.valgrindArgs + cmd
                 out, err, exitCode = self.execute_command(cmd)
                 if exitCode != 0:
                     report = """Compiled With: %s\n""" % ' '.join(["'%s'" % a
