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

Unified Diff: tools/deep_memory_profiler/PRESUBMIT.py

Issue 11417048: Retry: Add a first test for tools/deep_memory_profiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | tools/deep_memory_profiler/dmprof » ('j') | tools/deep_memory_profiler/dmprof.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/deep_memory_profiler/PRESUBMIT.py
diff --git a/tools/deep_memory_profiler/PRESUBMIT.py b/tools/deep_memory_profiler/PRESUBMIT.py
index 88595b5d6affed3d60f99fec6e85107f75117dc1..965fad9beda64d2c7eac6f75bd1d6f9330e45f49 100644
--- a/tools/deep_memory_profiler/PRESUBMIT.py
+++ b/tools/deep_memory_profiler/PRESUBMIT.py
@@ -10,8 +10,30 @@ details on the presubmit API built into gcl.
def CommonChecks(input_api, output_api):
+ import sys
+ def join(*args):
+ return input_api.os_path.join(input_api.PresubmitLocalPath(), *args)
+
output = []
- output.extend(input_api.canned_checks.RunPylint(input_api, output_api))
+ sys_path_backup = sys.path
+ try:
+ sys.path = [
+ join('..', 'find_runtime_symbols'),
+ ] + sys.path
+ output.extend(input_api.canned_checks.RunPylint(input_api, output_api))
+ finally:
+ sys.path = sys_path_backup
+
+ output.extend(
+ input_api.canned_checks.RunUnitTestsInDirectory(
+ input_api, output_api,
+ input_api.os_path.join(input_api.PresubmitLocalPath(), 'tests'),
+ whitelist=[r'.+_test\.py$']))
+
+ if input_api.is_committing:
+ output.extend(input_api.canned_checks.PanProjectChecks(input_api,
+ output_api,
+ owners_check=False))
return output
« no previous file with comments | « no previous file | tools/deep_memory_profiler/dmprof » ('j') | tools/deep_memory_profiler/dmprof.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698