Changeset 111325 in webkit
- Timestamp:
- Mar 19, 2012, 7:47:03 PM (14 years ago)
- Location:
- releases/WebKitGTK/webkit-1.8/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/run-gtk-tests (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-1.8/Tools/ChangeLog
r111324 r111325 1 2012-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 1 25 2012-03-19 Philippe Normand <pnormand@igalia.com> 2 26 -
releases/WebKitGTK/webkit-1.8/Tools/Scripts/run-gtk-tests
r111324 r111325 37 37 "WebKit2APITests/TestDownloads" ] 38 38 39 def __init__(self, tests=[]):39 def __init__(self, options, tests=[]): 40 40 41 41 # FIXME: webkit-build-directory --configuration always returns … … 44 44 #build_directory = self._executive.run_command([build_directory_script, "--configuration"]).rstrip() 45 45 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 55 47 self._a11y_registryd = None 56 48 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") 59 51 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') 60 71 61 72 def _get_tests(self, tests): … … 126 137 self._a11y_registryd = None 127 138 128 def run(self , options):139 def run(self): 129 140 if not self._tests: 130 141 sys.stderr.write("ERROR: tests not found in %s.\n" % (self._programs_path)) … … 133 144 134 145 test_env = os.environ 135 test_env["DISPLAY"] = options.display146 test_env["DISPLAY"] = self._options.display 136 147 test_env["WEBKIT_INSPECTOR_PATH"] = os.path.abspath(os.path.join(self._programs_path, 'resources', 'inspector')) 137 148 test_env['GSETTINGS_BACKEND'] = 'memory' … … 159 170 for test in self._tests: 160 171 tester_command = [jhbuild_path , 'gtester'] 161 if options.verbose:172 if self._options.verbose: 162 173 tester_command.append('--verbose') 163 174 tester_command.append(test) … … 210 221 211 222 try: 212 sys.exit(TestRunner( args).run(options))223 sys.exit(TestRunner(options, args).run()) 213 224 finally: 214 225 xvfb.kill()
Note:
See TracChangeset
for help on using the changeset viewer.