#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Entry point for the dartium buildbots.

This script is called from buildbot and reports results using the buildbot
annotation scheme.
"""

import os
import sys

from common import chromium_utils

def main():
  builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='')
  is_release_bot = builder_name.startswith('release')
  script = ''
  if is_release_bot:
    script = 'src/dartium_tools/buildbot_release_annotated_steps.py'
  else:
    script = 'src/dartium_tools/buildbot_annotated_steps.py'

  return chromium_utils.RunCommand([sys.executable, script])

if __name__ == '__main__':
  sys.exit(main())

@@ -460,296 +460,471 @@
 '')%0A
+%0A
   
-is_release_bot = builder_name.startswith('release')%0A  script = ''%0A  if is_release_bot:%0A    script = 'src/dartium_tools/buildbot_release_annotated_steps.py'%0A  else:%0A    script = 'src/dartium_tools/buildbot_annotated_steps.py'%0A%0A  return chromium_utils.RunCommand(%5Bsys.executable, script%5D)
+script = 'src/dartium_tools/buildbot_annotated_steps.py'%0A%0A  chromium_utils.RunCommand(%5Bsys.executable, script%5D)%0A%0A  # BIG HACK%0A  # Normal ninja clobbering does not work due to symlinks/python on windows%0A  # Full clobbering before building does not work since it will destroy%0A  # the ninja build files%0A  # So we basically clobber at the end here%0A  if chromium_utils.IsWindows() and 'full' in builder_name:%0A    chromium_utils.RemoveDirectory('src/out')%0A  return 0
 %0A%0Aif

Move hackish clobbering to the script that calls the dartium annotated steps