
import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

utils = bot_utils.GetUtils()

BUILD_OS = utils.GuessOS()

(bot_name, _) = bot.GetBotName()
CHANNEL = bot_utils.GetChannelFromName(bot_name)

if __name__ == '__main__':
  with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
    dart_exe = utils.CheckedInSdkExecutable()

    # These two calls mirror pkg/dev_compiler/tool/test.sh.
    bot.RunProcess([dart_exe, 'tool/build_pkgs.dart', 'test'])
    bot.RunProcess([dart_exe, 'test/all_tests.dart'])

    # These mirror pkg/dev_compiler/tool/browser_test.sh.
    bot.RunProcess(['npm', 'install'])
    bot.RunProcess(['npm', 'test'])


import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

utils = bot_utils.GetUtils()

BUILD_OS = utils.GuessOS()

(bot_name, _) = bot.GetBotName()
CHANNEL = bot_utils.GetChannelFromName(bot_name)

if __name__ == '__main__':
  with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
    dart_exe = utils.CheckedInSdkExecutable()

    # These two calls mirror pkg/dev_compiler/tool/test.sh.
    bot.RunProcess([dart_exe, 'tool/build_pkgs.dart', 'test'])
    bot.RunProcess([dart_exe, 'test/all_tests.dart'])

    # These mirror pkg/dev_compiler/tool/browser_test.sh.
    bot.RunProcess(['npm', 'install'])
    bot.RunProcess(['npm', 'test'], {'CHROME_BIN': 'chrome'})

Set CHROME_BIN on DDC bot
Set CHROME_BIN on DDC bot

Noticed the Linux bot is failing on this:

https://build.chromium.org/p/client.dart.fyi/builders/ddc-linux-release-be/builds/1724/steps/ddc%20tests/logs/stdio

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2640093002 .

  
  import os
  import os.path
  import shutil
  import sys
  import subprocess
  
  import bot
  import bot_utils
  
  utils = bot_utils.GetUtils()
  
  BUILD_OS = utils.GuessOS()
  
  (bot_name, _) = bot.GetBotName()
  CHANNEL = bot_utils.GetChannelFromName(bot_name)
  
  if __name__ == '__main__':
    with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
      dart_exe = utils.CheckedInSdkExecutable()
  
      # These two calls mirror pkg/dev_compiler/tool/test.sh.
      bot.RunProcess([dart_exe, 'tool/build_pkgs.dart', 'test'])
      bot.RunProcess([dart_exe, 'test/all_tests.dart'])
  
      # These mirror pkg/dev_compiler/tool/browser_test.sh.
      bot.RunProcess(['npm', 'install'])
-     bot.RunProcess(['npm', 'test'])
+     bot.RunProcess(['npm', 'test'], {'CHROME_BIN': 'chrome'})
  
Set CHROME_BIN on DDC bot
## Code Before:

import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

utils = bot_utils.GetUtils()

BUILD_OS = utils.GuessOS()

(bot_name, _) = bot.GetBotName()
CHANNEL = bot_utils.GetChannelFromName(bot_name)

if __name__ == '__main__':
  with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
    dart_exe = utils.CheckedInSdkExecutable()

    # These two calls mirror pkg/dev_compiler/tool/test.sh.
    bot.RunProcess([dart_exe, 'tool/build_pkgs.dart', 'test'])
    bot.RunProcess([dart_exe, 'test/all_tests.dart'])

    # These mirror pkg/dev_compiler/tool/browser_test.sh.
    bot.RunProcess(['npm', 'install'])
    bot.RunProcess(['npm', 'test'])

## Instruction:
Set CHROME_BIN on DDC bot
## Code After:

import os
import os.path
import shutil
import sys
import subprocess

import bot
import bot_utils

utils = bot_utils.GetUtils()

BUILD_OS = utils.GuessOS()

(bot_name, _) = bot.GetBotName()
CHANNEL = bot_utils.GetChannelFromName(bot_name)

if __name__ == '__main__':
  with utils.ChangedWorkingDirectory('pkg/dev_compiler'):
    dart_exe = utils.CheckedInSdkExecutable()

    # These two calls mirror pkg/dev_compiler/tool/test.sh.
    bot.RunProcess([dart_exe, 'tool/build_pkgs.dart', 'test'])
    bot.RunProcess([dart_exe, 'test/all_tests.dart'])

    # These mirror pkg/dev_compiler/tool/browser_test.sh.
    bot.RunProcess(['npm', 'install'])
    bot.RunProcess(['npm', 'test'], {'CHROME_BIN': 'chrome'})
