Unbundling tinyxml2 from gromacs and using our own, which is newer, broke gromacs build. This patch fixes this issue: - Error handling API changed, fix the testutils/refdata_xml.cpp code by using the new API: document.ErrorStr() & tinyxml2::XML_SUCCESS. Those fixes will be submitted for inclusion to upstream, but may not be suitable there as long as they still keep the old version bundled. First hunk has already been requested for merging. Third is in discussion. Second will only be sent if third is OK'ed. diff --git a/CMakeLists.txt b/CMakeLists.txt index cd748c9..1e90c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -539,9 +539,6 @@ if(GMX_EXTERNAL_TINYXML2) if(NOT HAVE_TINYXML2) message(FATAL_ERROR "External TinyXML-2 could not be found, please adjust your search paths") endif() - if (TinyXML2_FOUND AND TinyXML2_VERSION VERSION_GREATER "6") - message(FATAL_ERROR "External TinyXML-2 is later than the highest supported version 6. Please adjust your search paths to include a supported version") - endif() endif() option(GMX_EXTRAE "Add support for tracing using EXTRAE" OFF) diff --git a/src/testutils/refdata_xml.cpp b/src/testutils/refdata_xml.cpp index 0eb2209..57cebff 100644 --- a/src/testutils/refdata_xml.cpp +++ b/src/testutils/refdata_xml.cpp @@ -206,21 +206,12 @@ ReferenceDataEntry::EntryPointer readReferenceDataFile(const std::string& path) document.LoadFile(path.c_str()); if (document.Error()) { - const char* errorStr1 = document.GetErrorStr1(); - const char* errorStr2 = document.GetErrorStr2(); + const char* errorStr = document.ErrorStr(); std::string errorString("Error was "); - if (errorStr1) - { - errorString += errorStr1; - } - if (errorStr2) - { - errorString += errorStr2; - } - if (!errorStr1 && !errorStr2) - { + if (errorStr) + errorString += errorStr; + else errorString += "not specified."; - } GMX_THROW(TestException("Reference data not parsed successfully: " + path + "\n." + errorString + "\n")); } @@ -371,7 +362,7 @@ void writeReferenceDataFile(const std::string& path, const ReferenceDataEntry& r XMLElementPtr rootElement = createRootElement(&document); createChildElements(rootElement, rootEntry); - if (document.SaveFile(path.c_str()) != tinyxml2::XML_NO_ERROR) + if (document.SaveFile(path.c_str()) != tinyxml2::XML_SUCCESS) { GMX_THROW(TestException("Reference data saving failed in " + path)); } 6fe506ab'>gnu: Remove squashfs-tools-next....Ricardo Wurmus 2019-08-27pack: Create /tmp in Docker images....Ludovic Courtès 2019-03-24tests: Adjust 'guix pack -f squashfs' test....Ludovic Courtès 2018-11-06store-copy: Canonicalize the mtime and permissions of the store copy....Ludovic Courtès 2018-11-06pack: Add test for 'self-contained-tarball' with localstatedir....Ludovic Courtès 2018-11-06pack: Squashfs backend now honors '--localstatedir'....Ludovic Courtès 2018-11-06pack: Docker backend now honors '--localstatedir'....Ludovic Courtès 2018-11-06pack: Import (guix store database) only when '--localstatedir' is passed....Ludovic Courtès 2018-10-28tests: Fix typo....Ludovic Courtès 2018-10-19tests: Run 'guix pack' tests using the external store....Ludovic Courtès 2018-09-18tests: Skip 'self-contained-tarball' test unconditionally....Ludovic Courtès 2018-06-01pack: Adjust test to expect relative symlinks....Ludovic Courtès 2018-06-01tests: Fix arguments in pack test....Ricardo Wurmus 2017-03-22tests: Skip 'guix pack' test when networking is unavailable....Ludovic Courtès 2017-03-17pack: Move absolute file name to <compressor>....Ludovic Courtès 2017-03-14pack: Add unit test....Ludovic Courtès