File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 14
14
from framework .defs import ARTIFACT_DIR
15
15
from framework .properties import global_props
16
16
from framework .utils import get_firecracker_version_from_toml , run_cmd
17
+ from framework .with_filelock import with_filelock
17
18
from host_tools .cargo_build import get_binary
18
19
19
20
@@ -131,6 +132,7 @@ def snapshot_version(self):
131
132
return "." .join (str (x ) for x in self .snapshot_version_tuple )
132
133
133
134
135
+ @with_filelock
134
136
def current_release (version ):
135
137
"""Massage this working copy Firecracker binary to look like a normal
136
138
release, so it can run the same tests.
@@ -139,8 +141,9 @@ def current_release(version):
139
141
for binary in ["firecracker" , "jailer" ]:
140
142
bin_path1 = get_binary (binary )
141
143
bin_path2 = bin_path1 .with_name (f"{ binary } -v{ version } " )
142
- bin_path2 .unlink (missing_ok = True )
143
- bin_path2 .hardlink_to (bin_path1 )
144
+ if not bin_path2 .exists ():
145
+ bin_path2 .unlink (missing_ok = True )
146
+ bin_path2 .hardlink_to (bin_path1 )
144
147
binaries .append (bin_path2 )
145
148
return binaries
146
149
You can’t perform that action at this time.
0 commit comments