Skip to content

Commit

Permalink
Disable sourcekit’s tests on ubuntu-14.04
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Apr 26, 2017
1 parent 3da7926 commit 459c18d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/SourceKit/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
if 'sourcekit' not in config.available_features:
config.unsupported = True

elif 'OS=linux-gnu' in config.available_features and 'LinuxDistribution=Ubuntu-14.04' in config.available_features:
config.unsupported = True

else:
config.sourcekitd_test = config.inferSwiftBinary('sourcekitd-test')
config.complete_test = config.inferSwiftBinary('complete-test')
Expand Down
16 changes: 16 additions & 0 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1085,4 +1085,20 @@ if config.lldb_build_root != "":
python_lib_dir = get_python_lib(True, False, config.lldb_build_root)
config.substitutions.append(('%lldb-python-path', python_lib_dir))


# Run lsb_release on the target to be tested and return the results.
def linux_get_lsb_release():
lsb_release_path = '/usr/bin/lsb_release'
if os.path.isfile(lsb_release_path) and os.access(lsb_release_path, os.X_OK):
distributor = lit.util.executeCommand([lsb_release_path, '-is'])[0].rstrip()
release = lit.util.executeCommand([lsb_release_path, '-rs'])[0].rstrip()
return (distributor, release)
return ('', '')

if platform.system() == 'Linux':
(distributor, release) = linux_get_lsb_release()
if distributor != '' and release != '':
config.available_features.add("LinuxDistribution=" + distributor + '-' + release)
lit_config.note('Running tests on %s-%s' % (distributor, release))

lit_config.note("Available features: " + ", ".join(config.available_features))

0 comments on commit 459c18d

Please sign in to comment.