blob: 66d3630fb68a6386a2579dc9090a00ce1bbeb4bd [file] [log] [blame]
rtc@google.comded22402009-10-26 22:36:21 +00001# Copyright (c) 2009 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
rtc@google.com21a5ca32009-11-04 18:23:23 +00005import os
rtc@google.com64244662009-11-12 00:52:08 +00006import web
7from datetime import datetime
8import time
rtc@google.com21a5ca32009-11-04 18:23:23 +00009
rtc@google.com64244662009-11-12 00:52:08 +000010class BuildObject:
rtc@google.comded22402009-10-26 22:36:21 +000011 """
rtc@google.com64244662009-11-12 00:52:08 +000012 Common base class that defines key paths in the source tree.
rtc@google.comded22402009-10-26 22:36:21 +000013 """
rtc@google.com64244662009-11-12 00:52:08 +000014 def __init__(self, root_dir, static_dir):
15 self.app_id = "87efface-864d-49a5-9bb3-4b050a7c227a"
16 self.root_dir = root_dir
17 self.scripts_dir = "%s/scripts" % self.root_dir
18 self.static_dir = static_dir
19 self.x86_pkg_dir = "%s/build/x86/local_packages" % self.root_dir
20
21 def AssertSystemCallSuccess(self, err, cmd="unknown"):
22 """
23 TODO(rtc): This code should probably live somewhere else.
24 """
25 if err != 0:
rtc@google.coma9aaa992009-11-13 20:10:34 +000026 raise Exception("%s failed to execute" % cmd)