Fixing issues with slaves.cfg on Windows.
This fix is needed for our own build slaves to work properly on Windows and is caused by the hacky way we created the Libvpx waterfall to avoid duplicating unnecessary Python code. TBR=phoglund BUG=None TEST=Tested on Windows build slave. Review URL: https://webrtc-codereview.appspot.com/639009 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2387 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
eec739f846
commit
f08f52f136
@ -44,9 +44,9 @@ deps_os = {
|
||||
|
||||
hooks = [
|
||||
{
|
||||
# Update slave buildbot.tac to include WebRTC slave_utils import.
|
||||
# Make changes needed for customization of WebRTC buildbots.
|
||||
"pattern": ".",
|
||||
"action": ["python", "tools/add_webrtc_slave_utils.py"],
|
||||
"action": ["python", "tools/fix_webrtc_buildbots.py"],
|
||||
},
|
||||
]
|
||||
|
||||
|
@ -7,30 +7,37 @@
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
__author__ = 'kjellander@webrtc.org (Henrik Kjellander)'
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Simple script for adding an import of the WebRTC slave_utils module for the
|
||||
buildbot slaves to the Chromium buildbot.tac file.
|
||||
Performs changes after checkout needed for WebRTC buildbot customizations.
|
||||
|
||||
This script performs the following tasks:
|
||||
- Adds an import of the WebRTC slave_utils module in the buildbot.tac file.
|
||||
It will add a comment and the import at the end of the file, if it's not
|
||||
already present.
|
||||
- Removes the slaves.cfg for the Libvpx waterfall on Windows platforms, since
|
||||
symbolic links are not available on this platform and the resulting link
|
||||
file causes a parsing error in Python when loaded during slave startup.
|
||||
|
||||
Using this script, we don't need to maintain our own version of the slave
|
||||
scripts and can automatically stay up to date with their changes.
|
||||
It will add a comment and the import at the end of the file, if it's not
|
||||
already present.
|
||||
|
||||
This script should be invoked as a hooks step in the DEPS file, like this:
|
||||
hooks = [
|
||||
{
|
||||
# Update slave buildbot.tac to include WebRTC slave_utils import.
|
||||
"pattern": ".",
|
||||
"action": ["python", "tools/add_webrtc_slave_utils.py"],
|
||||
"action": ["python", "tools/fix_webrtc_buildbots.py"],
|
||||
},
|
||||
]
|
||||
"""
|
||||
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# Patch buildbot.tac.
|
||||
TARGET_FILE = os.path.join(SCRIPT_PATH,
|
||||
'continuous_build/build/slave/buildbot.tac')
|
||||
COMMENT_LINE = '# Load WebRTC custom slave script.\n'
|
||||
@ -45,5 +52,13 @@ def main():
|
||||
file.write(IMPORT_LINE)
|
||||
file.close()
|
||||
|
||||
# Remove Libvpx waterfall's slaves.cfg on Windows.
|
||||
if sys.platform.startswith('win'):
|
||||
slave_cfg = os.path.join(SCRIPT_PATH, ('continuous_build/build_internal/'
|
||||
'masters/master.libvpx/slaves.cfg'))
|
||||
if os.path.exists(slave_cfg):
|
||||
os.remove(slave_cfg)
|
||||
print 'Removed %s for Libvpx waterfall on Windows.' % slave_cfg
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
x
Reference in New Issue
Block a user