1 | import platform |
2 | target_triple_components = config.target_triple.split('-') |
3 | config.available_features.update(target_triple_components) |
4 | |
5 | # Only run the tests in platforms where XRay instrumentation is supported. |
6 | supported_targets = [ |
7 | 'amd64', 'x86_64', 'x86_64h', 'arm', 'aarch64', 'arm64', 'powerpc64le', 'mips', |
8 | 'mipsel', 'mips64', 'mips64el' |
9 | ] |
10 | |
11 | # Only on platforms we support. |
12 | supported_oses = [ |
13 | 'Linux', 'FreeBSD', 'Darwin' |
14 | ] |
15 | |
16 | triple_set = set(target_triple_components) |
17 | if len(triple_set.intersection(supported_targets)) == 0: |
18 | config.unsupported = True |
19 | |
20 | # Do not run for 'android' despite being linux. |
21 | if platform.system() not in supported_oses or 'android' in triple_set: |
22 | config.unsupported = True |
23 | |
24 | if config.enable_shared: |
25 | config.available_features.update(['enable_shared']) |
26 | |