Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: webkit/tools/layout_tests/webkitpy/layout_tests/dedup-tests.py

Issue 6263015: Remove dedup-tests.py (it has moved upstream) and 2 empty (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/layout_tests/webkitpy/layout_tests/dedup-tests.py
===================================================================
--- webkit/tools/layout_tests/webkitpy/layout_tests/dedup-tests.py (revision 72664)
+++ webkit/tools/layout_tests/webkitpy/layout_tests/dedup-tests.py (working copy)
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""dedup-tests -- print test results duplicated between win and linux.
-
-Because the outputs are very similar, we fall back on Windows outputs
-if there isn't an expected output for Linux layout tests. This means
-that any file that is duplicated between the Linux and Windows directories
-is redundant.
-
-This command dumps out all such files. You can use it like:
- dedup-tests.py # print out the bad files
- dedup-tests.py | xargs git rm # delete the bad files
-"""
-
-import collections
-import os.path
-import subprocess
-import sys
-
-# A map of file hash => set of all files with that hash.
-hashes = collections.defaultdict(set)
-
-# Fill in the map.
-cmd = ['git', 'ls-tree', '-r', 'HEAD', 'webkit/data/layout_tests/']
-try:
- git = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-except OSError, e:
- if e.errno == 2: # No such file or directory.
- print >> sys.stderr, "Error: 'No such file' when running git."
- print >> sys.stderr, "This script requires git."
- sys.exit(1)
- raise e
-
-for line in git.stdout:
- attrs, file = line.strip().split('\t')
- _, _, hash = attrs.split(' ')
- hashes[hash].add(file)
-
-# Dump out duplicated files.
-for cluster in hashes.values():
- if len(cluster) < 2:
- continue
- for file in cluster:
- if '/chromium-linux/' in file:
- if file.replace('/chromium-linux/', '/chromium-win/') in cluster:
- print file
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698