[totem/wip/hadess/re-enable-pylint: 9/10] build: Disable MALLOC_PERTURB_ when running pylint




commit 71c99bccb6bcdd431eb5f00be0de5272b0d832ef
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 22 17:18:16 2022 +0200

    build: Disable MALLOC_PERTURB_ when running pylint
    
    By default, meson will set MALLOC_PERTURB_ to a non-zero value when
    running tests, which had the effect of making a pylint run take 200
    seconds instead of around 15.
    
    Disabling that envvar makes the tests take a more reasonable amount of
    time.

 meson.build                           | 1 +
 src/plugins/opensubtitles/meson.build | 1 +
 src/plugins/pythonconsole/meson.build | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/meson.build b/meson.build
index c960159e3..9a579988a 100644
--- a/meson.build
+++ b/meson.build
@@ -190,6 +190,7 @@ if python_option != 'no'
 
     pygobject_dep = dependency('pygobject-3.0', version: '>= 2.90.3', required: false)
     pylint = find_program('pylint-3', 'pylint3', 'pylint', required: false)
+    nomalloc = environment({'MALLOC_PERTURB_': '0'})
 
     if python_version.version_compare(python_req_version) and pygobject_dep.found()
       have_python = true
diff --git a/src/plugins/opensubtitles/meson.build b/src/plugins/opensubtitles/meson.build
index cd4858912..689722daf 100644
--- a/src/plugins/opensubtitles/meson.build
+++ b/src/plugins/opensubtitles/meson.build
@@ -43,5 +43,6 @@ if pylint.found()
   test('pylint-' + plugin_name,
        pylint,
        args: pylint_flags + ['-d', 'bad-continuation' ] + files([ plugin_name + '.py', 'hash.py' ]),
+       env: nomalloc,
        timeout: 120)
 endif
diff --git a/src/plugins/pythonconsole/meson.build b/src/plugins/pythonconsole/meson.build
index cf91c20d4..46c15a0fa 100644
--- a/src/plugins/pythonconsole/meson.build
+++ b/src/plugins/pythonconsole/meson.build
@@ -42,5 +42,6 @@ if pylint.found()
   test('pylint-' + plugin_name,
        pylint,
        args: pylint_flags + files([ plugin_name + '.py', 'console.py' ]),
+       env: nomalloc,
        timeout: 120)
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]