List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:August 22 2008 3:50pm
Subject:bzr push into mysql-5.1 branch (jonas:2674)
View as plain text  
 2674 Jonas Oreland	2008-08-22 [merge]
      merge 6.2 to 6.3
modified:
  storage/ndb/test/run-test/atrt-analyze-result.sh
  storage/ndb/test/run-test/files.cpp

=== modified file 'storage/ndb/test/run-test/atrt-analyze-result.sh'
--- a/storage/ndb/test/run-test/atrt-analyze-result.sh	2005-04-27 01:19:54 +0000
+++ b/storage/ndb/test/run-test/atrt-analyze-result.sh	2008-08-22 13:25:17 +0000
@@ -1,5 +1,17 @@
 #!/bin/sh
 
+p="`pwd`"
+bt=`find result -name bt.sh`
+if [ "$bt" ]
+then
+    for i in $bt
+    do
+	cd `dirname $i`
+	sh ./bt.sh || true
+	cd "$p"
+    done
+fi
+
 f=`find result -name 'log.out' | xargs grep "NDBT_ProgramExit: " | grep -c "Failed"`
 o=`find result -name 'log.out' | xargs grep "NDBT_ProgramExit: " | grep -c "OK"`
 

=== modified file 'storage/ndb/test/run-test/files.cpp'
--- a/storage/ndb/test/run-test/files.cpp	2007-04-02 06:39:58 +0000
+++ b/storage/ndb/test/run-test/files.cpp	2008-08-22 13:25:17 +0000
@@ -270,21 +270,49 @@ setup_files(atrt_config& config, int set
       }
       free(env);
       
-      tmp.assfmt("%s/ssh-login.sh", proc.m_proc.m_cwd.c_str());
-      FILE* fenv = fopen(tmp.c_str(), "w+");
-      if (fenv == 0)
       {
-	g_logger.error("Failed to open %s for writing", tmp.c_str());
-	return false;
+        tmp.assfmt("%s/ssh-login.sh", proc.m_proc.m_cwd.c_str());
+        FILE* fenv = fopen(tmp.c_str(), "w+");
+        if (fenv == 0)
+        {
+          g_logger.error("Failed to open %s for writing", tmp.c_str());
+          return false;
+        }
+        fprintf(fenv, "#!/bin/sh\n");
+        fprintf(fenv, "cd %s\n", proc.m_proc.m_cwd.c_str());
+        fprintf(fenv, "[ -f /etc/profile ] && . /etc/profile\n");
+        fprintf(fenv, ". env.sh\n");
+        fprintf(fenv, "ulimit -Sc unlimited\n");
+        fprintf(fenv, "bash -i");
+        fflush(fenv);
+        fclose(fenv);
+      }
+
+      {
+        tmp.assfmt("%s/bt.sh", proc.m_proc.m_cwd.c_str());
+        FILE* fenv = fopen(tmp.c_str(), "w+");
+        if (fenv == 0)
+        {
+          g_logger.error("Failed to open %s for writing", tmp.c_str());
+          return false;
+        }
+        fprintf(fenv, "#!/bin/sh                             \n");
+        fprintf(fenv, ". ./env.sh                            \n");
+        fprintf(fenv, "BIN=`echo $CMD | awk '{ print $1;}'`  \n");
+        fprintf(fenv, "cores=`find . -name 'core*'`          \n");
+        fprintf(fenv, "if [ "$cores" ]                       \n");
+        fprintf(fenv, "then                                  \n");
+        fprintf(fenv, "echo \"thread apply all bt\" > bt.gdb \n");
+        fprintf(fenv, "echo \"quit\" >> bt.gdb               \n");
+        fprintf(fenv, "echo for i in $cores                  \n");
+        fprintf(fenv, "do                                    \n");
+        fprintf(fenv, "echo \"*** $i\" >> bt.txt             \n");
+        fprintf(fenv, "echo gdb -q -batch -x bt.gdb -c $i $BIN >> bt.txt 2>
/dev/null \n");
+        fprintf(fenv, "done                                  \n");
+        fprintf(fenv, "fi                                    \n");
+        fflush(fenv);
+        fclose(fenv);
       }
-      fprintf(fenv, "#!/bin/sh\n");
-      fprintf(fenv, "cd %s\n", proc.m_proc.m_cwd.c_str());
-      fprintf(fenv, "[ -f /etc/profile ] && . /etc/profile\n");
-      fprintf(fenv, ". env.sh\n");
-      fprintf(fenv, "ulimit -Sc unlimited\n");
-      fprintf(fenv, "bash -i");
-      fflush(fenv);
-      fclose(fenv);
     }
   }
   

Thread
bzr push into mysql-5.1 branch (jonas:2674) Jonas Oreland22 Aug