
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())


import os
import sys

from common import chromium_utils

def main():
  builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='')

  script = 'src/dartium_tools/buildbot_annotated_steps.py'

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

  # BIG HACK
  # Normal ninja clobbering does not work due to symlinks/python on windows
  # Full clobbering before building does not work since it will destroy
  # the ninja build files
  # So we basically clobber at the end here
  if chromium_utils.IsWindows() and 'full' in builder_name:
    chromium_utils.RemoveDirectory('src/out')
  return 0

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

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

Also clean it up, we don't have any builders that starts with release

I will remove this functionality from the dartium annotated step since it does not work correctly. This change allow us to use the normal chromium_utils function which we know work

TBR=whesse

Review URL: https://codereview.chromium.org/230683002

git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@262656 0039d316-1c4b-4281-b951-d872f2087c98

  
  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'
  
+   script = 'src/dartium_tools/buildbot_annotated_steps.py'
+ 
-   return chromium_utils.RunCommand([sys.executable, script])
+   chromium_utils.RunCommand([sys.executable, script])
+ 
+   # BIG HACK
+   # Normal ninja clobbering does not work due to symlinks/python on windows
+   # Full clobbering before building does not work since it will destroy
+   # the ninja build files
+   # So we basically clobber at the end here
+   if chromium_utils.IsWindows() and 'full' in builder_name:
+     chromium_utils.RemoveDirectory('src/out')
+   return 0
  
  if __name__ == '__main__':
    sys.exit(main())
  
Move hackish clobbering to the script that calls the dartium annotated steps
## Code Before:

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())

## Instruction:
Move hackish clobbering to the script that calls the dartium annotated steps
## Code After:

import os
import sys

from common import chromium_utils

def main():
  builder_name = os.getenv('BUILDBOT_BUILDERNAME', default='')

  script = 'src/dartium_tools/buildbot_annotated_steps.py'

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

  # BIG HACK
  # Normal ninja clobbering does not work due to symlinks/python on windows
  # Full clobbering before building does not work since it will destroy
  # the ninja build files
  # So we basically clobber at the end here
  if chromium_utils.IsWindows() and 'full' in builder_name:
    chromium_utils.RemoveDirectory('src/out')
  return 0

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