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

Unified Diff: copy_apprtc.py

Issue 1562343003: Remove out/apprtc using Cygwin for Windows bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/webrtc/webrtc.DEPS@master
Patch Set: Created 4 years, 11 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: copy_apprtc.py
diff --git a/copy_apprtc.py b/copy_apprtc.py
index ca4750ed4a6ca11c88e696087584ec23c45c28ee..27508abf2f6d01ce4101b28654625381e0efc847 100755
--- a/copy_apprtc.py
+++ b/copy_apprtc.py
@@ -8,6 +8,7 @@
import fileinput
import os
import shutil
+import subprocess
import sys
import utils
@@ -25,9 +26,26 @@ def _ConfigureApprtcServerToDeveloperMode(app_yaml_path):
sys.stdout.write(line)
+def RemoveDirectoryWithCygwinRmIfWindows(*path):
phoglund_chromium 2016/01/07 14:31:47 This name is misleading since it implies it only d
kjellander_chromium 2016/01/07 14:40:06 Done.
+ if utils.GetPlatform() == 'win':
+ # Allow clobbering of out dir using cygwin until crbug.com/567538 is fixed.
+ full_path = os.path.abspath(path)
+
+ # full_path is something like C:\b\build\slave\Win7_Tester\build\src\out
+ full_path = full_path[0].lower() + full_path[1:] # c:\b\...
phoglund_chromium 2016/01/07 14:31:47 This is alright, but you can use splitdrive to mak
kjellander_chromium 2016/01/07 14:40:06 Of course! Much better now.
+ full_path = full_path.replace(':', '') # c\b\...
+ cygwin_full_path = '/cygdrive/' + full_path.replace('\\', '/')
+
+ # Now it should be like /cygdrive/c/b/build/slave/Win7_Tester/build/src/out
+ cmd = 'c:\\cygwin\\bin\\bash --login -c "rm -rf %s"' % cygwin_full_path
+ subprocess.check_call(cmd)
+ else:
+ utils.RemoveDirectory(path)
+
+
def main():
target_dir = os.path.join('src', 'out', 'apprtc')
- utils.RemoveDirectory(target_dir)
+ RemoveDirectoryWithCygwinRmIfWindows(target_dir)
shutil.copytree('apprtc',
target_dir, ignore=shutil.ignore_patterns('.svn', '.git'))
« 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