@@ -105,7 +105,6 @@ def test_with_any_microvm(test_microvm_any):
105
105
SUPPORTED_CPU_TEMPLATES ,
106
106
SUPPORTED_CUSTOM_CPU_TEMPLATES ,
107
107
)
108
- from framework .with_filelock import with_filelock
109
108
from host_tools .ip_generator import network_config , subnet_generator
110
109
from host_tools .metrics import get_metrics_logger
111
110
@@ -255,15 +254,6 @@ def test_fc_session_root_path():
255
254
shutil .rmtree (fc_session_root_path )
256
255
257
256
258
- @with_filelock
259
- def _gcc_compile (src_file , output_file , extra_flags = "-static -O3" ):
260
- """Build a source file with gcc."""
261
- output_file = Path (output_file )
262
- if not output_file .exists ():
263
- compile_cmd = f"gcc { src_file } -o { output_file } { extra_flags } "
264
- utils .run_cmd (compile_cmd )
265
-
266
-
267
257
@pytest .fixture (scope = "session" )
268
258
def bin_cloner_path (test_fc_session_root_path ):
269
259
"""Build a binary that `clone`s into the jailer.
@@ -272,15 +262,15 @@ def bin_cloner_path(test_fc_session_root_path):
272
262
syscall directly.
273
263
"""
274
264
cloner_bin_path = os .path .join (test_fc_session_root_path , "newpid_cloner" )
275
- _gcc_compile ("host_tools/newpid_cloner.c" , cloner_bin_path )
265
+ build_tools . gcc_compile ("host_tools/newpid_cloner.c" , cloner_bin_path )
276
266
yield cloner_bin_path
277
267
278
268
279
269
@pytest .fixture (scope = "session" )
280
270
def bin_vsock_path (test_fc_session_root_path ):
281
271
"""Build a simple vsock client/server application."""
282
272
vsock_helper_bin_path = os .path .join (test_fc_session_root_path , "vsock_helper" )
283
- _gcc_compile ("host_tools/vsock_helper.c" , vsock_helper_bin_path )
273
+ build_tools . gcc_compile ("host_tools/vsock_helper.c" , vsock_helper_bin_path )
284
274
yield vsock_helper_bin_path
285
275
286
276
@@ -290,7 +280,7 @@ def change_net_config_space_bin(test_fc_session_root_path):
290
280
change_net_config_space_bin = os .path .join (
291
281
test_fc_session_root_path , "change_net_config_space"
292
282
)
293
- _gcc_compile (
283
+ build_tools . gcc_compile (
294
284
"host_tools/change_net_config_space.c" ,
295
285
change_net_config_space_bin ,
296
286
extra_flags = "-static" ,
0 commit comments