t: make PIPE a standard test prerequisite
authorAdam Spiers <git@adamspiers.org>
Thu, 11 Apr 2013 02:07:04 +0000 (03:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Apr 2013 00:39:05 +0000 (17:39 -0700)
The 'PIPE' test prerequisite was already defined identically by t9010
and t9300, therefore it makes sense to make it a predefined
prerequisite.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/README
t/t9010-svn-fe.sh
t/t9300-fast-import.sh
t/test-lib.sh
index 6e536a02b58aa3b9bf87c59510a0e56faff79a6f..f8bf3ec318f24b883efc75a4b157919687e34156 100644 (file)
--- a/t/README
+++ b/t/README
@@ -613,6 +613,11 @@ use these, and "test_set_prereq" for how to define your own.
    The process retains the same pid across exec(2). See fb9a2bea for
    details.
 
+ - PIPE
+
+   The filesystem we're on supports creation of FIFOs (named pipes)
+   via mkfifo(1).
+
  - SYMLINKS
 
    The filesystem we're on supports symbolic links. E.g. a FAT
index b7eed2489fa169aa1c6e5c98f59a0349ba8118fa..6dafe7e99ab4bd0006ed4f7204062fca31750689 100755 (executable)
@@ -54,14 +54,6 @@ text_no_props () {
 
 >empty
 
-test_expect_success 'setup: have pipes?' '
-       rm -f frob &&
-       if mkfifo frob
-       then
-               test_set_prereq PIPE
-       fi
-'
-
 test_expect_success PIPE 'empty dump' '
        reinit_git &&
        echo "SVN-fs-dump-format-version: 2" >input &&
index 2fcf2694696fedb5e7e3d57c869f7dbbbf23dbec..ac6f3b6af25c67ae3a2c0748c34f99b4cd0d4b32 100755 (executable)
@@ -49,14 +49,6 @@ echo "$@"'
 
 >empty
 
-test_expect_success 'setup: have pipes?' '
-       rm -f frob &&
-       if mkfifo frob
-       then
-               test_set_prereq PIPE
-       fi
-'
-
 ###
 ### series A
 ###
index 1f510252ad7cb7a5afae67731bc37fccf941b654..8d76cf23d46c813991fbf59da2f1f3b79110547c 100644 (file)
@@ -727,6 +727,11 @@ test_i18ngrep () {
        fi
 }
 
+test_lazy_prereq PIPE '
+       # test whether the filesystem supports FIFOs
+       rm -f testfifo && mkfifo testfifo
+'
+
 test_lazy_prereq SYMLINKS '
        # test whether the filesystem supports symbolic links
        ln -s x y && test -h y