Chris Sosa | 7c93136 | 2010-10-11 19:49:01 -0700 | [diff] [blame] | 1 | # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. |
rtc@google.com | ded2240 | 2009-10-26 22:36:21 +0000 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Sean O'Connor | 14b6a0a | 2010-03-20 23:23:48 -0700 | [diff] [blame] | 5 | class BuildObject(object): |
rtc@google.com | ded2240 | 2009-10-26 22:36:21 +0000 | [diff] [blame] | 6 | """ |
rtc@google.com | 6424466 | 2009-11-12 00:52:08 +0000 | [diff] [blame] | 7 | Common base class that defines key paths in the source tree. |
rtc@google.com | ded2240 | 2009-10-26 22:36:21 +0000 | [diff] [blame] | 8 | """ |
rtc@google.com | 6424466 | 2009-11-12 00:52:08 +0000 | [diff] [blame] | 9 | def __init__(self, root_dir, static_dir): |
| 10 | self.app_id = "87efface-864d-49a5-9bb3-4b050a7c227a" |
| 11 | self.root_dir = root_dir |
| 12 | self.scripts_dir = "%s/scripts" % self.root_dir |
| 13 | self.static_dir = static_dir |
| 14 | self.x86_pkg_dir = "%s/build/x86/local_packages" % self.root_dir |
| 15 | |
| 16 | def AssertSystemCallSuccess(self, err, cmd="unknown"): |
| 17 | """ |
| 18 | TODO(rtc): This code should probably live somewhere else. |
| 19 | """ |
| 20 | if err != 0: |
rtc@google.com | a9aaa99 | 2009-11-13 20:10:34 +0000 | [diff] [blame] | 21 | raise Exception("%s failed to execute" % cmd) |