Changeset 154595 in webkit
- Timestamp:
- Aug 26, 2013 3:36:03 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r154594 r154595 1 2013-08-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Add support for passing test directories to run-gtk-tests 4 https://bugs.webkit.org/show_bug.cgi?id=120296 5 6 Reviewed by Philippe Normand. 7 8 * Scripts/run-gtk-tests: 9 (TestRunner._get_tests_from_dir): Helper function to return all 10 unit tests found in a given directory. 11 (TestRunner._get_tests): Check the given tests passed in the 12 command line, so that if a directory is found the tests contained 13 in the directory are added to the list of tests to run. 14 1 15 2013-08-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Tools/Scripts/run-gtk-tests
r153085 r154595 98 98 self._spi_bus_launcher = None 99 99 100 def _get_tests(self, tests): 100 def _get_tests_from_dir(self, test_dir): 101 if not os.path.isdir(test_dir): 102 return [] 103 104 tests = [] 105 for test_file in os.listdir(test_dir): 106 if not test_file.lower().startswith("test"): 107 continue 108 test_path = os.path.join(test_dir, test_file) 109 if os.path.isfile(test_path) and os.access(test_path, os.X_OK): 110 tests.append(test_path) 111 return tests 112 113 def _get_tests(self, initial_tests): 114 tests = [] 115 for test in initial_tests: 116 if os.path.isdir(test): 117 tests.extend(self._get_tests_from_dir(test)) 118 else: 119 tests.append(test) 101 120 if tests: 102 121 return tests … … 105 124 for test_dir in self.TEST_DIRS: 106 125 absolute_test_dir = os.path.join(self._programs_path, test_dir) 107 if not os.path.isdir(absolute_test_dir): 108 continue 109 for test_file in os.listdir(absolute_test_dir): 110 if not test_file.lower().startswith("test"): 111 continue 112 test_path = os.path.join(self._programs_path, test_dir, test_file) 113 if os.path.isfile(test_path) and os.access(test_path, os.X_OK): 114 tests.append(test_path) 126 tests.extend(self._get_tests_from_dir(absolute_test_dir)) 115 127 return tests 116 128
Note: See TracChangeset
for help on using the changeset viewer.