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

Unified Diff: scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py

Issue 2482153002: WebRTC: Set the right path to clean_symlinks.py (Closed)
Patch Set: Simplify logic 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
diff --git a/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py b/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
index 568d574ab5d8e1bf585beb8a0202af8d6c088096..6450983fac6e4e10667d55db8087bd506936f4db 100755
--- a/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
+++ b/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
@@ -12,24 +12,21 @@ import sys
def main(args):
if len(args) != 1:
- print >> sys.stderr, 'Please specify a single directory as an argument.'
+ print >> sys.stderr, ('Please specify a single directory as an argument, '
+ 'which points to the checkout root (dir above src/).'
return 1
- checkout_dir = args[0]
- if not os.path.isdir(checkout_dir):
- print 'Cannot find any directory at %s. Skipping cleaning.' % checkout_dir
+ checkout_root = args[0]
+ if not os.path.isdir(checkout_root):
+ print 'Cannot find any directory at %s. Skipping cleaning.' % checkout_root
return 0
- setup_links_file = os.path.join(checkout_dir, 'setup_links.py')
- if not os.path.isfile(setup_links_file):
- print 'Cannot find %s. Incomplete checkout?' % setup_links_file
- return 1
- else:
- print 'Cleaning up symlinks in %s' % checkout_dir
+ setup_links_file = os.path.join(checkout_root, 'src', 'setup_links.py')
+ if os.path.isfile(setup_links_file):
+ print 'Cleaning up symlinks in %s' % checkout_root
subprocess.check_call([sys.executable, setup_links_file, '--clean-only'],
- cwd=checkout_dir)
- return 0
-
+ cwd=checkout_root)
+ return 0
if __name__ == '__main__':
« 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