[validation] Only run one benchmark at a time in service.
@@ -210,6 +210,9 @@ def _compile_and_run_bitcode_file(
"USER": os.environ.get("USER", ""),
}
+ # Only one benchmark can be executed at a time by a service.
+ # NOTE this assumes that the parent of cwd is the service working directory.
+ with fasteners.InterProcessLock(cwd / "../benchmark_exec.lock"):
process = subprocess.Popen(
cmd,
shell=True,
