#!/usr/bin/env python
# Copyright 2013 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.

"""A wrapper script that invokes test-webkitpy."""

import optparse
import os
import sys

from common import chromium_utils
from slave import build_directory
from slave import slave_utils


def main():
  option_parser = optparse.OptionParser()
  option_parser.add_option('--build-dir', help='ignored')

  # Note that --target isn't needed for --lint-test-files, but the
  # RunPythonCommandInBuildDir() will get upset if we don't say something.
  option_parser.add_option('', '--target', default='release',
      help='DumpRenderTree build configuration (Release or Debug)')

  options, _ = option_parser.parse_args()
  options.build_dir = build_directory.GetBuildOutputDirectory()

  build_dir = os.path.abspath(options.build_dir)
  webkit_tests_dir = chromium_utils.FindUpward(build_dir,
                                               'third_party', 'WebKit',
                                               'Tools', 'Scripts')
  command = [os.path.join(webkit_tests_dir, 'test-webkitpy')]
  return slave_utils.RunPythonCommandInBuildDir(build_dir, options.target,
                                                command)

if '__main__' == __name__:
  sys.exit(main())

#!/usr/bin/env python
# Copyright 2013 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.

"""A wrapper script that invokes test-webkitpy."""

import optparse
import os
import sys

from common import chromium_utils
from slave import build_directory
from slave import slave_utils


def main():
  option_parser = optparse.OptionParser()
  option_parser.add_option('--build-dir', help='ignored')

  # Note that --target isn't needed for --lint-test-files, but the
  # RunPythonCommandInBuildDir() will get upset if we don't say something.
  option_parser.add_option('', '--target', default='release',
      help='DumpRenderTree build configuration (Release or Debug)')

  options, _ = option_parser.parse_args()
  options.build_dir, _ = build_directory.GetBuildOutputDirectory()

  build_dir = os.path.abspath(options.build_dir)
  webkit_tests_dir = chromium_utils.FindUpward(build_dir,
                                               'third_party', 'WebKit',
                                               'Tools', 'Scripts')
  command = [os.path.join(webkit_tests_dir, 'test-webkitpy')]
  return slave_utils.RunPythonCommandInBuildDir(build_dir, options.target,
                                                command)

if '__main__' == __name__:
  sys.exit(main())

Revert 232670 "Fix script after r232641"
Revert 232670 "Fix script after r232641"

Needs to be out to speculatively revert r232641.

> Fix script after r232641
> 
> BUG=314253
> TBR=pfeldman@chromium.org
> 
> Review URL: https://codereview.chromium.org/49753004

TBR=thakis@chromium.org

Review URL: https://codereview.chromium.org/57293002

git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@232677 0039d316-1c4b-4281-b951-d872f2087c98
