Revert "Allow execution time of the slowest tests to be printed"

This reverts commit 654eda1850740d7c17c711a1352eede090305a4f.

Reason for revert: Seems to have broken the bots, reverting

Change-Id: I8d13fc7629ebef0d99342f6ce231078b2f8cca00
diff --git a/build.gradle b/build.gradle
index 15a05ca..4feb96d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1717,6 +1717,7 @@
                 }
             }
         } else {
+            dependsOn "${taskName}_dexmerger"
             task "${taskName}_smali"(type: SmaliTask) {
                 source = smaliFiles
                 destination = intermediateFile
@@ -1918,9 +1919,6 @@
     }
 }
 
-def testTimes = [:]
-def numberOfTestTimesToPrint = 40
-
 test {
     if (project.hasProperty('generate_golden_files_to')) {
         systemProperty 'generate_golden_files_to', project.property('generate_golden_files_to')
@@ -1965,26 +1963,10 @@
         systemProperty 'desugar_jdk_libs', project.property('desugar_jdk_libs')
     }
 
-    if (project.hasProperty('print_times') || project.hasProperty('one_line_per_test')) {
-        afterTest { desc, result ->
-            def executionTime = (result.endTime - result.startTime) / 1000
-            testTimes["${desc.name} [${desc.className}]"] = executionTime
-        }
-        afterSuite { desc, result ->
-          // parent is null if all tests are done.
-          if (desc.parent == null) {
-            def sortedTimes = testTimes.sort({e1, e2 -> e2.value <=> e1.value})
-            sortedTimes.eachWithIndex{key, value, i ->
-                if (i < numberOfTestTimesToPrint) println "$key: $value"}
-          }
-        }
-    }
-
     if (project.hasProperty('one_line_per_test')) {
         beforeTest { desc ->
             println "Start executing test ${desc.name} [${desc.className}]"
         }
-
         afterTest { desc, result ->
             if (result.resultType == TestResult.ResultType.FAILURE) {
                 printStackTrace(result)
diff --git a/tools/test.py b/tools/test.py
index 6f3fe83..6734106 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -167,9 +167,6 @@
       help='Use alternative desugared library configuration.')
   result.add_option('--desugared-library', '--desugared_library',
       help='Build and use desugared library from GitHub.')
-  result.add_option('--print-times', '--print_times',
-      help='Print the execution time of the slowest tests..',
-      default=False, action='store_true')
   return result.parse_args()
 
 def archive_failures():
@@ -386,8 +383,6 @@
   # Legacy testing populates the runtimes based on dex_vm.
   vms_to_test = [options.dex_vm] if options.dex_vm != "all" else ALL_ART_VMS
 
-  if options.print_times:
-    gradle_args.append('-Pprint_times=true')
   for art_vm in vms_to_test:
     vm_suffix = "_" + options.dex_vm_kind if art_vm != "default" else ""
     runtimes = ['dex-' + art_vm]