summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-10-28 10:07:28 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-10-28 11:48:03 +0100
commitcf957e07c6fc6f02b287cd670b4b964a94b9bfc8 (patch)
tree063b20dcfae6f8c5c2a68750bdff764424c0a9ca /tools
parentaa3e67febc8f0374549691df82752186eccd697d (diff)
downloadscala-cf957e07c6fc6f02b287cd670b4b964a94b9bfc8.tar.gz
scala-cf957e07c6fc6f02b287cd670b4b964a94b9bfc8.tar.bz2
scala-cf957e07c6fc6f02b287cd670b4b964a94b9bfc8.zip
Remove tools/test-renamer
It delivered us the terser 't1234' naming convention for test cases. Its work is done. This commit does the bidding of the script's author: > Despite its shameful hackiness, checked in for posterity. > It'll live on forever in the git history; then I can remove it.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test-renamer82
1 files changed, 0 insertions, 82 deletions
diff --git a/tools/test-renamer b/tools/test-renamer
deleted file mode 100755
index 5a7fc3d78c..0000000000
--- a/tools/test-renamer
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env bash
-#
-# Despite its shameful hackiness, checked in for posterity.
-# It'll live on forever in the git history; then I can remove it.
-
-# set -e
-shopt -s nullglob
-
-cd $(dirname $0)/../test
-
-rename_pattern='^.*/bug[0-9]+.*?(\.scala)?$'
-
-targets ()
-{
- ls -d pending/*/* disabled/*/* | egrep "$rename_pattern"
-}
-
-showRun ()
-{
- echo "$@"
- "$@"
-}
-
-for path in $(targets); do
- if [[ -f "$path" ]]; then
- # echo "$path"
- dir=$(dirname "$path")
- file=$(basename "$path")
- base=${file%%.scala}
- num=${base##bug}
-
- (cd "$dir" &&
- for file in ${base}.*; do
- ext=${file##*.}
- newname="t${num}.${ext}"
-
- if [[ -e "$newname" ]]; then
- echo "Hey, $newname already exists."
- else
- showRun perl -pi -e "'s/bug$num\b/t$num/g;'" "$file"
- showRun mv "$file" "$newname"
- fi
- done
- )
- fi
-
- if [[ -d "$path" ]]; then
- dir=$(dirname "$path")
- file=$(basename "$path")
- base="$file"
- num=${base##bug}
-
- (cd "$dir" &&
- for file in $file ${file}.*; do
- ext=${file##*.}
- if [[ "$ext" != "$file" ]]; then
- newname="t${num}.${ext}"
- else
- newname="t${num}"
- for file0 in ${file}/*; do
- showRun perl -pi -e "'s/bug$num\b/t$num/g;'" "$file0"
- done
- fi
-
- if [[ -e "$newname" ]]; then
- echo "Hey, $newname already exists."
- else
- if [[ -f "$file" ]]; then
- showRun perl -pi -e "'s/bug$num\b/t$num/g;'" "$file"
- fi
- showRun mv "$file" "$newname"
- fi
- done
- )
-
- fi
-
-done
-#
-# for d in files/*/*; do
-# [[ -d "$d" ]] && do_dir "$d"
-# done