]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix an issue with __PRETTY_FUNCTION__ and clang
authorMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 14 Oct 2013 14:52:35 +0000 (14:52 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 14 Oct 2013 14:52:35 +0000 (14:52 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31229 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/thread_validity_06.cc
tests/base/threads_01.cc
tests/base/threads_02.cc
tests/tests.h

index 799626be4998457f1a5037777f827e8fa19907ab..abb69f57abd6e0aea1c6d6d1bb6dd158765fd69c 100644 (file)
@@ -83,4 +83,8 @@ int main()
   deallog.threshold_double(1.e-10);
 
   test ();
+
+  deallog.detach();
+  logfile.close();
+  unify_pretty_function ("output");
 }
index 9f7e5eee7b8c9532ac0bf60aa287f8ca3ed4620d..5e1aba58382a9e5076fefe25a789679f1ef76af0 100644 (file)
@@ -2081,4 +2081,5 @@ X<8> x8;
   deallog.detach ();
   logfile.close ();
   sort_file_contents ("output");
+  unify_pretty_function ("output");
 }
index 81cbe489e740fcfce33bc0febb392dcbac12a0fb..89f3336b117116b66f556733df64b4848219ffcd 100644 (file)
@@ -2081,4 +2081,5 @@ X<8> x8;
   deallog.detach ();
   logfile.close ();
   sort_file_contents ("output");
+  unify_pretty_function ("output");
 }
index 641695c96c36de7460bd4644d8a727dd6d95627c..36c4b65cc323e759155fb99483a459566ef755f8 100644 (file)
@@ -231,6 +231,18 @@ void sort_file_contents (const std::string &filename)
 }
 
 
+/*
+ * Replace all occurences of ' &' by '& ' from the given file to hopefully be more compiler
+ * independent with respect to __PRETTY_FUNCTION__
+ */
+void unify_pretty_function (const std::string &filename)
+{
+  int error = std::system ((std::string ("sed -i -e 's/ \\&/ \\& /g' -e 's/ & ,/\\&,/g' -e 's/ \\& )/\\&)/g' -e 's/ \\& /\\& /g' ") + filename).c_str());
+  Assert (error == 0,
+         ExcInternalError());
+}
+
+
 
 
 

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.