File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
if ' sourcekit' not in config.available_features:
2
2
config.unsupported = True
3
3
4
+ elif ' OS=linux-gnu' in config.available_features and ' LinuxDistribution=Ubuntu-14.04' in config.available_features:
5
+ config.unsupported = True
6
+
4
7
else:
5
8
config.sourcekitd_test = config.inferSwiftBinary(' sourcekitd-test' )
6
9
config.complete_test = config.inferSwiftBinary(' complete-test' )
Original file line number Diff line number Diff line change @@ -1085,4 +1085,20 @@ if config.lldb_build_root != "":
1085
1085
python_lib_dir = get_python_lib (True , False , config .lldb_build_root )
1086
1086
config .substitutions .append (('%lldb-python-path' , python_lib_dir ))
1087
1087
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
+
1088
1104
lit_config .note ("Available features: " + ", " .join (config .available_features ))
You can’t perform that action at this time.
0 commit comments