about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-18 22:11:39 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-18 22:12:42 -0700
commit9922b5e683e86c6df48931ee90da1c5e6ad419ef (patch)
tree7612b7250b4a8882089e689220e4b409b4e9ede0 /t
parentc41a08821bf11eefebda3ea3e536eda8f4b4629b (diff)
downloadrainbows-9922b5e683e86c6df48931ee90da1c5e6ad419ef.tar.gz
If we're going to name a variable "fifo", it'll be for
descriptive reasons...
Diffstat (limited to 't')
-rw-r--r--t/lib-graceful.sh2
-rw-r--r--t/lib-input-trailer.sh2
-rw-r--r--t/lib-parser-error.sh2
-rw-r--r--t/lib-simple-http.sh2
-rwxr-xr-xt/test-lib.sh8
5 files changed, 8 insertions, 8 deletions
diff --git a/t/lib-graceful.sh b/t/lib-graceful.sh
index 38eaa55..097bdbe 100644
--- a/t/lib-graceful.sh
+++ b/t/lib-graceful.sh
@@ -3,8 +3,6 @@ echo "graceful test for model=$model"
 
 eval $(unused_listen)
 rtmpfiles unicorn_config curl_out pid r_err r_out fifo
-rm -f $fifo
-mkfifo $fifo
 
 cat > $unicorn_config <<EOF
 listen "$listen"
diff --git a/t/lib-input-trailer.sh b/t/lib-input-trailer.sh
index 90b76a7..758da4e 100644
--- a/t/lib-input-trailer.sh
+++ b/t/lib-input-trailer.sh
@@ -4,8 +4,6 @@ echo "input trailer test model=$model"
 
 eval $(unused_listen)
 rtmpfiles unicorn_config tmp r_err r_out pid fifo ok
-rm -f $fifo
-mkfifo $fifo
 
 cat > $unicorn_config <<EOF
 listen "$listen"
diff --git a/t/lib-parser-error.sh b/t/lib-parser-error.sh
index f2ec373..d8805e3 100644
--- a/t/lib-parser-error.sh
+++ b/t/lib-parser-error.sh
@@ -3,8 +3,6 @@ echo "parser error test for model=$model"
 
 eval $(unused_listen)
 rtmpfiles unicorn_config pid r_err r_out tmp fifo ok
-rm -f $fifo
-mkfifo $fifo
 
 cat > $unicorn_config <<EOF
 listen "$listen"
diff --git a/t/lib-simple-http.sh b/t/lib-simple-http.sh
index 330fe53..6c2350b 100644
--- a/t/lib-simple-http.sh
+++ b/t/lib-simple-http.sh
@@ -8,8 +8,6 @@ test -f "$tbase" || die "$tbase missing for $T"
 
 eval $(unused_listen)
 rtmpfiles unicorn_config pid r_err r_out tmp fifo ok
-rm -f $fifo
-mkfifo $fifo
 
 cat > $unicorn_config <<EOF
 listen "$listen"
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 403e252..be2dce2 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -72,9 +72,17 @@ require_check () {
 rtmpfiles () {
         for id in "$@"
         do
+                name=$id
                 _tmp=$(mktemp -t rainbows.$$.$id.XXXXXXXX)
                 eval "$id=$_tmp"
                 _TEST_RM_LIST="$_TEST_RM_LIST $_tmp"
+
+                case $name in
+                *fifo)
+                        rm -f $_tmp
+                        mkfifo $_tmp
+                        ;;
+                esac
         done
 }