Skip to content
Snippets Groups Projects
Commit 87e299fd authored by Martin Bauer's avatar Martin Bauer
Browse files

Bugfix: comparison of generated and expected files normalized paths

error occured when using folders that can be accessed with two different paths via symlinks
parent 8c13106a
No related branches found
No related tags found
No related merge requests found
...@@ -28,8 +28,10 @@ class CodeGeneration: ...@@ -28,8 +28,10 @@ class CodeGeneration:
def __exit__(self, *args): def __exit__(self, *args):
if self.expected_files and (set(self.context.files_written) != set(self.expected_files)): 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) expected = set(os.path.realpath(f) for f in self.expected_files)
only_generated = set(self.context.files_written) - set(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" error_message = "Generated files specified not correctly in cmake with 'waLBerla_python_file_generates'\n"
if only_in_cmake: if only_in_cmake:
error_message += "Files only specified in CMake {}\n".format( error_message += "Files only specified in CMake {}\n".format(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment