mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 1 | import os |
mbligh | e829ba5 | 2008-06-03 15:04:08 +0000 | [diff] [blame] | 2 | from autotest_lib.client.common_lib import utils, error |
mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 3 | from autotest_lib.client.common_lib import boottool as common_boottool |
mbligh | e404619 | 2006-09-15 14:31:01 +0000 | [diff] [blame] | 4 | |
mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 5 | class boottool(common_boottool.boottool): |
jadmanski | 0afbb63 | 2008-06-06 21:10:57 +0000 | [diff] [blame] | 6 | def __init__(self, boottool_exec=None): |
mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 7 | super(boottool, self).__init__() |
mbligh | ede4af6 | 2006-12-17 23:05:16 +0000 | [diff] [blame] | 8 | |
jadmanski | 0afbb63 | 2008-06-06 21:10:57 +0000 | [diff] [blame] | 9 | if boottool_exec: |
mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 10 | self._boottool_exec = boottool_exec |
jadmanski | 0afbb63 | 2008-06-06 21:10:57 +0000 | [diff] [blame] | 11 | else: |
12 | autodir = os.environ['AUTODIR'] | ||||
mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 13 | self._boottool_exec = autodir + '/tools/boottool' |
mbligh | e404619 | 2006-09-15 14:31:01 +0000 | [diff] [blame] | 14 | |
mbligh | 72b88fc | 2006-12-16 18:41:35 +0000 | [diff] [blame] | 15 | |
mbligh | c2ebea0 | 2009-10-02 00:02:33 +0000 | [diff] [blame] | 16 | def _run_boottool(self, *options): |
17 | return utils.system_output(self._boottool_exec, args=options) |