blob: 2447b2ce28ebc3bee5f442face7961cf1ee6048e [file] [log] [blame]
Chris Sosa7c931362010-10-11 19:49:01 -07001# Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
rtc@google.comded22402009-10-26 22:36:21 +00002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Sean O'Connor14b6a0a2010-03-20 23:23:48 -07005class BuildObject(object):
rtc@google.comded22402009-10-26 22:36:21 +00006 """
rtc@google.com64244662009-11-12 00:52:08 +00007 Common base class that defines key paths in the source tree.
rtc@google.comded22402009-10-26 22:36:21 +00008 """
rtc@google.com64244662009-11-12 00:52:08 +00009 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.coma9aaa992009-11-13 20:10:34 +000021 raise Exception("%s failed to execute" % cmd)