Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: PRESUBMIT.py

Issue 2398263003: Added unittests for run_slave (Closed)
Patch Set: Pass infra_path via PYTHONPATH env variable. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | slave/tests/run_slave_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 17041904931791bab095a5261b997b679c65dc36..5abaccdbb8ec7ad659248b9cb0191d27473aec21 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -9,6 +9,7 @@ details on the presubmit API built into git cl.
"""
import contextlib
+import os
import re
import sys
@@ -127,6 +128,13 @@ def CommonChecks(input_api, output_api):
path,
whitelist))
+ tests.extend(input_api.canned_checks.GetUnitTestsInDirectory(
+ input_api,
+ output_api,
+ input_api.os_path.join('slave', 'tests'),
+ whitelist,
+ env={'PYTHONPATH': os.pathsep.join(infra_path)}))
+
with pythonpath(infra_path + sys.path):
import common.master_cfg_utils # pylint: disable=F0401
# Fetch recipe dependencies once in serial so that we don't hit a race
« no previous file with comments | « no previous file | slave/tests/run_slave_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698