Browse Source

[reclient] Use python impl for reclientreport for all platorms temporarily

Bug: b/301574845
Change-Id: I96f67b4cf791707a0bc2c8e0459bb4002b64a228
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4887767
Commit-Queue: Michael Savigny <msavigny@google.com>
Reviewed-by: Michael Savigny <msavigny@google.com>
Auto-Submit: Ben Segall <bentekkie@google.com>
Ben Segall 1 year ago
parent
commit
0471c76c58
1 changed files with 21 additions and 23 deletions
  1. 21 23
      reclientreport.py

+ 21 - 23
reclientreport.py

@@ -11,17 +11,14 @@ $ reclientreport -C out/my-ninja-out
 
 import argparse
 import os
-import subprocess
 import sys
 import tarfile
 import tempfile
 
-import reclient_helper
 
-
-# TODO(b/296402157): Remove once reclientreport binary saves all logs on windows
-def temp_win_impl__b_296402157(out_dir):
-    '''Temporary implementation until b/296402157 is fixed'''
+# TODO(b/301574845): Remove once reclientreport binary saves all logs
+def temp_impl_b_301574845(out_dir):
+    '''Temporary implementation until b/301574845 is fixed'''
     log_dir = os.path.abspath(os.path.join(out_dir, '.reproxy_tmp', 'logs'))
     with tempfile.NamedTemporaryFile(prefix='reclientreport',
                                      suffix='.tar.gz',
@@ -40,23 +37,24 @@ def main():
                         help="ninja out directory used for the autoninja build")
     parser.add_argument('args', nargs=argparse.REMAINDER)
 
-    args, extras = parser.parse_known_args()
-    if sys.platform.startswith('win'):
-        temp_win_impl__b_296402157(args.ninja_out)
-        return
-    if args.args and args.args[0] == '--':
-        args.args.pop(0)
-    if extras:
-        args.args = extras + args.args
-
-    reclient_helper.set_reproxy_path_flags(args.ninja_out, make_dirs=False)
-    reclient_bin_dir = reclient_helper.find_reclient_bin_dir()
-    code = subprocess.call([os.path.join(reclient_bin_dir, 'reclientreport')] +
-                           args.args)
-    if code != 0:
-        print("Failed to collect logs, make sure that %s/.reproxy_tmp exists" %
-              args.ninja_out,
-              file=sys.stderr)
+    args, _ = parser.parse_known_args()
+    temp_impl_b_301574845(args.ninja_out)
+    #if sys.platform.startswith('win'):
+    #    temp_win_impl__b_296402157(args.ninja_out)
+    #    return
+    #if args.args and args.args[0] == '--':
+    #    args.args.pop(0)
+    #if extras:
+    #    args.args = extras + args.args
+
+    #reclient_helper.set_reproxy_path_flags(args.ninja_out, make_dirs=False)
+    #reclient_bin_dir = reclient_helper.find_reclient_bin_dir()
+    #code = subprocess.call([os.path.join(reclient_bin_dir, 'reclientreport')] +
+    #                       args.args)
+    #if code != 0:
+    #    print("Failed to collect logs, make sure that %s/.reproxy_tmp exists" %
+    #          args.ninja_out,
+    #          file=sys.stderr)
 
 
 if __name__ == '__main__':