]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Run second part of test only if it's different from the first. Adjust test output.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 8 Oct 2013 12:41:27 +0000 (12:41 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 8 Oct 2013 12:41:27 +0000 (12:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@31169 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/path_search.cc
tests/base/path_search/cmp/generic

index 4f0faa9b8cc303c29fff85c1b557a5b0ed9be657..eaa59d4ff0f525e045617fc4dac28466cd89dff3 100644 (file)
@@ -146,22 +146,24 @@ PathSearch::find (const std::string &filename,
          }
       }
 
-      // try again with the suffix appended
-      {
-       real_name = *path + filename + suffix;
-       if (debug > 1)
-         deallog << "PathSearch[" << cls << "] trying "
-                 << real_name << std::endl;
-       FILE *fp = fopen(real_name.c_str(), open_mode);
-       if (fp != 0)
-         {
-           if (debug > 0)
-             deallog << "PathSearch[" << cls << "] opened "
-                     << real_name << std::endl;
-           fclose(fp);
-           return real_name;
-         }
-      }
+      // try again with the suffix appended, unless there is
+      // no suffix
+      if (suffix != "")
+        {
+          real_name = *path + filename + suffix;
+          if (debug > 1)
+            deallog << "PathSearch[" << cls << "] trying "
+            << real_name << std::endl;
+          FILE *fp = fopen(real_name.c_str(), open_mode);
+          if (fp != 0)
+            {
+              if (debug > 0)
+                deallog << "PathSearch[" << cls << "] opened "
+                << real_name << std::endl;
+              fclose(fp);
+              return real_name;
+            }
+        }
     }
   AssertThrow(false, ExcFileNotFound(filename, cls));
   return std::string("");
index fda4b157f393bdc6a05e52235c18f6580291b5a0..f7448712a24abea5ce4db80c5ca0f3dfa8bcb391 100644 (file)
@@ -17,8 +17,11 @@ DEAL::PathSearch[CC] trying ../scripts/tests
 DEAL::PathSearch[CC] trying tests
 DEAL::PathSearch[CC] trying ../tests
 DEAL::PathSearch[CC] 3 directories 
+DEAL::PathSearch[CC] trying ../scripts/tests
 DEAL::PathSearch[CC] trying ../scripts/tests.h
+DEAL::PathSearch[CC] trying tests
 DEAL::PathSearch[CC] trying tests.h
+DEAL::PathSearch[CC] trying ../tests
 DEAL::PathSearch[CC] trying ../tests.h
 DEAL::PathSearch[CC] opened ../tests.h
 DEAL::../tests.h
@@ -31,25 +34,39 @@ DEAL::PathSearch[MESH] 2 directories
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.inp
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.inp
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.xda
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.xda
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.dbmesh
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.dbmesh
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.dat
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.dat
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.plt
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.plt
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.nc
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.nc
 DEAL::PathSearch[MESH] 2 directories 
+DEAL::PathSearch[MESH] trying grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying grid_in_msh_01.2d.msh
+DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d
 DEAL::PathSearch[MESH] trying ../bits/grid_in_msh_01.2d.msh
 DEAL::PathSearch[MESH] opened ../bits/grid_in_msh_01.2d.msh
 DEAL:: $NOD 4 1 0

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.