diff --git a/scripts/addons/cam/tests/install_addon.py b/scripts/addons/cam/tests/install_addon.py index a79fc676..2bc4175d 100644 --- a/scripts/addons/cam/tests/install_addon.py +++ b/scripts/addons/cam/tests/install_addon.py @@ -10,10 +10,18 @@ bpy.ops.preferences.addon_enable(module='cam') bpy.ops.wm.save_userpref() """ +NUM_RETRIES=10 + with tempfile.TemporaryDirectory() as td: file=pathlib.Path(td,"install.py") file.write_text(INSTALL_CODE) command = f'blender -b -P "{str(file)}"' - subprocess.run(command, shell=True, check=True) + # blender 4.0 installing addon crashes sometimes on mac github actions... + for x in range(NUM_RETRIES): + try: + subprocess.run(command, shell=True, check=True) + sys.exit(0) + except Exception as e: + print("Install addon failed, retrying:",e)