@@ -100,7 +100,7 @@ def test_get_toolchain_path_from_options_gcc_toolchain(requests_mock):
100
100
install_context = mock .Mock (spec_set = InstallationContext )
101
101
build_config = create_test_build_config ()
102
102
builder = LibraryBuilder (
103
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
103
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
104
104
)
105
105
106
106
options = "--gcc-toolchain=/opt/gcc-11 -O2"
@@ -114,7 +114,7 @@ def test_get_toolchain_path_from_options_gxx_name(requests_mock):
114
114
install_context = mock .Mock (spec_set = InstallationContext )
115
115
build_config = create_test_build_config ()
116
116
builder = LibraryBuilder (
117
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
117
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
118
118
)
119
119
120
120
options = "--gxx-name=/opt/gcc/bin/g++ -std=c++17"
@@ -128,7 +128,7 @@ def test_get_toolchain_path_from_options_none(requests_mock):
128
128
install_context = mock .Mock (spec_set = InstallationContext )
129
129
build_config = create_test_build_config ()
130
130
builder = LibraryBuilder (
131
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
131
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
132
132
)
133
133
134
134
options = "-O2 -std=c++17"
@@ -142,7 +142,7 @@ def test_get_sysroot_path_from_options(requests_mock):
142
142
install_context = mock .Mock (spec_set = InstallationContext )
143
143
build_config = create_test_build_config ()
144
144
builder = LibraryBuilder (
145
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
145
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
146
146
)
147
147
148
148
options = "--sysroot=/opt/sysroot -O2"
@@ -156,7 +156,7 @@ def test_get_std_ver_from_options(requests_mock):
156
156
install_context = mock .Mock (spec_set = InstallationContext )
157
157
build_config = create_test_build_config ()
158
158
builder = LibraryBuilder (
159
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
159
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
160
160
)
161
161
162
162
options = "-std=c++17 -O2"
@@ -170,7 +170,7 @@ def test_get_std_lib_from_options(requests_mock):
170
170
install_context = mock .Mock (spec_set = InstallationContext )
171
171
build_config = create_test_build_config ()
172
172
builder = LibraryBuilder (
173
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
173
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
174
174
)
175
175
176
176
options = "-stdlib=libc++ -O2"
@@ -184,7 +184,7 @@ def test_get_target_from_options(requests_mock):
184
184
install_context = mock .Mock (spec_set = InstallationContext )
185
185
build_config = create_test_build_config ()
186
186
builder = LibraryBuilder (
187
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
187
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
188
188
)
189
189
190
190
options = "-target x86_64-linux-gnu -O2"
@@ -198,7 +198,7 @@ def test_replace_optional_arg_with_value(requests_mock):
198
198
install_context = mock .Mock (spec_set = InstallationContext )
199
199
build_config = create_test_build_config ()
200
200
builder = LibraryBuilder (
201
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
201
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
202
202
)
203
203
204
204
arg = "cmake -DARCH=%arch% -DBUILD=%buildtype%"
@@ -212,7 +212,7 @@ def test_replace_optional_arg_no_value(requests_mock):
212
212
install_context = mock .Mock (spec_set = InstallationContext )
213
213
build_config = create_test_build_config ()
214
214
builder = LibraryBuilder (
215
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
215
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
216
216
)
217
217
218
218
arg = "cmake %arch?% -DBUILD=%buildtype%"
@@ -226,7 +226,7 @@ def test_expand_make_arg(requests_mock):
226
226
install_context = mock .Mock (spec_set = InstallationContext )
227
227
build_config = create_test_build_config ()
228
228
builder = LibraryBuilder (
229
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
229
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
230
230
)
231
231
232
232
arg = "-DARCH=%arch% -DBUILD=%buildtype% -DSTD=%stdver%"
@@ -242,7 +242,7 @@ def test_get_conan_hash_success(mock_subprocess, requests_mock):
242
242
install_context .dry_run = False
243
243
build_config = create_test_build_config ()
244
244
builder = LibraryBuilder (
245
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
245
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
246
246
)
247
247
248
248
mock_subprocess .return_value = b"conanfile.py: ID: abc123def456\n Other output"
@@ -263,7 +263,7 @@ def test_execute_build_script_success(mock_subprocess, requests_mock):
263
263
install_context = mock .Mock (spec_set = InstallationContext )
264
264
build_config = create_test_build_config ()
265
265
builder = LibraryBuilder (
266
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
266
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
267
267
)
268
268
269
269
mock_subprocess .return_value = 0
@@ -281,7 +281,7 @@ def test_execute_build_script_timeout(mock_subprocess, requests_mock):
281
281
install_context = mock .Mock (spec_set = InstallationContext )
282
282
build_config = create_test_build_config ()
283
283
builder = LibraryBuilder (
284
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
284
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
285
285
)
286
286
287
287
mock_subprocess .side_effect = TimeoutExpired ("cmd" , 600 )
@@ -298,7 +298,7 @@ def test_conanproxy_login_success(mock_get_ssm, requests_mock):
298
298
install_context = mock .Mock (spec_set = InstallationContext )
299
299
build_config = create_test_build_config ()
300
300
builder = LibraryBuilder (
301
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
301
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
302
302
)
303
303
304
304
mock_get_ssm .return_value = "test_password"
@@ -321,7 +321,7 @@ def test_conanproxy_login_with_env_var(mock_get_ssm, requests_mock):
321
321
install_context = mock .Mock (spec_set = InstallationContext )
322
322
build_config = create_test_build_config ()
323
323
builder = LibraryBuilder (
324
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
324
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
325
325
)
326
326
327
327
mock_response = mock .Mock ()
@@ -342,7 +342,7 @@ def test_does_compiler_support_fixed_target_match(requests_mock):
342
342
install_context = mock .Mock (spec_set = InstallationContext )
343
343
build_config = create_test_build_config ()
344
344
builder = LibraryBuilder (
345
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
345
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
346
346
)
347
347
348
348
result = builder .does_compiler_support ("/usr/bin/gcc" , "gcc" , "x86_64-linux-gnu" , "-target x86_64-linux-gnu" , "" )
@@ -355,7 +355,7 @@ def test_does_compiler_support_fixed_target_mismatch(requests_mock):
355
355
install_context = mock .Mock (spec_set = InstallationContext )
356
356
build_config = create_test_build_config ()
357
357
builder = LibraryBuilder (
358
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
358
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
359
359
)
360
360
361
361
result = builder .does_compiler_support ("/usr/bin/gcc" , "gcc" , "x86" , "-target x86_64-linux-gnu" , "" )
@@ -368,7 +368,7 @@ def test_script_env_linux(requests_mock):
368
368
install_context = mock .Mock (spec_set = InstallationContext )
369
369
build_config = create_test_build_config ()
370
370
builder = LibraryBuilder (
371
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
371
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
372
372
)
373
373
374
374
result = builder .script_env ("CC" , "/usr/bin/gcc" )
@@ -382,7 +382,7 @@ def test_count_headers(mock_glob, requests_mock):
382
382
install_context = mock .Mock (spec_set = InstallationContext )
383
383
build_config = create_test_build_config ()
384
384
builder = LibraryBuilder (
385
- logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux
385
+ logger , "cpp" , "testlib" , "1.0.0" , "/tmp/source" , install_context , build_config , False , LibraryPlatform .Linux , 1
386
386
)
387
387
388
388
mock_glob .side_effect = [
0 commit comments