=== modified file 'storage/ndb/test/run-test/atrt-backtrace.sh'
--- a/storage/ndb/test/run-test/atrt-backtrace.sh	2008-08-25 07:57:58 +0000
+++ b/storage/ndb/test/run-test/atrt-backtrace.sh	2008-08-27 06:45:13 +0000
@@ -8,6 +8,11 @@
     exit
 fi
 
+if [ -f `dirname $core`/env.sh ]
+then
+    . `dirname $core`/env.sh
+fi
+
 #
 # gdb command file
 #

=== modified file 'storage/ndb/test/run-test/atrt.hpp'
--- a/storage/ndb/test/run-test/atrt.hpp	2008-02-21 13:57:42 +0000
+++ b/storage/ndb/test/run-test/atrt.hpp	2008-08-27 11:42:30 +0000
@@ -32,6 +32,7 @@
   ERR_SERVERS_FAILED = 102,
   ERR_MAX_TIME_ELAPSED = 103,
   ERR_COMMAND_FAILED = 104,
+  ERR_FAILED_TO_START = 105
 };
 
 struct atrt_host 

=== modified file 'storage/ndb/test/run-test/db.cpp'
--- a/storage/ndb/test/run-test/db.cpp	2008-02-21 13:57:42 +0000
+++ b/storage/ndb/test/run-test/db.cpp	2008-08-27 11:42:30 +0000
@@ -460,3 +460,7 @@
   }
   return true;
 }
+
+template static int find(atrt_host* obj, Vector<atrt_host*>& arr);
+template static int find(atrt_cluster* obj, Vector<atrt_cluster*>& arr);
+

=== modified file 'storage/ndb/test/run-test/main.cpp'
--- a/storage/ndb/test/run-test/main.cpp	2008-02-21 13:57:42 +0000
+++ b/storage/ndb/test/run-test/main.cpp	2008-08-27 11:42:30 +0000
@@ -273,7 +273,33 @@
         goto end;
       
       if (!start(g_config, p_ndb | p_servers))
-	goto end;
+      {
+        g_logger.info("Failed to start server processes");
+        g_logger.info("Gathering logs and saving them as test %u", test_no);
+
+        int tmp;
+        if(!gather_result(g_config, &tmp))
+          goto end;
+        
+        if(g_report_file != 0)
+        {
+          fprintf(g_report_file, "%s ; %d ; %d ; %d\n",
+                  "start servers", test_no, ERR_FAILED_TO_START, 0);
+          fflush(g_report_file);
+        }
+
+        BaseString resdir;
+        resdir.assfmt("result.%d", test_no);
+        remove_dir(resdir.c_str(), true);
+        
+        if(rename("result", resdir.c_str()) != 0)
+        {
+          g_logger.critical("Failed to rename %s as %s",
+                            "result", resdir.c_str());
+          goto end;
+        }
+        goto end;
+      }
 
       if (!setup_db(g_config))
 	goto end;



