{"thread":{"id":"33469","subject":"[PATCH] t: make PIPE a standard test prerequisite","startedAt":"2013-04-11T02:07:04Z","lastAt":"2013-04-11T02:07:04Z","messageCount":1,"participants":["Adam Spiers"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"213885","messageId":"1365646024-27393-1-git-send-email-git@adamspiers.org","threadId":"33469","inReplyTo":null,"subject":"[PATCH] t: make PIPE a standard test prerequisite","fromName":"Adam Spiers","fromEmail":"git@adamspiers.org","sentAt":"2013-04-11T02:07:04Z","receivedAt":"2013-04-11T02:07:04Z","isPatch":true,"sender":{"key":"git@adamspiers.org","avatar":"https://avatars.githubusercontent.com/u/100738?v=4"},"body":"The 'PIPE' test prerequisite was already defined identically by t9010\nand t9300, therefore it makes sense to make it a predefined\nprerequisite.\n\nSigned-off-by: Adam Spiers <git@adamspiers.org>\n---\nMy first attempt at writing a test for check-ignore's new streaming\nbehaviour involved mkfifo, during which I noticed this code duplication.\n\n t/README               | 5 +++++\n t/t9010-svn-fe.sh      | 8 --------\n t/t9300-fast-import.sh | 8 --------\n t/test-lib.sh          | 5 +++++\n 4 files changed, 10 insertions(+), 16 deletions(-)\n\ndiff --git a/t/README b/t/README\nindex 9b41fe7..70e49fc 100644\n--- a/t/README\n+++ b/t/README\n@@ -619,6 +619,11 @@ use these, and \"test_set_prereq\" for how to define your own.\n    The process retains the same pid across exec(2). See fb9a2bea for\n    details.\n \n+ - PIPE\n+\n+   The filesystem we're on supports creation of FIFOs (named pipes)\n+   via mkfifo(1).\n+\n  - SYMLINKS\n \n    The filesystem we're on supports symbolic links. E.g. a FAT\ndiff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh\nindex b7eed24..6dafe7e 100755\n--- a/t/t9010-svn-fe.sh\n+++ b/t/t9010-svn-fe.sh\n@@ -54,14 +54,6 @@ text_no_props () {\n \n >empty\n \n-test_expect_success 'setup: have pipes?' '\n-\trm -f frob &&\n-\tif mkfifo frob\n-\tthen\n-\t\ttest_set_prereq PIPE\n-\tfi\n-'\n-\n test_expect_success PIPE 'empty dump' '\n \treinit_git &&\n \techo \"SVN-fs-dump-format-version: 2\" >input &&\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 2fcf269..ac6f3b6 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -49,14 +49,6 @@ echo \"$@\"'\n \n >empty\n \n-test_expect_success 'setup: have pipes?' '\n-\trm -f frob &&\n-\tif mkfifo frob\n-\tthen\n-\t\ttest_set_prereq PIPE\n-\tfi\n-'\n-\n ###\n ### series A\n ###\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex da57a2f..debd8b4 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -735,6 +735,11 @@ test_i18ngrep () {\n \tfi\n }\n \n+test_lazy_prereq PIPE '\n+\t# test whether the filesystem supports FIFOs\n+\trm -f testfifo && mkfifo testfifo\n+'\n+\n test_lazy_prereq SYMLINKS '\n \t# test whether the filesystem supports symbolic links\n \tln -s x y && test -h y\n-- \n1.8.2.1.347.g37e0606\n"}]}