mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This flag is a GNU extension, and would cause misleading test failures on other platforms where this extension is not available. However, the necessity to switch line endings is only required on Windows when testing. We could use sed to canonicalize line endings before comparing, but that may cause higher amounts of filesystem traffic on Windows which would slow down testing. Instead, move the substitution for diff in SourceKit's lit.local.cfg up to the top level, and conditionalize the substitution which has the flag on Windows, but not on other platforms (where it should not be required).
23 lines
985 B
INI
23 lines
985 B
INI
import os
|
|
import pipes
|
|
|
|
|
|
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
|
|
|
|
elif 'swift_evolve' in config.available_features:
|
|
# A lot of tests necessarily depend on standard library source order.
|
|
config.unsupported = True
|
|
|
|
else:
|
|
sk_path_sanitize = os.path.join(os.path.dirname(__file__), 'Inputs', 'sourcekitd_path_sanitize.py')
|
|
|
|
config.substitutions.append( ('%sourcekitd-test', '%s -module-cache-path %r' % (config.sourcekitd_test, config.clang_module_cache_path)) )
|
|
config.substitutions.append( ('%complete-test', '%s -module-cache-path=%r' % (config.complete_test, config.clang_module_cache_path)) )
|
|
config.substitutions.append( ('%swiftlib_dir', config.swiftlib_dir) )
|
|
config.substitutions.append( ('%sed_clean', '%s %s' % (pipes.quote(sys.executable), sk_path_sanitize) ) )
|
|
|