{"thread":{"id":"52804","subject":"[PATCH] t9001, t9116: avoid pipes","startedAt":"2020-02-14T13:53:25Z","lastAt":"2020-02-14T13:53:25Z","messageCount":1,"participants":["Johannes Schindelin via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"391751","messageId":"pull.709.git.git.1581688401866.gitgitgadget@gmail.com","threadId":"52804","inReplyTo":null,"subject":"[PATCH] t9001, t9116: avoid pipes","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-02-14T13:53:21Z","receivedAt":"2020-02-14T13:53:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nWhen grepping through the output of a command in the test suite, there\nis always a chance that something goes wrong, in which case there would\nnot be anything useful to debug.\n\nLet's redirect the output into a file instead, and grep that file, so\nthat the log can be inspected easily if the grep fails.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    Avoid pipes in git-svn tests\n    \n    This is one more of those patches that convert the pattern a | b to a\n    >file && b<file so that failures in a are caught, too.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-709%2Fdscho%2Favoid-pipes-in-svn-tests-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-709/dscho/avoid-pipes-in-svn-tests-v1\nPull-Request: https://github.com/git/git/pull/709\n\n t/t9001-send-email.sh  |  4 ++--\n t/t9116-git-svn-log.sh | 12 ++++++++----\n 2 files changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex a834afab4d7..90f61c34009 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -1194,8 +1194,8 @@ test_expect_success $PREREQ 'in-reply-to but no threading' '\n \t\t--to=nobody@example.com \\\n \t\t--in-reply-to=\"<in-reply-id@example.com>\" \\\n \t\t--no-thread \\\n-\t\t$patches |\n-\tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n+\t\t$patches >out &&\n+\tgrep \"In-Reply-To: <in-reply-id@example.com>\" out\n '\n \n test_expect_success $PREREQ 'no in-reply-to and no threading' '\ndiff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh\nindex 45773ee560d..0a9f1ef366d 100755\n--- a/t/t9116-git-svn-log.sh\n+++ b/t/t9116-git-svn-log.sh\n@@ -43,14 +43,18 @@ test_expect_success 'setup repository and import' '\n \n test_expect_success 'run log' \"\n \tgit reset --hard origin/a &&\n-\tgit svn log -r2 origin/trunk | grep ^r2 &&\n-\tgit svn log -r4 origin/trunk | grep ^r4 &&\n-\tgit svn log -r3 | grep ^r3\n+\tgit svn log -r2 origin/trunk >out &&\n+\tgrep ^r2 out &&\n+\tgit svn log -r4 origin/trunk >out &&\n+\tgrep ^r4 out &&\n+\tgit svn log -r3 >out &&\n+\tgrep ^r3 out\n \t\"\n \n test_expect_success 'run log against a from trunk' \"\n \tgit reset --hard origin/trunk &&\n-\tgit svn log -r3 origin/a | grep ^r3\n+\tgit svn log -r3 origin/a >out &&\n+\tgrep ^r3 out\n \t\"\n \n printf 'r1 \\nr2 \\nr4 \\n' > expected-range-r1-r2-r4\n\nbase-commit: d8437c57fa0752716dde2d3747e7c22bf7ce2e41\n-- \ngitgitgadget\n"}]}