ntdb: catch any valgrind errors in test
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 18 Jun 2012 13:00:27 +0000 (22:30 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 19 Jun 2012 03:38:06 +0000 (05:38 +0200)
Make --valgrind and --valgrind-log options work!

Amitay figured this out!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/ntdb/wscript

index aab42456c5e76076000484682fa01fe85d7b645c..fd9c96b59b6bea9c91b9395156cfa80d183367b2 100644 (file)
@@ -230,9 +230,9 @@ def testonly(ctx):
         if not os.path.exists(link):
             os.symlink(os.path.abspath(os.path.join(env.cwd, 'test')), link)
 
-        if Options.options.VALGRIND:
+        if env.options['VALGRIND']:
             os.environ['VALGRIND'] = 'valgrind -q --num-callers=30 --error-exitcode=11'
-        if Options.options.VALGRINDLOG is not None:
+        if env.options['VALGRINDLOG']:
             os.environ['VALGRIND'] += ' --log-file=%s' % Options.options.VALGRINDLOG
 
         for f in env.NTDB_TEST_RUN_SRC + env.NTDB_TEST_API_SRC: