OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 """ | 7 """ |
8 Buildbot steps for functional testing master and slaves | 8 Buildbot steps for functional testing master and slaves |
9 """ | 9 """ |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 Run(['unzip', local_path, '-d', editor_location]) | 71 Run(['unzip', local_path, '-d', editor_location]) |
72 | 72 |
73 def FTMaster(config): | 73 def FTMaster(config): |
74 run = int(os.environ['BUILDBOT_ANNOTATED_STEPS_RUN']) | 74 run = int(os.environ['BUILDBOT_ANNOTATED_STEPS_RUN']) |
75 with bot.BuildStep('Master run %s' % run): | 75 with bot.BuildStep('Master run %s' % run): |
76 if run == 1: | 76 if run == 1: |
77 print 'Not doing anything on master before the triggers' | 77 print 'Not doing anything on master before the triggers' |
78 return | 78 return |
79 else: | 79 else: |
80 builddir = os.path.join(bot_utils.DART_DIR, | 80 builddir = os.path.join(bot_utils.DART_DIR, |
81 utils.GetBuildDir(HOST_OS, HOST_OS), | 81 utils.GetBuildDir(HOST_OS), |
82 'functional_testing') | 82 'functional_testing') |
83 shutil.rmtree(builddir, ignore_errors=True) | 83 shutil.rmtree(builddir, ignore_errors=True) |
84 os.makedirs(builddir) | 84 os.makedirs(builddir) |
85 script_locations = os.path.join(bot_utils.DART_DIR, 'editor', 'ft') | 85 script_locations = os.path.join(bot_utils.DART_DIR, 'editor', 'ft') |
86 Run(['/home/chrome-bot/func-test/bot-run', builddir, script_locations]) | 86 Run(['/home/chrome-bot/func-test/bot-run', builddir, script_locations]) |
87 | 87 |
88 def FTSteps(config): | 88 def FTSteps(config): |
89 if config.builder_tag == 'master': | 89 if config.builder_tag == 'master': |
90 FTMaster(config) | 90 FTMaster(config) |
91 else: | 91 else: |
92 FTSlave(config) | 92 FTSlave(config) |
93 | 93 |
94 if __name__ == '__main__': | 94 if __name__ == '__main__': |
95 bot.RunBot(SrcConfig, FTSteps, build_step=None) | 95 bot.RunBot(SrcConfig, FTSteps, build_step=None) |
OLD | NEW |