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.
This commit is contained in:
committed by
andrey-zelenkov
parent
7883acc62d
commit
99da2f3c8e
@@ -18,6 +18,8 @@ def discover_available(unit):
|
|||||||
[unit['unitd'], '--version'], stderr=subprocess.STDOUT
|
[unit['unitd'], '--version'], stderr=subprocess.STDOUT
|
||||||
).decode()
|
).decode()
|
||||||
|
|
||||||
|
option.configure_flag['asan'] = '-fsanitize=address' in output_version
|
||||||
|
|
||||||
# wait for controller start
|
# wait for controller start
|
||||||
|
|
||||||
if Log.wait_for_record(r'controller started') is None:
|
if Log.wait_for_record(r'controller started') is None:
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ class Options:
|
|||||||
_options = {
|
_options = {
|
||||||
'architecture': platform.architecture()[0],
|
'architecture': platform.architecture()[0],
|
||||||
'available': {'modules': {}, 'features': {}},
|
'available': {'modules': {}, 'features': {}},
|
||||||
|
'configure_flag': {},
|
||||||
'is_privileged': os.geteuid() == 0,
|
'is_privileged': os.geteuid() == 0,
|
||||||
'skip_alerts': [],
|
'skip_alerts': [],
|
||||||
'skip_sanitizer': False,
|
'skip_sanitizer': False,
|
||||||
|
|||||||
Reference in New Issue
Block a user