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

Unified Diff: bin/cbuildbot.py

Issue 3760012: Clean up any previous kvm state. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: ws Created 10 years, 2 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: bin/cbuildbot.py
diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py
index 955af7415a6341e7ef5b68142b9dc1afbade1f32..1bf9503061d29ce921c774c950534ae3db8aa122 100755
--- a/bin/cbuildbot.py
+++ b/bin/cbuildbot.py
@@ -233,10 +233,15 @@ def _FullCheckout(buildroot, rw_checkout=True, retries=_DEFAULT_RETRIES):
RepoSync(buildroot, rw_checkout, retries)
+def _PreFlightRinse(buildroot):
+ """Cleans up any leftover state from previous runs."""
+ RunCommand(['sudo', 'killall', 'kvm'], error_ok=True)
+ _UprevCleanup(buildroot, error_ok=True)
+
+
def _IncrementalCheckout(buildroot, rw_checkout=True,
retries=_DEFAULT_RETRIES):
"""Performs a checkout without clobbering previous checkout."""
- _UprevCleanup(buildroot, error_ok=True)
RepoSync(buildroot, rw_checkout, retries)
@@ -410,6 +415,7 @@ def main():
if not os.path.isdir(buildroot):
_FullCheckout(buildroot)
else:
+ _PreFlightRinse(buildroot)
_IncrementalCheckout(buildroot)
chroot_path = os.path.join(buildroot, 'chroot')
« 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