Adding custom environment variable support to presubmit_canned_checks.GetUnitTestsInDirectory

I want to run Python unit tests as part of my presubmit, and those unit tests require PYTHONPATH to be set the way it would be set when the modules they test are running.

Review URL: https://codereview.chromium.org/250693002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265998 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed
tree: fc27d15cf1a8b075bccf3edb5e86141200305a3b
  1. bootstrap/
  2. docs/
  3. git-templates/
  4. git_utils/
  5. recipes/
  6. support/
  7. testing_support/
  8. tests/
  9. third_party/
  10. win_toolchain/
  11. zsh-goodies/
  12. .gitignore
  13. annotated_gclient.py
  14. apply_issue
  15. apply_issue.bat
  16. apply_issue.py
  17. breakpad.py
  18. checkout.py
  19. chrome-update-create-task.bat
  20. chrome-update.bat
  21. chrome-update.py
  22. clang-format
  23. clang-format.bat
  24. clang_format.py
  25. codereview.settings
  26. commit_queue.py
  27. cpplint.bat
  28. cpplint.py
  29. cpplint_chromium.py
  30. create-chromium-git-src
  31. create-ntfs-junction.c
  32. create-ntfs-junction.exe
  33. crup-runner.sh
  34. download_from_google_storage
  35. download_from_google_storage.bat
  36. download_from_google_storage.py
  37. drover
  38. drover.bat
  39. drover.py
  40. fetch
  41. fetch.bat
  42. fetch.py
  43. fix_encoding.py
  44. gcl
  45. gcl.bat
  46. gcl.py
  47. gclient
  48. gclient-new-workdir.py
  49. gclient.bat
  50. gclient.py
  51. gclient_completion.sh
  52. gclient_scm.py
  53. gclient_utils.py
  54. gerrit_util.py
  55. git-cache
  56. git-cl
  57. git-cl-upload-hook
  58. git-crsync
  59. git-crup
  60. git-freeze
  61. git-gs
  62. git-lkgr
  63. git-map
  64. git-map-branches
  65. git-mark-merge-base
  66. git-nav-downstream
  67. git-nav-upstream
  68. git-new-branch
  69. git-number
  70. git-rebase-update
  71. git-rename-branch
  72. git-reparent-branch
  73. git-runhooks
  74. git-squash-branch
  75. git-thaw
  76. git-try
  77. git-upstream-diff
  78. git_cache.py
  79. git_cl.py
  80. git_common.py
  81. git_freezer.py
  82. git_map.py
  83. git_map_branches.py
  84. git_mark_merge_base.py
  85. git_nav_downstream.py
  86. git_new_branch.py
  87. git_number.py
  88. git_rebase_update.py
  89. git_rename_branch.py
  90. git_reparent_branch.py
  91. git_squash_branch.py
  92. git_try.py
  93. git_upstream_diff.py
  94. gn
  95. gn.bat
  96. gn.py
  97. hammer
  98. hammer.bat
  99. LICENSE
  100. my_activity.py
  101. my_reviews.py
  102. ninja
  103. ninja-linux32
  104. ninja-linux64
  105. ninja-mac
  106. ninja.exe
  107. OWNERS
  108. owners.py
  109. owners_finder.py
  110. patch.py
  111. PRESUBMIT.py
  112. presubmit_canned_checks.py
  113. presubmit_support.py
  114. profile.xml
  115. pylint
  116. pylint.py
  117. pylintrc
  118. python_git_runner.sh
  119. README
  120. README.codereview
  121. README.gclient
  122. README.git-cl
  123. README.testing
  124. repo
  125. rietveld.py
  126. scm.py
  127. subcommand.py
  128. subprocess2.py
  129. trychange.py
  130. update_depot_tools
  131. update_depot_tools.bat
  132. upload_to_google_storage.py
  133. WATCHLISTS
  134. watchlists.py
  135. weekly
  136. wtf