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

Unified Diff: client/bin/kernel_unittest.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 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
Index: client/bin/kernel_unittest.py
diff --git a/client/bin/kernel_unittest.py b/client/bin/kernel_unittest.py
index 6761c05a3746bda31ca9daf0bc51ebfab08062ec..4ed0d373926cbcae77e79b0eb5bfe63e167fc03a 100755
--- a/client/bin/kernel_unittest.py
+++ b/client/bin/kernel_unittest.py
@@ -425,13 +425,17 @@ class TestKernel(unittest.TestCase):
def test_extraversion(self):
self.construct_kernel()
tag = "tag"
+ # setup
+ self.god.stub_function(self.kernel, "config")
# record
os.chdir.expect_call(self.build_dir)
- extraversion_sub = r's/^EXTRAVERSION =\s*\(.*\)/EXTRAVERSION = '
- p = extraversion_sub + '\\1-%s/' % tag
- utils.system.expect_call('mv Makefile Makefile.old')
- utils.system.expect_call('sed "%s" < Makefile.old > Makefile' % p)
+ extraversion_sub = r's/^CONFIG_LOCALVERSION=\s*"\(.*\)"/CONFIG_LOCALVERSION='
+ cfg = self.build_dir + '/.config'
+ p = extraversion_sub + '"\\1-%s"/' % tag
+ utils.system.expect_call('mv %s %s.old' % (cfg, cfg))
+ utils.system.expect_call("sed '%s' < %s.old > %s" % (p, cfg, cfg))
+ self.kernel.config.expect_call(make='oldconfig')
# run and check
self.kernel.extraversion(tag)
« cli/job.py ('K') | « client/bin/kernel.py ('k') | client/bin/partition.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698