diff --git a/aidge_core/unit_tests/test_export.py b/aidge_core/unit_tests/test_export.py index 3061d7940603b8eeca2c07368bc1bbd6756fa1f3..83018403c5ec309f2ae59696dd8219fcec058a51 100644 --- a/aidge_core/unit_tests/test_export.py +++ b/aidge_core/unit_tests/test_export.py @@ -75,9 +75,26 @@ class test_export(unittest.TestCase): install_path = os.path.join(sys.prefix, "lib", "libAidge") if "AIDGE_INSTALL" not in os.environ else os.environ["AIDGE_INSTALL"] shutil.copyfile(pathlib.Path(__file__).parent / "static/main.cpp", self.EXPORT_PATH / "main.cpp") + subprocess.check_call( + [ + "cmake", + str(self.EXPORT_PATH.absolute()), + f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}", + ], + cwd=str(self.EXPORT_PATH / "build"), + ) + subprocess.check_call( + ["cmake", "all", "install"], cwd=str(self.EXPORT_PATH / "build") + ) + self.check_call( + ["cmake", "--build", "."], + cwd=str(self.EXPORT_PATH / "build"), + ) + self.check_call( + ["cmake", "--install", "."], + cwd=str(self.EXPORT_PATH / "build"), + ) - subprocess.check_call(['cmake', str(self.EXPORT_PATH.absolute()), f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}'], cwd=str(self.EXPORT_PATH / "build")) - subprocess.check_call(['make', 'all', 'install'], cwd=str(self.EXPORT_PATH / "build")) if __name__ == '__main__': unittest.main()