Index: tools/auto_bisect/bisect_perf_regression_test.py |
diff --git a/tools/auto_bisect/bisect_perf_regression_test.py b/tools/auto_bisect/bisect_perf_regression_test.py |
index d25992d18adf04272348130d85d096b1b2374aa0..80f9e0930871a11a3052739981d4191943c402a0 100644 |
--- a/tools/auto_bisect/bisect_perf_regression_test.py |
+++ b/tools/auto_bisect/bisect_perf_regression_test.py |
@@ -4,6 +4,7 @@ |
import os |
import re |
+import shutil |
import unittest |
import bisect_perf_regression |
@@ -246,12 +247,16 @@ class BisectPerfRegressionTest(unittest.TestCase): |
This serves as a smoke test to catch errors in the basic execution of the |
script. |
""" |
+ # Disable rmtree to avoid deleting local trees. |
+ old_rmtree = shutil.rmtree |
+ shutil.rmtree = lambda path, onerror: None |
ojan
2014/09/19 17:42:52
I typically do this in a try/finally so you can be
Sergiy Byelozyorov
2014/09/22 20:04:15
Done.
|
bisect_instance = _GetBisectPerformanceMetricsInstance() |
results = bisect_instance.Run(bisect_instance.opts.command, |
bisect_instance.opts.bad_revision, |
bisect_instance.opts.good_revision, |
bisect_instance.opts.metric) |
bisect_instance.FormatAndPrintResults(results) |
+ shutil.rmtree = old_rmtree |
def testGetCommitPosition(self): |
bisect_instance = _GetBisectPerformanceMetricsInstance() |