OLD | NEW |
1 # Copyright 2016 the V8 project authors. All rights reserved. | 1 # Copyright 2016 the V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # usage: test/test262/prune-local-tests.sh | 5 # usage: test/test262/prune-local-tests.sh |
6 # This script removes redundant tests present in the local-tests directory | 6 # This script removes redundant tests present in the local-tests directory |
7 # when they are identical to upstreamed tests. It should be run as part of | 7 # when they are identical to upstreamed tests. It should be run as part of |
8 # the test262 roll process. | 8 # the test262 roll process. |
9 | 9 |
10 find -f test/test262/local-tests | while read localpath; do | 10 find test/test262/local-tests -type f | while read localpath; do |
11 datapath=${localpath/local-tests/data} | 11 datapath=${localpath/local-tests/data} |
12 if diff $localpath $datapath >/dev/null ; then | 12 if [ -e $datapath ] ; then |
13 git rm $localpath || exit 1 | 13 if diff $localpath $datapath >/dev/null ; then |
| 14 git rm $localpath || exit 1 |
| 15 fi |
14 fi | 16 fi |
15 done | 17 done |
OLD | NEW |