Skip to content

Commit

Permalink
Merge pull request #9 from TUM-I5/sebastian/fix-tests
Browse files Browse the repository at this point in the history
sebastian/fix tests
  • Loading branch information
krenzland authored Jun 29, 2023
2 parents 8fb8f7e + 6a4dfb1 commit a156c1f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 531 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ XdmfWriter is released under BSD-3 (see [COPYING](COPYING))
Build Status
------------

[![Build Status](https://travis-ci.org/TUM-I5/XdmfWriter.svg?branch=master)](https://travis-ci.org/TUM-I5/XdmfWriter)
![Build Status](https://github.com/TUM-I5/XdmfWriter/actions/workflows/run-tests.yml/badge.svg)
8 changes: 5 additions & 3 deletions XdmfWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,12 @@ class XdmfWriter

// Open the backend
m_backend.open(m_outputPrefix, cellVariableData, vertexVariableData, m_timeStep == 0);
backup(m_outputPrefix);

// Write the XML file
if (m_rank == 0) {
std::string xdmfName = m_outputPrefix + ".xdmf";

backup(m_outputPrefix);

std::ofstream(xdmfName.c_str(), std::ios::app).close(); // Create the file (if it does not exist)
m_xdmfFile.open(xdmfName.c_str());

Expand Down Expand Up @@ -536,7 +535,10 @@ class XdmfWriter
* Backup an existing xdmf file
*/
void backup(const std::string &prefix)
{
{
if (m_timeStep != 0) {
return;
}
std::string fileName = prefix + ".xdmf";
// Backup any existing file
struct stat statBuffer;
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (WITH_HDF5)
find_package(HDF5 REQUIRED)
set(INCLUDES ${INCLUDES} ${HDF5_INCLUDE_DIRS})
set(LIBS ${LIBS} ${HDF5_LIBRARIES})
set(DEFS ${DEFS} USE_HDF5)
set(DEFS ${DEFS} USE_HDF)
endif()

set(INCLUDES ${INCLUDES} ".." "../submodules")
Expand Down
246 changes: 0 additions & 246 deletions test/SConstruct

This file was deleted.

Loading

0 comments on commit a156c1f

Please sign in to comment.