]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc: valgrind: fix valgrind.supp path
authorSage Weil <sage@inktank.com>
Fri, 6 Sep 2013 22:55:14 +0000 (15:55 -0700)
committerSage Weil <sage@inktank.com>
Fri, 6 Sep 2013 23:09:27 +0000 (16:09 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/misc.py
teuthology/task/ceph.py

index 0d217dbbeae6cfe465c7fae51749a5e59b7ecdbe..0ff1c55efa738af242a7bc5b0aceb98d9531dab5 100644 (file)
@@ -874,7 +874,7 @@ def get_valgrind_args(testdir, name, v):
             run.Raw('&&'),
             'valgrind',
             '--num-callers=50',
-            '--suppressions=valgrind.supp',
+            '--suppressions={tdir}/valgrind.supp'.format(tdir=testdir),
             '--xml=yes',
             '--xml-file={vdir}/{n}.log'.format(vdir=val_path, n=name)
             ]
@@ -883,7 +883,7 @@ def get_valgrind_args(testdir, name, v):
             'cd', testdir,
             run.Raw('&&'),
             'valgrind',
-            '--suppressions=valgrind.supp',
+            '--suppressions={tdir}/valgrind.supp'.format(tdir=testdir),
             '--log-file={vdir}/{n}.log'.format(vdir=val_path, n=name)
             ]
     extra_args.extend(v)
index 498e78d3474411d79f8b522fc4fa53b65776cf5f..a6757f5ecea287bb7b34e0695692de12fd0695de 100644 (file)
@@ -149,12 +149,28 @@ def ceph_log(ctx, config):
 @contextlib.contextmanager
 def ship_utilities(ctx, config):
     assert config is None
-    FILES = ['daemon-helper', 'adjust-ulimits', 'valgrind.supp', 'kcon_most']
+    testdir = teuthology.get_testdir(ctx)
+    filenames = []
+
+    log.info('Shipping valgrind.supp...')
+    with file(os.path.join(os.path.dirname(__file__), 'valgrind.supp'), 'rb') as f:
+        fn = os.path.join(testdir, 'valgrind.supp')
+        filenames.append(fn)
+        for rem in ctx.cluster.remotes.iterkeys():
+            teuthology.sudo_write_file(
+                remote=rem,
+                path=fn,
+                data=f,
+                )
+            f.seek(0)
+
+    FILES = ['daemon-helper', 'adjust-ulimits', 'kcon_most']
     destdir = '/usr/local/bin'
     for filename in FILES:
         log.info('Shipping %r...', filename)
         src = os.path.join(os.path.dirname(__file__), filename)
         dst = os.path.join(destdir, filename)
+        filenames.append(dst)
         with file(src, 'rb') as f:
             for rem in ctx.cluster.remotes.iterkeys():
                 teuthology.sudo_write_file(
@@ -176,11 +192,7 @@ def ship_utilities(ctx, config):
     try:
         yield
     finally:
-        log.info('Removing shipped files: %s...', ' '.join(FILES))
-        filenames = (
-            os.path.join(destdir, filename)
-            for filename in FILES
-        )
+        log.info('Removing shipped files: %s...', ' '.join(filenames))
         run.wait(
             ctx.cluster.run(
                 args=[