Revert "Add script for archiving gradle test logs"

This reverts commit 567494e48c7c276e40a92902482c6738ec1d9153.

Reason for revert: this does not get called on the bots anyway if we timeout, so no need. I added instead jstack printing when we timeout

Change-Id: I1a64b3dcf3ce29b674cda1545d18340db9de839b
diff --git a/tools/archive_logs.py b/tools/archive_logs.py
deleted file mode 100755
index bdae32e..0000000
--- a/tools/archive_logs.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Script for achiving gradle test logs.
-
-import utils
-
-if __name__ == '__main__':
-  utils.archive_failures()
diff --git a/tools/test.py b/tools/test.py
index d9dca9f..487f306 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -15,6 +15,7 @@
 import thread
 import time
 import utils
+import uuid
 import notify
 
 ALL_ART_VMS = [
@@ -35,6 +36,8 @@
 # is not a problem, no harm done except some logging in the stdout.
 TIMEOUT_HANDLER_PERIOD = 60 * 18
 
+BUCKET = 'r8-test-results'
+
 def ParseOptions():
   result = optparse.OptionParser()
   result.add_option('--no-internal', '--no_internal',
@@ -103,6 +106,15 @@
 
   return result.parse_args()
 
+def archive_failures():
+  upload_dir = os.path.join(utils.REPO_ROOT, 'build', 'reports', 'tests')
+  u_dir = uuid.uuid4()
+  destination = 'gs://%s/%s' % (BUCKET, u_dir)
+  utils.upload_dir_to_cloud_storage(upload_dir, destination, is_html=True)
+  url = 'http://storage.googleapis.com/%s/%s/test/index.html' % (BUCKET, u_dir)
+  print 'Test results available at: %s' % url
+  print '@@@STEP_LINK@Test failures@%s@@@' % url
+
 def Main():
   (options, args) = ParseOptions()
   if utils.is_bot():
@@ -204,7 +216,7 @@
 
     if return_code != 0:
       if options.archive_failures and os.name != 'nt':
-        utils.archive_failures()
+        archive_failures()
       return return_code
 
   return 0
diff --git a/tools/utils.py b/tools/utils.py
index 5355ba8..3f0e1ff 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -12,7 +12,6 @@
 import sys
 import tarfile
 import tempfile
-import uuid
 
 ANDROID_JAR = 'third_party/android_jar/lib-v{api}/android.jar'
 TOOLS_DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..')))
@@ -50,8 +49,6 @@
 RT_JAR = os.path.join(REPO_ROOT, 'third_party/openjdk/openjdk-rt-1.8/rt.jar')
 R8LIB_KEEP_RULES = os.path.join(REPO_ROOT, 'src/main/keep.txt')
 
-TEST_RESULT_BUCKET = 'r8-test-results'
-
 def PrintCmd(s):
   if type(s) is list:
     s = ' '.join(s)
@@ -188,15 +185,6 @@
  def __exit__(self, *_):
    shutil.rmtree(self._temp_dir, ignore_errors=True)
 
-def archive_failures():
-  upload_dir = os.path.join(REPO_ROOT, 'build', 'reports', 'tests')
-  u_dir = uuid.uuid4()
-  destination = 'gs://%s/%s' % (TEST_RESULT_BUCKET, u_dir)
-  upload_dir_to_cloud_storage(upload_dir, destination, is_html=True)
-  url = 'http://storage.googleapis.com/%s/%s/test/index.html' % (TEST_RESULT_BUCKET, u_dir)
-  print 'Test results available at: %s' % url
-  print '@@@STEP_LINK@Test failures@%s@@@' % url
-
 class ChangedWorkingDirectory(object):
  def __init__(self, working_directory):
    self._working_directory = working_directory