Merge branch release-2016
[alexxy/gromacs.git] / admin / builds / gromacs.py
index ceefaf9c46be5c6528303a3aaebfd4db3ebd5cf1..c517f5fdd347c1becfb131e4508cbe713c30e696 100644 (file)
@@ -116,6 +116,12 @@ def do_build(context):
     if context.opts.x11:
         cmake_opts['GMX_X11'] = 'ON'
 
+    # At least hwloc on Jenkins produces a massive amount of reports about
+    # memory leaks, which cannot be reasonably suppressed because ASAN cannot
+    # produce a reasonable stack trace for them.
+    if context.opts.asan:
+        cmake_opts['GMX_HWLOC'] = 'OFF'
+
     regressiontests_path = context.workspace.get_project_dir(Project.REGRESSIONTESTS)
 
     if context.job_type == JobType.RELEASE:
@@ -159,7 +165,7 @@ def do_build(context):
     else:
         context.build_target(target='tests', keep_going=True)
 
-        context.run_ctest(args=['--output-on-failure'])
+        context.run_ctest(args=['--output-on-failure'], memcheck=context.opts.asan)
 
         context.build_target(target='install')
         # TODO: Consider what could be tested about the installed binaries.
@@ -171,8 +177,6 @@ def do_build(context):
             use_tmpi = not context.opts.mpi and context.opts.thread_mpi is not False
 
             cmd = 'perl gmxtest.pl -mpirun mpirun -xml -nosuffix all'
-            if context.opts.asan:
-                cmd+=' -parse asan_symbolize.py'
 
             # setting this stuff below is just a temporary solution,
             # it should all be passed as a proper the runconf from outside
@@ -201,4 +205,6 @@ def do_build(context):
                 cmd += ' -nt ' + nranks
             if context.opts.double:
                 cmd += ' -double'
+            if context.opts.asan:
+                context.env.set_env_var('ASAN_OPTIONS', 'detect_leaks=0')
             context.run_cmd(cmd, shell=True, failure_message='Regression tests failed to execute')