From 816f851488867ae3384db9281b122afa92309091 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 16 Feb 2014 21:53:15 +0100 Subject: [PATCH] testsuite: test --line-buffer --pipe --- src/parallel | 3 +++ testsuite/tests-to-run/parallel-local114.sh | 10 +++++++++- testsuite/wanted-results/parallel-local114 | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/parallel b/src/parallel index 7fc167d7..40fb3c6f 100755 --- a/src/parallel +++ b/src/parallel @@ -171,6 +171,7 @@ if($opt::pipe) { drain_job_queue(); ::debug("Done draining\n"); reaper(); +::debug("Done reaping\n"); if($opt::pipe and @opt::a) { for my $job (@Global::tee_jobs) { unlink $job->fh(2,"name"); @@ -179,10 +180,12 @@ if($opt::pipe and @opt::a) { unlink $job->fh(1,"name"); } } +::debug("Cleaning\n"); cleanup(); if($Global::semaphore) { $sem->release(); } +::debug("Halt\n"); if($opt::halt_on_error) { wait_and_exit($Global::halt_on_error_exitstatus); } else { diff --git a/testsuite/tests-to-run/parallel-local114.sh b/testsuite/tests-to-run/parallel-local114.sh index a077fd94..e18863d8 100755 --- a/testsuite/tests-to-run/parallel-local114.sh +++ b/testsuite/tests-to-run/parallel-local114.sh @@ -1,7 +1,15 @@ #!/bin/bash cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -j0 -k -L1 -echo "bug #41609: --compress fails" +echo "### --pipe --line-buffer" + seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --tagstring {#} pv -qL 10 > /tmp/parallel_$$; + cat /tmp/parallel_$$ | wc; + diff <(sort /tmp/parallel_$$) /tmp/parallel_$$ >/dev/null ; echo These must diff: $? + +echo "### --pipe --line-buffer --compress (fails)" +# seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --compress --tagstring {#} pv -qL 10 | wc + +echo "### bug #41609: --compress fails" seq 12 | parallel --compress --compress-program bzip2 -k seq {} 1000000 | md5sum seq 12 | parallel --compress -k seq {} 1000000 | md5sum diff --git a/testsuite/wanted-results/parallel-local114 b/testsuite/wanted-results/parallel-local114 index 3e51f6f5..e8d4449a 100644 --- a/testsuite/wanted-results/parallel-local114 +++ b/testsuite/wanted-results/parallel-local114 @@ -1,4 +1,8 @@ -bug #41609: --compress fails +### --pipe --line-buffer + 200 400 1202 +These must diff: 1 +### --pipe --line-buffer --compress (fails) +### bug #41609: --compress fails 24812dd0f24a26d08a780f988b9d5ad2 - 24812dd0f24a26d08a780f988b9d5ad2 - ### Test -I