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

Unified Diff: build/run_tests.py

Issue 996433002: run_tests.py: find test executables in an in-Chromium build (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/run_tests.py
diff --git a/build/run_tests.py b/build/run_tests.py
index 0f97ac41d763a0d0773c84beadd2aebad98511ba..d877a2117e3b212f55579f3ffe6a1cd057d1ffaa 100755
--- a/build/run_tests.py
+++ b/build/run_tests.py
@@ -30,7 +30,19 @@ def main(args):
crashpad_dir = \
os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
- binary_dir = os.path.join(crashpad_dir, 'out', args[0])
+ # In a standalone Crashpad build, the out directory is in the Crashpad root.
+ binary_dir = os.path.join(crashpad_dir, 'out')
scottmg 2015/03/09 19:59:59 I think calling binary_dir "out_dir" here would be
Mark Mentovai 2015/03/09 20:14:37 scottmg wrote:
+ if not os.path.exists(binary_dir):
+ # In an in-Chromium build, the out directory is in the Chromium root, and
+ # the Crashpad root is in third_party/crashpad/crashpad relative to the
+ # Chromium root.
+ chromium_dir = os.path.join(crashpad_dir, os.pardir, os.pardir, os.pardir)
+ binary_dir = os.path.join(chromium_dir, 'out')
+ if not os.path.exists(binary_dir):
+ raise Exception('could not determine binary_dir', crashpad_dir)
+
+ binary_dir = os.path.join(binary_dir, args[0])
+
tests = [
'crashpad_client_test',
'crashpad_minidump_test',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698