| # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| """Utility script to launch browser-tests on the Chromoting bot.""" |
| PROD_DIR_ID = '$(PROD_DIR)' |
| def LaunchCommand(command): |
| results = subprocess.check_output( |
| cmd_line, stderr=subprocess.STDOUT, shell=True) |
| except subprocess.CalledProcessError, e: |
| raise Exception('Exception %s running command %s' % (e, command)) |
| parser = argparse.ArgumentParser() |
| parser.add_argument('-f', '--file', |
| help='path to file listing commands to be launched.') |
| parser.add_argument('-p', '--prod_dir', |
| help='path to folder having product and test binaries.') |
| args = parser.parse_args() |
| with open(args.file) as f: |
| # Replace the PROD_DIR value in the command-line with |
| line = line.replace(PROD_DIR_ID, args.prod_dir) |
| if __name__ == '__main__': |