OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/python |
| 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 import common, commands, os |
| 8 from autotest_lib.client.bin import utils |
| 9 |
| 10 version = 1 |
| 11 |
| 12 def setup(top_dir): |
| 13 root = commands.getoutput('echo $GCLIENT_ROOT') |
| 14 |
| 15 # Make the debian package first |
| 16 autox_dir = '%s/src/platform/autox' % root |
| 17 os.chdir(autox_dir) |
| 18 utils.system('./make_pkg.sh') |
| 19 os.chdir(top_dir) |
| 20 |
| 21 # TODO(sosa@chromium.org) - Find out a way to figure out whether to use |
| 22 # arm vs. x86 |
| 23 deb_dir = '%s/%s' % (root, 'src/build/x86/local_packages') |
| 24 package_regexp = 'chromeos-autox*' |
| 25 |
| 26 # Get the latest chromeos-autox package |
| 27 find_cmd = 'find %s -name %s | tail -n 1' % (deb_dir, package_regexp) |
| 28 deb_pkg = commands.getoutput(find_cmd) |
| 29 |
| 30 if deb_pkg == '': |
| 31 raise error.TestError('ChromeOS autox package not found') |
| 32 |
| 33 # The path of the dpkg script used to install debian packages |
| 34 dpkg_script = '%s/src/scripts/dpkg_no_scripts.sh' % root |
| 35 |
| 36 utils.system('%s --root %s --unpack %s' % (dpkg_script, top_dir, deb_pkg)) |
| 37 |
| 38 pwd = os.getcwd() |
| 39 utils.update_version(pwd + '/src', False, version, setup, pwd) |
OLD | NEW |