run_webkit_tests.py revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
1#!/usr/bin/env python
2# Copyright (c) 2010 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6"""Wrapper around
7   third_party/WebKit/Tools/Scripts/run-webkit-tests"""
8import os
9import subprocess
10import sys
11
12def main():
13    cmd = [sys.executable]
14    src_dir = os.path.abspath(os.path.join(sys.path[0], '..', '..', '..'))
15    script_dir=os.path.join(src_dir, "third_party", "WebKit", "Tools",
16                            "Scripts")
17    script = os.path.join(script_dir, 'run-webkit-tests')
18    cmd.append(script)
19    if '--chromium' not in sys.argv:
20        cmd.append('--chromium')
21    cmd.extend(sys.argv[1:])
22    return subprocess.call(cmd)
23
24if __name__ == '__main__':
25    sys.exit(main())
26