Reland "run some tests using python3"

This reverts commit 17304dfd2f915f3f98d7b1d43b230e860f4ffdd9.

Reason for revert:
reland without zlib_unittests and unit_tests

Original change's description:
> Revert "run some tests using python3"
>
> This reverts commit 658f361a34e21b92902a6b4c74047363b053cad3.
>
> Reason for revert: crbug.com/1274039 (breaks ASAN bots)
>
> Original change's description:
> > run some tests using python3
> >
> > Bug: 941669
> > Change-Id: Ib63daab2a4cb3868cfc37121c3f48ebb2019af39
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3301620
> > Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> > Commit-Queue: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#945345}
>
> Bug: 941669, 1274039
> Change-Id: Ib271b4e80ca4969f871eb1bc341a81449783a014
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3302106
> Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
> Owners-Override: Alexander Hendrich <hendrich@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#945573}

Bug: 941669, 1274039
Change-Id: I50757e91acf60b780c4ffe0aba7955b4cd8def4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3303433
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Owners-Override: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945607}
NOKEYCHECK=True
GitOrigin-RevId: e0b44335eacecb145452d9ac7f85a88b921694c1
diff --git a/asan/asan_symbolize.py b/asan/asan_symbolize.py
index 0d1c880..a9d0ba0 100755
--- a/asan/asan_symbolize.py
+++ b/asan/asan_symbolize.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
@@ -180,7 +180,8 @@
     return '\n'.join(symbolized_lines)
 
   def symbolize(self, test_run):
-    original_snippet = base64.b64decode(test_run['output_snippet_base64'])
+    original_snippet = base64.b64decode(
+        test_run['output_snippet_base64']).decode('utf-8', 'replace')
     symbolized_snippet = self.symbolize_snippet(original_snippet)
     if symbolized_snippet == original_snippet:
       # No sanitizer reports in snippet.
@@ -190,9 +191,9 @@
     test_run['original_output_snippet_base64'] = \
         test_run['output_snippet_base64']
 
-    test_run['output_snippet'] = symbolized_snippet.decode('utf-8', 'replace')
+    test_run['output_snippet'] = symbolized_snippet
     test_run['output_snippet_base64'] = \
-        base64.b64encode(symbolized_snippet)
+        base64.b64encode(symbolized_snippet.encode('utf-8', 'replace')).decode()
     test_run['snippet_processed_by'] = 'asan_symbolize.py'
 
 
@@ -202,7 +203,7 @@
 
   test_run_symbolizer = JSONTestRunSymbolizer(symbolization_loop)
   for iteration_data in json_data['per_iteration_data']:
-    for test_name, test_runs in iteration_data.iteritems():
+    for test_name, test_runs in iteration_data.items():
       for test_run in test_runs:
         test_run_symbolizer.symbolize(test_run)