⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 111325 in webkit


Ignore:
Timestamp:
Mar 19, 2012, 7:47:03 PM (14 years ago)
Author:
Martin Robinson
Message:

Merging r110866

Location:
releases/WebKitGTK/webkit-1.8/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-1.8/Tools/ChangeLog

    r111324 r111325  
     12012-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Actually use --release and --debug command line options in run-gtk-test
     4        https://bugs.webkit.org/show_bug.cgi?id=81234
     5
     6        Reviewed by Philippe Normand.
     7
     8        Actually handle --release and --debug command line options to
     9        create the build directory, falling back to current hack to detect
     10        whether it's a Release or Debug build when both options are missed.
     11
     12        * Scripts/run-gtk-tests:
     13        (TestRunner.__init__): Receive options too.
     14        (TestRunner._get_top_level_directory): Helper function to get the
     15        top level directory.
     16        (TestRunner._get_build_directory): Helper function to get the
     17        build directory depending on --release/--debug command line
     18        options or gessing it if both options are missing.
     19        (TestRunner._ensure_accessibility_daemon_is_running): Use
     20        self-options now.
     21        (TestRunner.run): Ditto.
     22        (TestRunner.run.run_tests): Pass options to the constructor
     23        instead of run().
     24
    1252012-03-19  Philippe Normand  <pnormand@igalia.com>
    226
  • releases/WebKitGTK/webkit-1.8/Tools/Scripts/run-gtk-tests

    r111324 r111325  
    3737                "WebKit2APITests/TestDownloads" ]
    3838
    39     def __init__(self, tests=[]):
     39    def __init__(self, options, tests=[]):
    4040
    4141        # FIXME: webkit-build-directory --configuration always returns
     
    4444        #build_directory = self._executive.run_command([build_directory_script, "--configuration"]).rstrip()
    4545
    46         def is_valid_build_directory(build_dir):
    47             return os.path.exists(os.path.join(build_dir, ".libs"))
    48 
    49         script_dir = os.path.dirname(__file__)
    50         top_level = os.path.normpath(os.path.join(script_dir, "..", ".."))
    51         build_directory = os.path.join(top_level, 'WebKitBuild', 'Release')
    52         if not is_valid_build_directory(build_directory):
    53             build_directory = os.path.join(top_level, 'WebKitBuild', 'Debug')
    54 
     46        self._options = options
    5547        self._a11y_registryd = None
    5648        self._timed_out = False
    57         self._gtk_tools_directory = os.path.join(top_level, "Tools", "gtk")
    58         self._programs_path = os.path.join(build_directory, "Programs")
     49        self._gtk_tools_directory = os.path.join(self._get_top_level_directory(), "Tools", "gtk")
     50        self._programs_path = os.path.join(self._get_build_directory(), "Programs")
    5951        self._tests = self._get_tests(tests)
     52
     53    def _get_top_level_directory(self):
     54        return os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
     55
     56    def _get_build_directory(self):
     57        top_level = self._get_top_level_directory()
     58        if self._options.release:
     59            return os.path.join(top_level, 'WebKitBuild', 'Release')
     60        if self._options.debug:
     61            return os.path.join(top_level, 'WebKitBuild', 'Debug')
     62
     63        build_directory = os.path.join(top_level, 'WebKitBuild', 'Release')
     64        if os.path.exists(os.path.join(build_directory, '.libs')):
     65            return build_directory
     66        build_directory = os.path.join(top_level, 'WebKitBuild', 'Debug')
     67        if os.path.exists(os.path.join(build_directory, '.libs')):
     68            return build_directory
     69
     70        return os.path.join(top_level, 'WebKitBuild')
    6071
    6172    def _get_tests(self, tests):
     
    126137                self._a11y_registryd = None
    127138
    128     def run(self, options):
     139    def run(self):
    129140        if not self._tests:
    130141            sys.stderr.write("ERROR: tests not found in %s.\n" % (self._programs_path))
     
    133144
    134145        test_env = os.environ
    135         test_env["DISPLAY"] = options.display
     146        test_env["DISPLAY"] = self._options.display
    136147        test_env["WEBKIT_INSPECTOR_PATH"] = os.path.abspath(os.path.join(self._programs_path, 'resources', 'inspector'))
    137148        test_env['GSETTINGS_BACKEND'] = 'memory'
     
    159170            for test in self._tests:
    160171                tester_command = [jhbuild_path , 'gtester']
    161                 if options.verbose:
     172                if self._options.verbose:
    162173                    tester_command.append('--verbose')
    163174                tester_command.append(test)
     
    210221
    211222    try:
    212         sys.exit(TestRunner(args).run(options))
     223        sys.exit(TestRunner(options, args).run())
    213224    finally:
    214225        xvfb.kill()
Note: See TracChangeset for help on using the changeset viewer.