@@ -55,8 +55,7 @@ def setUp(self):
55
55
benchmark = False ,
56
56
benchmark_num_onone_iterations = 3 ,
57
57
benchmark_num_o_iterations = 3 ,
58
- enable_sil_ownership = False ,
59
- compilation_db = False )
58
+ enable_sil_ownership = False )
60
59
61
60
# Setup shell
62
61
shell .dry_run = True
@@ -83,7 +82,7 @@ def test_by_default_no_cmake_options(self):
83
82
toolchain = self .toolchain ,
84
83
source_dir = '/path/to/src' ,
85
84
build_dir = '/path/to/build' )
86
- self .assertEqual (swift .cmake_options , [])
85
+ self .assertEqual (swift .cmake_options , ['-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE' ])
87
86
88
87
def test_swift_runtime_tsan (self ):
89
88
self .args .enable_tsan_runtime = True
@@ -93,7 +92,8 @@ def test_swift_runtime_tsan(self):
93
92
source_dir = '/path/to/src' ,
94
93
build_dir = '/path/to/build' )
95
94
self .assertEqual (swift .cmake_options ,
96
- ['-DSWIFT_RUNTIME_USE_SANITIZERS=Thread' ])
95
+ ['-DSWIFT_RUNTIME_USE_SANITIZERS=Thread' ,
96
+ '-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE' ])
97
97
98
98
def test_swift_compiler_vendor_flags (self ):
99
99
self .args .compiler_vendor = "none"
@@ -229,7 +229,7 @@ def test_benchmark_flags(self):
229
229
self .assertEqual (
230
230
['-DSWIFT_BENCHMARK_NUM_ONONE_ITERATIONS=3' ,
231
231
'-DSWIFT_BENCHMARK_NUM_O_ITERATIONS=3' ],
232
- swift .cmake_options )
232
+ [ x for x in swift .cmake_options if 'SWIFT_BENCHMARK_NUM' in x ] )
233
233
234
234
self .args .benchmark_num_onone_iterations = 20
235
235
swift = Swift (
@@ -240,7 +240,7 @@ def test_benchmark_flags(self):
240
240
self .assertEqual (
241
241
['-DSWIFT_BENCHMARK_NUM_ONONE_ITERATIONS=20' ,
242
242
'-DSWIFT_BENCHMARK_NUM_O_ITERATIONS=3' ],
243
- swift .cmake_options )
243
+ [ x for x in swift .cmake_options if 'SWIFT_BENCHMARK_NUM' in x ] )
244
244
self .args .benchmark_num_onone_iterations = 3
245
245
246
246
self .args .benchmark_num_o_iterations = 30
@@ -252,7 +252,7 @@ def test_benchmark_flags(self):
252
252
self .assertEqual (
253
253
['-DSWIFT_BENCHMARK_NUM_ONONE_ITERATIONS=3' ,
254
254
'-DSWIFT_BENCHMARK_NUM_O_ITERATIONS=30' ],
255
- swift .cmake_options )
255
+ [ x for x in swift .cmake_options if 'SWIFT_BENCHMARK_NUM' in x ] )
256
256
self .args .benchmark_num_onone_iterations = 3
257
257
258
258
self .args .benchmark_num_onone_iterations = 10
@@ -265,7 +265,7 @@ def test_benchmark_flags(self):
265
265
self .assertEqual (
266
266
['-DSWIFT_BENCHMARK_NUM_ONONE_ITERATIONS=10' ,
267
267
'-DSWIFT_BENCHMARK_NUM_O_ITERATIONS=25' ],
268
- swift .cmake_options )
268
+ [ x for x in swift .cmake_options if 'SWIFT_BENCHMARK_NUM' in x ] )
269
269
270
270
def test_sil_ownership_flags (self ):
271
271
self .args .enable_sil_ownership = True
@@ -276,15 +276,4 @@ def test_sil_ownership_flags(self):
276
276
build_dir = '/path/to/build' )
277
277
self .assertEqual (
278
278
['-DSWIFT_STDLIB_ENABLE_SIL_OWNERSHIP=TRUE' ],
279
- swift .cmake_options )
280
-
281
- def test_compilation_db_flags (self ):
282
- self .args .compilation_db = True
283
- swift = Swift (
284
- args = self .args ,
285
- toolchain = self .toolchain ,
286
- source_dir = '/path/to/src' ,
287
- build_dir = '/path/to/build' )
288
- self .assertEqual (
289
- ['-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE' ],
290
- swift .cmake_options )
279
+ [x for x in swift .cmake_options if 'SWIFT_STDLIB_ENABLE_SIL_OWNERSHIP' in x ])
0 commit comments