Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2016, 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 import os | 7 import os |
| 8 import os.path | 8 import os.path |
| 9 import shutil | 9 import shutil |
| 10 import sys | 10 import sys |
| 11 import subprocess | 11 import subprocess |
| 12 | 12 |
| 13 import bot | 13 import bot |
| 14 import bot_utils | 14 import bot_utils |
| 15 | 15 |
| 16 utils = bot_utils.GetUtils() | 16 utils = bot_utils.GetUtils() |
| 17 | 17 |
| 18 BUILD_OS = utils.GuessOS() | 18 BUILD_OS = utils.GuessOS() |
| 19 | 19 |
| 20 (bot_name, _) = bot.GetBotName() | 20 (bot_name, _) = bot.GetBotName() |
| 21 CHANNEL = bot_utils.GetChannelFromName(bot_name) | 21 CHANNEL = bot_utils.GetChannelFromName(bot_name) |
| 22 | 22 |
| 23 if __name__ == '__main__': | 23 if __name__ == '__main__': |
| 24 with utils.ChangedWorkingDirectory('pkg/dev_compiler'): | 24 with utils.ChangedWorkingDirectory('pkg/dev_compiler'): |
| 25 with bot.BuildStep('npm install'): | 25 # These steps mirror pkg/dev_compiler/tool/test.sh. |
| 26 with bot.BuildStep('Compile packages used by tests to JS'): | |
|
Bill Hesse
2017/01/03 20:09:21
These bot.BuildStep calls are doing nothing, becau
Bob Nystrom
2017/01/03 22:37:16
Eliminated them, with prejudice.
| |
| 27 bot.RunProcess([ | |
| 28 utils.CheckedInSdkExecutable(), 'tool/build_pkgs.dart', 'test' | |
| 29 ]) | |
| 30 | |
| 31 with bot.BuildStep('Run unit tests and compile tests to JS'): | |
| 32 bot.RunProcess([utils.CheckedInSdkExecutable(), 'test/all_tests.dart']) | |
| 33 | |
| 34 # These steps mirror pkg/dev_compiler/tool/browser_test.sh. | |
| 35 with bot.BuildStep('Install npm packages needed by JS test runner'): | |
| 26 bot.RunProcess(['npm', 'install']) | 36 bot.RunProcess(['npm', 'install']) |
| 27 | 37 |
| 28 with bot.BuildStep('Compile tests and run unit tests'): | |
| 29 bot.RunProcess([utils.CheckedInSdkExecutable(), 'test/all_tests.dart']) | |
| 30 | |
| 31 with bot.BuildStep('Execute compiled tests'): | 38 with bot.BuildStep('Execute compiled tests'): |
| 32 bot.RunProcess(['npm', 'test']) | 39 bot.RunProcess(['npm', 'test']) |
| OLD | NEW |