Index: scripts/slave/chromium/archive_layout_test_results.py |
diff --git a/scripts/slave/chromium/archive_layout_test_results.py b/scripts/slave/chromium/archive_layout_test_results.py |
index 19cc1f23b309121686403e3423edcd6eb8055b32..1be89a656650bc580638ca7eeb6ffefb3dde3b6c 100755 |
--- a/scripts/slave/chromium/archive_layout_test_results.py |
+++ b/scripts/slave/chromium/archive_layout_test_results.py |
@@ -35,28 +35,30 @@ from slave import slave_utils |
RESULT_DIR = 'layout-test-results' |
-def _CollectArchiveFiles(output_dir): |
- """Returns a list of actual layout test result files to archive.""" |
- actual_file_list = [] |
+def _CollectZipArchiveFiles(output_dir): |
+ """Returns a list of layout test result files to archive in a zip file.""" |
+ file_list = [] |
for path, _, files in os.walk(output_dir): |
rel_path = path[len(output_dir + '\\'):] |
for name in files: |
if _IsActualResultFile(name): |
- actual_file_list.append(os.path.join(rel_path, name)) |
+ file_list.append(os.path.join(rel_path, name)) |
+ if _IsDiffFile(name): |
+ diff_file_list.append(os.path.join(rel_path, name)) |
Dirk Pranke
2016/10/18 20:00:51
diff_file_list isn't declared or returned? Did you
qyearsley
2016/10/18 20:50:33
Right, that's what I meant -- now merged them and
|
elif name.endswith('.json'): |
- actual_file_list.append(os.path.join(rel_path, name)) |
+ file_list.append(os.path.join(rel_path, name)) |
if os.path.exists(os.path.join(output_dir, 'results.html')): |
- actual_file_list.append('results.html') |
+ file_list.append('results.html') |
if sys.platform == 'win32': |
if os.path.exists(os.path.join(output_dir, 'access_log.txt')): |
- actual_file_list.append('access_log.txt') |
+ file_list.append('access_log.txt') |
if os.path.exists(os.path.join(output_dir, 'error_log.txt')): |
- actual_file_list.append('error_log.txt') |
+ file_list.append('error_log.txt') |
- return actual_file_list |
+ return file_list |
def _IsActualResultFile(name): |
@@ -67,6 +69,13 @@ def _IsActualResultFile(name): |
('.txt', '.png', '.checksum', '.wav')) |
+def _IsDiffFile(name): |
+ return ('-wdiff.' in name or |
+ '-expected.' in name or |
+ name.endswith('-diff.txt') or |
+ name.endswith('-diff.png')) |
+ |
+ |
def archive_layout(options): |
chrome_dir = os.path.abspath(options.build_dir) |
results_dir_basename = os.path.basename(options.results_dir) |
@@ -81,10 +90,10 @@ def archive_layout(options): |
if not os.path.exists(staging_dir): |
os.makedirs(staging_dir) |
- actual_file_list = _CollectArchiveFiles(options.results_dir) |
+ file_list = _CollectZipArchiveFiles(options.results_dir) |
zip_file = chromium_utils.MakeZip(staging_dir, |
results_dir_basename, |
- actual_file_list, |
+ file_list, |
options.results_dir)[1] |
# Extract the build name of this slave (e.g., 'chrome-release') from its |