diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2024-02-07 16:22:18 +0000 |
---|---|---|
committer | andrey-zelenkov <xim.andrew@gmail.com> | 2024-02-21 17:40:25 +0000 |
commit | 99da2f3c8e689341a83c9432e0692160c1d8316d (patch) | |
tree | f6e876f92c6616f90a3f6c3f0c530dfd622f7ffa /test/unit | |
parent | 7883acc62df64023dc8900298d65218b96d36ec7 (diff) | |
download | unit-99da2f3c8e689341a83c9432e0692160c1d8316d.tar.gz unit-99da2f3c8e689341a83c9432e0692160c1d8316d.tar.bz2 |
Tests: check for the AddressSanitizer flag during discovery
This flag is necessary to either run or skip certain tests that have
specific behavior depending on whether AddressSanitizer is enabled.
For instance, some tests may fail only when the binary is compiled
with AddressSanitizer.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/check/discover_available.py | 2 | ||||
-rw-r--r-- | test/unit/option.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/check/discover_available.py b/test/unit/check/discover_available.py index 0942581b..1383a0c3 100644 --- a/test/unit/check/discover_available.py +++ b/test/unit/check/discover_available.py @@ -18,6 +18,8 @@ def discover_available(unit): [unit['unitd'], '--version'], stderr=subprocess.STDOUT ).decode() + option.configure_flag['asan'] = '-fsanitize=address' in output_version + # wait for controller start if Log.wait_for_record(r'controller started') is None: diff --git a/test/unit/option.py b/test/unit/option.py index ee1f46dd..7c66c619 100644 --- a/test/unit/option.py +++ b/test/unit/option.py @@ -6,6 +6,7 @@ class Options: _options = { 'architecture': platform.architecture()[0], 'available': {'modules': {}, 'features': {}}, + 'configure_flag': {}, 'is_privileged': os.geteuid() == 0, 'skip_alerts': [], 'skip_sanitizer': False, |