2018-02-22 14:31:40 +08:00
|
|
|
import platform
|
2016-10-27 12:56:14 +08:00
|
|
|
target_triple_components = config.target_triple.split('-')
|
|
|
|
config.available_features.update(target_triple_components)
|
2017-09-26 11:18:11 +08:00
|
|
|
|
|
|
|
# Only run the tests in platforms where XRay instrumentation is supported.
|
|
|
|
supported_targets = [
|
2018-02-22 14:31:40 +08:00
|
|
|
'amd64', 'x86_64', 'x86_64h', 'arm', 'aarch64', 'arm64', 'powerpc64le', 'mips',
|
2017-09-26 11:45:37 +08:00
|
|
|
'mipsel', 'mips64', 'mips64el'
|
2017-09-26 11:18:11 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
# Only on platforms we support.
|
|
|
|
supported_oses = [
|
2018-08-27 13:16:09 +08:00
|
|
|
'Linux', 'FreeBSD', 'Darwin'
|
2017-09-26 11:18:11 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
triple_set = set(target_triple_components)
|
|
|
|
if len(triple_set.intersection(supported_targets)) == 0:
|
|
|
|
config.unsupported = True
|
|
|
|
|
|
|
|
# Do not run for 'android' despite being linux.
|
2018-02-22 14:31:40 +08:00
|
|
|
if platform.system() not in supported_oses or 'android' in triple_set:
|
2017-09-26 11:18:11 +08:00
|
|
|
config.unsupported = True
|
2017-09-26 12:07:45 +08:00
|
|
|
|
|
|
|
if config.enable_shared:
|
|
|
|
config.available_features.update(['enable_shared'])
|