unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies
@ 2011-11-28 22:41 Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 1/4] test: fix test_require_external_prereq() Dmitry Kurochkin
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-11-28 22:41 UTC (permalink / raw)
  To: notmuch

Hello.

This is a series of trivial but important fixes for the recently added
binary dependencies.

Special thanks goes to Tomi Ollila who did review of the original
patches.

Regards,
  Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] test: fix test_require_external_prereq()
  2011-11-28 22:41 [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies Dmitry Kurochkin
@ 2011-11-28 22:41 ` Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 2/4] test: add missing escape backslash in test_declare_external_prereq() Dmitry Kurochkin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-11-28 22:41 UTC (permalink / raw)
  To: notmuch

test_missing_external_prereq_${binary}_ variable indicates that the
binary is missing.  It must be set in test_declare_external_prereq()
outside of the fake $binary() function.
---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 11e6646..d7282ff 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -554,8 +554,8 @@ test_declare_external_prereq () {
 	test "$#" = 2 && name=$2 || name="$binary(1)"
 
 	hash $binary 2>/dev/null || eval "
-$binary () {
 	test_missing_external_prereq_${binary}_=t
+$binary () {
 	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -e \" $name \" ||
 	test_subtest_missing_external_prereqs_=\"$test_subtest_missing_external_prereqs_ $name\"
 	false
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] test: add missing escape backslash in test_declare_external_prereq()
  2011-11-28 22:41 [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 1/4] test: fix test_require_external_prereq() Dmitry Kurochkin
@ 2011-11-28 22:41 ` Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 3/4] test: fix spurious output from missing external binaries functions Dmitry Kurochkin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-11-28 22:41 UTC (permalink / raw)
  To: notmuch

---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index d7282ff..9dcb2d2 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -557,7 +557,7 @@ test_declare_external_prereq () {
 	test_missing_external_prereq_${binary}_=t
 $binary () {
 	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -e \" $name \" ||
-	test_subtest_missing_external_prereqs_=\"$test_subtest_missing_external_prereqs_ $name\"
+	test_subtest_missing_external_prereqs_=\"\$test_subtest_missing_external_prereqs_ $name\"
 	false
 }"
 }
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] test: fix spurious output from missing external binaries functions
  2011-11-28 22:41 [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 1/4] test: fix test_require_external_prereq() Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 2/4] test: add missing escape backslash in test_declare_external_prereq() Dmitry Kurochkin
@ 2011-11-28 22:41 ` Dmitry Kurochkin
  2011-11-28 22:41 ` [PATCH 4/4] test: fix error messages for missing binary dependencies Dmitry Kurochkin
  2011-12-01  1:34 ` [PATCH 0/4] fix a bunch of bugs in recently added " David Bremner
  4 siblings, 0 replies; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-11-28 22:41 UTC (permalink / raw)
  To: notmuch

The grep(1) command used in the fake binary functions was missing the
quiet option.
---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 9dcb2d2..2861d88 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -556,7 +556,7 @@ test_declare_external_prereq () {
 	hash $binary 2>/dev/null || eval "
 	test_missing_external_prereq_${binary}_=t
 $binary () {
-	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -e \" $name \" ||
+	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -qe \" $name \" ||
 	test_subtest_missing_external_prereqs_=\"\$test_subtest_missing_external_prereqs_ $name\"
 	false
 }"
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] test: fix error messages for missing binary dependencies
  2011-11-28 22:41 [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies Dmitry Kurochkin
                   ` (2 preceding siblings ...)
  2011-11-28 22:41 ` [PATCH 3/4] test: fix spurious output from missing external binaries functions Dmitry Kurochkin
@ 2011-11-28 22:41 ` Dmitry Kurochkin
  2011-11-29 14:48   ` Tomi Ollila
  2011-12-01  1:34 ` [PATCH 0/4] fix a bunch of bugs in recently added " David Bremner
  4 siblings, 1 reply; 7+ messages in thread
From: Dmitry Kurochkin @ 2011-11-28 22:41 UTC (permalink / raw)
  To: notmuch

The fake missing binary functions check if the binary has already be
added to the diagnostic message to avoid duplicates.  Unfortunately,
this check was buggy because the message string does not have the
trailing space.
---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 2861d88..a975957 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -556,7 +556,7 @@ test_declare_external_prereq () {
 	hash $binary 2>/dev/null || eval "
 	test_missing_external_prereq_${binary}_=t
 $binary () {
-	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -qe \" $name \" ||
+	echo -n \"\$test_subtest_missing_external_prereqs_ \" | grep -qe \" $name \" ||
 	test_subtest_missing_external_prereqs_=\"\$test_subtest_missing_external_prereqs_ $name\"
 	false
 }"
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] test: fix error messages for missing binary dependencies
  2011-11-28 22:41 ` [PATCH 4/4] test: fix error messages for missing binary dependencies Dmitry Kurochkin
@ 2011-11-29 14:48   ` Tomi Ollila
  0 siblings, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2011-11-29 14:48 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch


LGTM


On Tue, 29 Nov 2011 02:41:07 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> The fake missing binary functions check if the binary has already be
> added to the diagnostic message to avoid duplicates.  Unfortunately,
> this check was buggy because the message string does not have the
> trailing space.
> ---
>  test/test-lib.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 2861d88..a975957 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -556,7 +556,7 @@ test_declare_external_prereq () {
>  	hash $binary 2>/dev/null || eval "
>  	test_missing_external_prereq_${binary}_=t
>  $binary () {
> -	echo -n \"\$test_subtest_missing_external_prereqs_\" | grep -qe \" $name \" ||
> +	echo -n \"\$test_subtest_missing_external_prereqs_ \" | grep -qe \" $name \" ||
>  	test_subtest_missing_external_prereqs_=\"\$test_subtest_missing_external_prereqs_ $name\"
>  	false
>  }"
> -- 
> 1.7.7.3
> 
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
> 

-- 
Tomi Ollila !! tomi.ollila@nixu.fi !! +358 400 888 366
Nixu Oy !! http://www.nixu.fi/ !! Keilaranta 15, FI-02150 Espoo, Finland

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies
  2011-11-28 22:41 [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies Dmitry Kurochkin
                   ` (3 preceding siblings ...)
  2011-11-28 22:41 ` [PATCH 4/4] test: fix error messages for missing binary dependencies Dmitry Kurochkin
@ 2011-12-01  1:34 ` David Bremner
  4 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2011-12-01  1:34 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

On Tue, 29 Nov 2011 02:41:03 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:

> This is a series of trivial but important fixes for the recently added
> binary dependencies.

Pushed, 

d

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-01  1:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-28 22:41 [PATCH 0/4] fix a bunch of bugs in recently added binary dependencies Dmitry Kurochkin
2011-11-28 22:41 ` [PATCH 1/4] test: fix test_require_external_prereq() Dmitry Kurochkin
2011-11-28 22:41 ` [PATCH 2/4] test: add missing escape backslash in test_declare_external_prereq() Dmitry Kurochkin
2011-11-28 22:41 ` [PATCH 3/4] test: fix spurious output from missing external binaries functions Dmitry Kurochkin
2011-11-28 22:41 ` [PATCH 4/4] test: fix error messages for missing binary dependencies Dmitry Kurochkin
2011-11-29 14:48   ` Tomi Ollila
2011-12-01  1:34 ` [PATCH 0/4] fix a bunch of bugs in recently added " David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).