From d1d4ac90c32d20f3077895840043a59979ee1c61 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Thu, 26 Mar 2020 18:19:15 +0000 Subject: [PATCH] Fix git_number windows unit tests This fixes python2 unit tests (py3 works fine) Change-Id: I9b968ba5d5f534166ce6c4fe59c8dfa4beb73021 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2121563 Reviewed-by: Edward Lesmes Commit-Queue: Josip Sokcevic --- PRESUBMIT.py | 1 - git_number.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index bd9f6919e..ab22f0a62 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -80,7 +80,6 @@ def CommonChecks(input_api, output_api, tests_to_black_list, run_on_python3): r'.*git_common_test\.py$', r'.*git_hyper_blame_test\.py$', r'.*git_map_test\.py$', - r'.*git_number_test\.py$', r'.*git_rebase_update_test\.py$', r'.*ninjalog_uploader_test\.py$', r'.*recipes_test\.py$', diff --git a/git_number.py b/git_number.py index 91ba2c4ae..d8bca8c61 100755 --- a/git_number.py +++ b/git_number.py @@ -142,7 +142,7 @@ def finalize(targets): idx = os.path.join(git.run('rev-parse', '--git-dir'), 'number.idx') env = os.environ.copy() - env['GIT_INDEX_FILE'] = idx + env['GIT_INDEX_FILE'] = str(idx) progress_message = 'Finalizing: (%%(count)d/%d)' % len(DIRTY_TREES) with git.ProgressPrinter(progress_message) as inc: