Skip to content

Commit 459c18d

Browse files
committed
Disable sourcekit’s tests on ubuntu-14.04
swiftlang#8485 (comment)
1 parent 3da7926 commit 459c18d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

test/SourceKit/lit.local.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
if 'sourcekit' not in config.available_features:
22
config.unsupported = True
33

4+
elif 'OS=linux-gnu' in config.available_features and 'LinuxDistribution=Ubuntu-14.04' in config.available_features:
5+
config.unsupported = True
6+
47
else:
58
config.sourcekitd_test = config.inferSwiftBinary('sourcekitd-test')
69
config.complete_test = config.inferSwiftBinary('complete-test')

test/lit.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,4 +1085,20 @@ if config.lldb_build_root != "":
10851085
python_lib_dir = get_python_lib(True, False, config.lldb_build_root)
10861086
config.substitutions.append(('%lldb-python-path', python_lib_dir))
10871087

1088+
1089+
# Run lsb_release on the target to be tested and return the results.
1090+
def linux_get_lsb_release():
1091+
lsb_release_path = '/usr/bin/lsb_release'
1092+
if os.path.isfile(lsb_release_path) and os.access(lsb_release_path, os.X_OK):
1093+
distributor = lit.util.executeCommand([lsb_release_path, '-is'])[0].rstrip()
1094+
release = lit.util.executeCommand([lsb_release_path, '-rs'])[0].rstrip()
1095+
return (distributor, release)
1096+
return ('', '')
1097+
1098+
if platform.system() == 'Linux':
1099+
(distributor, release) = linux_get_lsb_release()
1100+
if distributor != '' and release != '':
1101+
config.available_features.add("LinuxDistribution=" + distributor + '-' + release)
1102+
lit_config.note('Running tests on %s-%s' % (distributor, release))
1103+
10881104
lit_config.note("Available features: " + ", ".join(config.available_features))

0 commit comments

Comments
 (0)