From 789dcde9270c31ef12373619a9315c6a34cb6120 Mon Sep 17 00:00:00 2001
From: Scott Wittenburg <scott.wittenburg@kitware.com>
Date: Thu, 14 Sep 2017 18:32:04 -0600
Subject: [PATCH] Address some test failures on windows

---
 appveyor.yml                                         |  2 --
 scripts/appveyor/av_default.cmake                    |  1 -
 .../adios2/interface/TestADIOSDefineAttribute.cpp    | 12 ++++++------
 testing/adios2/interface/TestADIOSInterfaceWrite.cpp |  8 ++++----
 testing/adios2/xml/TestXMLConfig.cpp                 |  1 +
 testing/adios2/xml/config1.xml                       |  2 +-
 6 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 28e0643cc..d0e4f72b4 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -19,8 +19,6 @@ platform:
 
 before_build:
 - del /q /f "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
-### uncomment "set" to see environment in build logs
-- set
 - cd C:\projects\adios2
 - git reset --hard %APPVEYOR_PULL_REQUEST_HEAD_COMMIT%
 - ps: |
diff --git a/scripts/appveyor/av_default.cmake b/scripts/appveyor/av_default.cmake
index 64e4c117b..81ad4fbbb 100644
--- a/scripts/appveyor/av_default.cmake
+++ b/scripts/appveyor/av_default.cmake
@@ -3,7 +3,6 @@ set(CTEST_SITE "AppVeyor")
 set(CTEST_BUILD_CONFIGURATION Release)
 set(CTEST_CONFIGURATION_TYPE Release)
 set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
-# set(CTEST_BUILD_FLAGS "-k -j4")
 set(CTEST_TEST_ARGS PARALLEL_LEVEL 4)
 
 message("av_default.cmake, CTEST_BUILD_NAME=${CTEST_BUILD_NAME}, push build notes is ADIOS_CTEST_SUBMIT_NOTES=${ADIOS_CTEST_SUBMIT_NOTES}")
diff --git a/testing/adios2/interface/TestADIOSDefineAttribute.cpp b/testing/adios2/interface/TestADIOSDefineAttribute.cpp
index f9942b5fa..70d25a10d 100644
--- a/testing/adios2/interface/TestADIOSDefineAttribute.cpp
+++ b/testing/adios2/interface/TestADIOSDefineAttribute.cpp
@@ -155,7 +155,7 @@ TEST_F(ADIOSDefineAttributeTest, DefineAttributeTypeByValue)
     EXPECT_EQ(attributeI64.m_Name, i64_Single);
     EXPECT_EQ(attributeI64.m_DataSingleValue, currentTestData.I64.front());
     EXPECT_EQ(attributeI64.m_Elements, 1);
-    EXPECT_EQ(attributeI64.m_Type, "long int");
+    EXPECT_EQ(sizeof(attributeI64.m_DataSingleValue), 8);
 
     ASSERT_EQ(attributeU8.m_IsSingleValue, true);
     ASSERT_EQ(attributeU8.m_DataArray.empty(), true);
@@ -183,7 +183,7 @@ TEST_F(ADIOSDefineAttributeTest, DefineAttributeTypeByValue)
     EXPECT_EQ(attributeU64.m_Name, u64_Single);
     EXPECT_EQ(attributeU64.m_DataSingleValue, currentTestData.U64.front());
     EXPECT_EQ(attributeU64.m_Elements, 1);
-    EXPECT_EQ(attributeU64.m_Type, "unsigned long int");
+    EXPECT_EQ(sizeof(attributeU64.m_DataSingleValue), 8);
 
     ASSERT_EQ(attributeFloat.m_IsSingleValue, true);
     ASSERT_EQ(attributeFloat.m_DataArray.empty(), true);
@@ -305,7 +305,7 @@ TEST_F(ADIOSDefineAttributeTest, DefineAttributeTypeByReference)
     ASSERT_EQ(attributeI64.m_DataArray.empty(), false);
     EXPECT_EQ(attributeI64.m_Name, i64_Single);
     EXPECT_EQ(attributeI64.m_Elements, numberOfElements);
-    EXPECT_EQ(attributeI64.m_Type, "long int");
+    EXPECT_EQ(sizeof(attributeI64.m_DataSingleValue), 8);
 
     ASSERT_EQ(attributeU8.m_IsSingleValue, false);
     ASSERT_EQ(attributeU8.m_DataArray.empty(), false);
@@ -329,7 +329,7 @@ TEST_F(ADIOSDefineAttributeTest, DefineAttributeTypeByReference)
     ASSERT_EQ(attributeU64.m_DataArray.empty(), false);
     EXPECT_EQ(attributeU64.m_Name, u64_Single);
     EXPECT_EQ(attributeU64.m_Elements, numberOfElements);
-    EXPECT_EQ(attributeU64.m_Type, "unsigned long int");
+    EXPECT_EQ(sizeof(attributeU64.m_DataSingleValue), 8);
 
     ASSERT_EQ(attributeFloat.m_IsSingleValue, false);
     ASSERT_EQ(attributeFloat.m_DataArray.empty(), false);
@@ -480,7 +480,7 @@ TEST_F(ADIOSDefineAttributeTest, GetAttribute)
     ASSERT_EQ(attributeI64.m_DataArray.empty(), false);
     EXPECT_EQ(attributeI64.m_Name, i64_Single);
     EXPECT_EQ(attributeI64.m_Elements, numberOfElements);
-    EXPECT_EQ(attributeI64.m_Type, "long int");
+    EXPECT_EQ(sizeof(attributeI64.m_DataSingleValue), 8);
 
     ASSERT_EQ(attributeU8.m_IsSingleValue, false);
     ASSERT_EQ(attributeU8.m_DataArray.empty(), false);
@@ -504,7 +504,7 @@ TEST_F(ADIOSDefineAttributeTest, GetAttribute)
     ASSERT_EQ(attributeU64.m_DataArray.empty(), false);
     EXPECT_EQ(attributeU64.m_Name, u64_Single);
     EXPECT_EQ(attributeU64.m_Elements, numberOfElements);
-    EXPECT_EQ(attributeU64.m_Type, "unsigned long int");
+    EXPECT_EQ(sizeof(attributeU64.m_DataSingleValue), 8);
 
     ASSERT_EQ(attributeFloat.m_IsSingleValue, false);
     ASSERT_EQ(attributeFloat.m_DataArray.empty(), false);
diff --git a/testing/adios2/interface/TestADIOSInterfaceWrite.cpp b/testing/adios2/interface/TestADIOSInterfaceWrite.cpp
index 1246fedb8..ff5513afe 100644
--- a/testing/adios2/interface/TestADIOSInterfaceWrite.cpp
+++ b/testing/adios2/interface/TestADIOSInterfaceWrite.cpp
@@ -151,7 +151,7 @@ TEST_F(ADIOSInterfaceWriteTest, DefineVar_int64_t_1x10)
     EXPECT_EQ(var_int64_t.m_Count.size(), 1);
     EXPECT_EQ(var_int64_t.m_Count[0], 10);
     EXPECT_EQ(var_int64_t.m_Name, name);
-    EXPECT_EQ(var_int64_t.m_Type, "long int");
+    EXPECT_EQ(var_int64_t.m_ElementSize, 8);
 }
 
 TEST_F(ADIOSInterfaceWriteTest, DefineVar_uint8_t_1x10)
@@ -283,7 +283,7 @@ TEST_F(ADIOSInterfaceWriteTest, DefineVar_uint64_t_1x10)
     EXPECT_EQ(var_uint64_t.m_Count.size(), 1);
     EXPECT_EQ(var_uint64_t.m_Count[0], 10);
     EXPECT_EQ(var_uint64_t.m_Name, name);
-    EXPECT_EQ(var_uint64_t.m_Type, "unsigned long int");
+    EXPECT_EQ(var_uint64_t.m_ElementSize, 8);
 }
 
 // Rinse  and repeat for remaining types
@@ -422,7 +422,7 @@ TEST_F(ADIOSInterfaceWriteTest, DefineVar_int64_t_2x5)
     EXPECT_EQ(var_int64_t.m_Count[0], 2);
     EXPECT_EQ(var_int64_t.m_Count[1], 5);
     EXPECT_EQ(var_int64_t.m_Name, name);
-    EXPECT_EQ(var_int64_t.m_Type, "long int");
+    EXPECT_EQ(var_int64_t.m_ElementSize, 8);
 }
 
 TEST_F(ADIOSInterfaceWriteTest, DefineVar_uint8_t_2x5)
@@ -558,7 +558,7 @@ TEST_F(ADIOSInterfaceWriteTest, DefineVar_uint64_t_2x5)
     EXPECT_EQ(var_uint64_t.m_Count[0], 2);
     EXPECT_EQ(var_uint64_t.m_Count[1], 5);
     EXPECT_EQ(var_uint64_t.m_Name, name);
-    EXPECT_EQ(var_uint64_t.m_Type, "unsigned long int");
+    EXPECT_EQ(var_uint64_t.m_ElementSize, 8);
 }
 
 int main(int argc, char **argv)
diff --git a/testing/adios2/xml/TestXMLConfig.cpp b/testing/adios2/xml/TestXMLConfig.cpp
index 5d3cb161b..72bbdffe5 100644
--- a/testing/adios2/xml/TestXMLConfig.cpp
+++ b/testing/adios2/xml/TestXMLConfig.cpp
@@ -25,6 +25,7 @@ protected:
 TEST_F(XMLConfigTest, TwoIOs)
 {
     std::string configFile = configDir + "/config1.xml";
+
 #ifdef ADIOS2_HAVE_MPI
     adios2::ADIOS adios(configFile, MPI_COMM_WORLD, adios2::DebugON);
 #else
diff --git a/testing/adios2/xml/config1.xml b/testing/adios2/xml/config1.xml
index 9afe2d910..f4d644631 100644
--- a/testing/adios2/xml/config1.xml
+++ b/testing/adios2/xml/config1.xml
@@ -9,7 +9,7 @@
             <parameter key="BufferGrowthFactor" value="2"/>
         </engine>
         <transport type="File">
-            <parameter key="Library" value="POSIX"/>
+            <parameter key="Library" value="fstream"/>
             <parameter key="ProfileUnits" value="Milliseconds"/>
         </transport>
     </io>
-- 
GitLab