From 7fa698127d9decd4e7ae55b9f1e564460b2175cb Mon Sep 17 00:00:00 2001
From: Tobias Meisel <tobias.meisel@ufz.de>
Date: Thu, 19 Aug 2021 15:43:01 +0200
Subject: [PATCH] [MeL/IO] HDF/XDMF: Reenable hdf5/xdmf tests and fix for
 windows

On Windows absolute path inside xdmf to hdf was incorrect. Fix to relative path because file must be transferable
---
 MeshLib/IO/XDMF/XdmfHdfWriter.cpp | 8 ++++----
 ProcessLib/LiquidFlow/Tests.cmake | 4 +---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/MeshLib/IO/XDMF/XdmfHdfWriter.cpp b/MeshLib/IO/XDMF/XdmfHdfWriter.cpp
index c84c0fe906d..9230a80ad6e 100644
--- a/MeshLib/IO/XDMF/XdmfHdfWriter.cpp
+++ b/MeshLib/IO/XDMF/XdmfHdfWriter.cpp
@@ -119,10 +119,10 @@ XdmfHdfWriter::XdmfHdfWriter(MeshLib::Mesh const& mesh,
 
     if (isFileManager())
     {
-        auto xdmf_writer_fn =
-            write_xdmf(geometry.xdmf, topology.xdmf, xdmf_constant_attributes,
-                       xdmf_variable_attributes, hdf_filepath.string(),
-                       GitInfoLib::GitInfo::ogs_version);
+        auto xdmf_writer_fn = write_xdmf(
+            geometry.xdmf, topology.xdmf, xdmf_constant_attributes,
+            xdmf_variable_attributes, hdf_filepath.filename().string(),
+            GitInfoLib::GitInfo::ogs_version);
         _xdmf_writer = std::make_unique<XdmfWriter>(xdmf_filepath.string(),
                                                     xdmf_writer_fn);
         _xdmf_writer->addTimeStep(initial_time);
diff --git a/ProcessLib/LiquidFlow/Tests.cmake b/ProcessLib/LiquidFlow/Tests.cmake
index d2a4af6a0e1..a302aca4543 100644
--- a/ProcessLib/LiquidFlow/Tests.cmake
+++ b/ProcessLib/LiquidFlow/Tests.cmake
@@ -482,9 +482,7 @@ AddTest(
     WRAPPER time
     TESTER xdmfdiff
     # See https://gitlab.opengeosys.org/ogs/ogs/-/merge_requests/3184#note_85104
-    # TODO: re-enable this, see #3177.
-    # REQUIREMENTS NOT OGS_USE_MPI AND NOT COMPILER_IS_APPLE_CLANG
-    REQUIREMENTS OFF
+    REQUIREMENTS NOT OGS_USE_MPI AND NOT COMPILER_IS_APPLE_CLANG
     DIFF_DATA
     square_5x5_tris_32.xdmf square_5x5_tris_32.xdmf pressure pressure 1e-7 1e-13
     square_5x5_tris_32.xdmf square_5x5_tris_32.xdmf HydraulicFlow HydraulicFlow 1e-7 1e-13
-- 
GitLab