Scott Zawalski | 20a9b58 | 2011-11-21 11:49:40 -0800 | [diff] [blame] | 1 | # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | """A common helper that adds chromeos_test libraries to the path. |
| 6 | |
| 7 | Also defines: |
| 8 | chromeos_test_common.CURRENT_DIR as the current directory. |
| 9 | chromeos_test_common.CRON_DIR as the autotest-tools/cron directory. |
| 10 | chromeos_test_common.CROS_DIR as path to the ChromeOS enlistment. |
| 11 | """ |
| 12 | |
| 13 | import os |
| 14 | import sys |
| 15 | |
| 16 | # Figure out our absolute path so we can simplify configuration. |
| 17 | CURRENT_DIR = os.path.realpath(os.path.abspath(os.path.join( |
| 18 | os.getcwd(), os.path.dirname(__file__)))) |
Bryan Freed | 721878a | 2012-03-15 16:14:12 -0700 | [diff] [blame^] | 19 | CROS_DIR = os.path.abspath(os.path.join(CURRENT_DIR, '../../../../..')) |
| 20 | CRON_DIR = CURRENT_DIR |
Scott Zawalski | 20a9b58 | 2011-11-21 11:49:40 -0800 | [diff] [blame] | 21 | sys.path.append(CRON_DIR) |