Merge remote branch 'cros/upstream' into autotest-rebase
Merged to upstream trunk@5066, from trunk@4749.
There is no way I could enlist each individual CL from the upstream here since it will blow up the changelist description field.
BUG=
TEST=
Had patched this CL into a fresh cut client to avoid any side effect.
run_remote_test bvt from both emerged location and third_party/autotest/file.
Both test passed!
We should also keep any eye on this to see how it gets propagated into cautotest server.
TBR=dalecurtis
Change-Id: I72f2bc7a9de530178484aea1bfb5ace68bcad029
diff --git a/client/bin/kernel_unittest.py b/client/bin/kernel_unittest.py
index 6761c05..4ed0d37 100755
--- a/client/bin/kernel_unittest.py
+++ b/client/bin/kernel_unittest.py
@@ -425,13 +425,17 @@
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)