From 87e299fd291e7b1cc7ea84d501a612681fbd39f6 Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Fri, 6 Dec 2019 18:46:14 +0100 Subject: [PATCH] Bugfix: comparison of generated and expected files normalized paths error occured when using folders that can be accessed with two different paths via symlinks --- pystencils_walberla/cmake_integration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pystencils_walberla/cmake_integration.py b/pystencils_walberla/cmake_integration.py index b15a707..4bc5586 100644 --- a/pystencils_walberla/cmake_integration.py +++ b/pystencils_walberla/cmake_integration.py @@ -28,8 +28,10 @@ class CodeGeneration: def __exit__(self, *args): if self.expected_files and (set(self.context.files_written) != set(self.expected_files)): - only_in_cmake = set(self.expected_files) - set(self.context.files_written) - only_generated = set(self.context.files_written) - set(self.expected_files) + expected = set(os.path.realpath(f) for f in self.expected_files) + written = set(os.path.realpath(f) for f in self.context.files_written) + only_in_cmake = expected - written + only_generated = written - expected error_message = "Generated files specified not correctly in cmake with 'waLBerla_python_file_generates'\n" if only_in_cmake: error_message += "Files only specified in CMake {}\n".format( -- GitLab