test: Fix executing with valgrind

We need to make sure run_with_tmp is executed outside valgrind.

Change-Id: I0de8c1993cb422dd28e264dd8b5c2494a0db508d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/meson.build b/test/meson.build
index d29bb43..400e745 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -79,13 +79,22 @@
   warning('Not testing gtest lib feature')
 endif
 
+add_test_setup(
+  'stdplus',
+  exe_wrapper: run_with_tmp,
+  env: {'TMPTMPL': 'stdplus-test.XXXXXXXXXX'},
+  is_default: true)
+
+add_test_setup(
+  'valgrind',
+  exe_wrapper: [run_with_tmp, 'valgrind'],
+  env: {'TMPTMPL': 'stdplus-test.XXXXXXXXXX'})
+
 if gtest_dep.found() and gmock_dep.found()
   foreach t : gtests
     test(
       t,
-      run_with_tmp,
-      env: {'TMPTMPL': 'stdplus-test.XXXXXXXXXX'},
-      args: executable(
+      executable(
         t.underscorify(), t + '.cpp',
         build_by_default: false,
         implicit_include_directories: false,