p0004: avoid using pipes

The return code of commands on the producing end of a pipe is ignored. Evaluate the outcome of test-lazy-init-name-hash by calling sort separately. Signed-off-by: Rene Scharfe <l.s.r@web.de> Acked-by: Jeff Hostetler <git@jeffhostetler.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed May 13, 2017 at 18:00 UTC e1ebb569c61d17e2f721f32084fcc7b7394b1692
1 file changed +5 -3
t/perf/p0004-lazy-init-name-hash.sh
+5 -3
@@ -7,9 +7,11 @@ test_perf_large_repo
7 test_checkout_worktree
8
9 test_expect_success 'verify both methods build the same hashmaps' '
10 - test-lazy-init-name-hash --dump --single | sort >out.single &&
11 - test-lazy-init-name-hash --dump --multi | sort >out.multi &&
12 - test_cmp out.single out.multi
10 + test-lazy-init-name-hash --dump --single >out.single &&
11 + test-lazy-init-name-hash --dump --multi >out.multi &&
12 + sort <out.single >sorted.single &&
13 + sort <out.multi >sorted.multi &&
14 + test_cmp sorted.single sorted.multi
15 '
16
17 test_expect_success 'multithreaded should be faster' '