>From a fresh un-tar and no config defined in autotest, we get exceptions due to `mv' not finding the source file. Rather than relying on .config being present, fallback to defconfig when its not.
Signed-off-by: Nishanth Aravamudan <[email protected]> --- client/bin/kernel.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/bin/kernel.py b/client/bin/kernel.py index f66c336..e0631f9 100644 --- a/client/bin/kernel.py +++ b/client/bin/kernel.py @@ -341,9 +341,12 @@ class kernel(BootableKernel): p = extraversion_sub + '"\\1-%s"/' % tag else: p = extraversion_sub + '"-%s"/' % tag - utils.system('mv %s %s.old' % (cfg, cfg)) - utils.system("sed '%s' < %s.old > %s" % (p, cfg, cfg)) - self.config(make='oldconfig') + if os.path.exists(cfg): + utils.system('mv %s %s.old' % (cfg, cfg)) + utils.system("sed '%s' < %s.old > %s" % (p, cfg, cfg)) + self.config(make='oldconfig') + else: + self.config(make='defconfig') @log.record -- 1.7.5.4 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
