Merged the contents of client.bin.boottool and server.hosts.Bootloader
into a common_lib.boottool API. Added unittest for it. Updated users.
Visibility: this changes the client and server job.bootloader API
slightly and while I've tried to make sure that all users of the old
API are updated to the new one it's possible that there is code ouside
the Autotest source tree that may rely on the old API.
Signed-off-by: Mihai Rusu <[email protected]>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3785 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/harness_ABAT.py b/client/bin/harness_ABAT.py
index 91d3f1e..18459b8 100755
--- a/client/bin/harness_ABAT.py
+++ b/client/bin/harness_ABAT.py
@@ -94,15 +94,10 @@
# Search the boot loader configuration for the autobench entry,
# and extract its args.
- entry_args = None
args = None
- for line in self.job.bootloader.info('all').split('\n'):
- if line.startswith('args'):
- entry_args = line.split(None, 2)[2]
- if line.startswith('title'):
- title = line.split()[2]
- if title == 'autobench':
- args = entry_args
+ for entry in self.job.bootloader.get_entries().itervalues():
+ if entry['title'].startswith('autobench'):
+ args = entry.get('args')
if args:
args = re.sub(r'autobench_args:.*', '', args)