Salome HOME
debug of automatic tests
authorasl <asl@opencascade.com>
Thu, 16 Nov 2017 16:38:04 +0000 (19:38 +0300)
committerasl <asl@opencascade.com>
Thu, 16 Nov 2017 16:38:04 +0000 (19:38 +0300)
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx

index 1da14b7e85e2c6e14de5156d5013b2c41454369d..51b61ce9de03ddc6591f8db2492500fcd3f8fa74 100644 (file)
@@ -438,9 +438,17 @@ bool TestViewer::areScriptsEqual( const QString& theBaseName,
 
   QFile anExpected( anExpectedRefFilePath );
   QFile anActual( anActualFilePath );
-  if( !anExpected.open( QFile::ReadOnly | QFile::Text ) ||
-      !anActual.open  ( QFile::ReadOnly | QFile::Text ) )
+  if( !anExpected.open( QFile::ReadOnly | QFile::Text ) )
+  {
+    theMsg = "Expected file cannot be opened: " + anExpectedRefFilePath;
+    return false;
+  }
+
+  if( !anActual.open( QFile::ReadOnly | QFile::Text ) )
+  {
+    theMsg = "Actual file cannot be opened: " + anActualFilePath;
     return false;
+  }
 
   for( int i=0; i<theLinesToOmit; i++ )
     anExpected.readLine();
index 62d6a75f62750abaa00b381d63b12a67a52a2e3e..a958adb0038bf956a7b849a5fd525f2e4990061e 100644 (file)
@@ -1108,7 +1108,11 @@ void test_HYDROData_LandCoverMap::test_export_telemac()
   CPPUNIT_ASSERT_EQUAL( true, aMap->LocalPartition( aLC3, type9 ) );
 
   QString aTmpFileName = "test.telemac";
+#ifdef WIN32
   QString aTmpPath = QDir::tempPath() + "/" + aTmpFileName;
+#else
+  QString aTmpPath = QDir::tempPath() + "/hydro/" + aTmpFileName;
+#endif
   QString messStat;
   CPPUNIT_ASSERT_EQUAL( true, aMap->ExportTelemac( aTmpPath, 1E-4, aTable, messStat ) );
   CPPUNIT_ASSERT_SCRIPTS_EQUAL( aTmpFileName, true, true, 0 );