unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: copyright information updates
@ 2016-04-15 16:06 Tomi Ollila
  2016-05-02  0:49 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2016-04-15 16:06 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

Files in test directories had only copyright of a single individual,
of which code was adapted here as a base of the test system.
Since then many Notmuch Developers have contributed to the test
system, which is now acknowledged with a constant string in some
of the test files.

The README file in test directory instructed new files contain a
copyright notice, but that has never been done (and it is also not
needed). To simplify things a bit (and lessen confusion) this
instruction is now removed.

As a side enchangement, all of the 3 entries in the whole source
tree cd'ing to `dirname` of "$0" now uses syntax cd "$(dirname "$0")".
This makes these particular lines work when current working directory
is e.g. /c/Program Files/notmuch/test/.
(Probably it would fail elsewhere, though.)
---
 performance-test/notmuch-memory-test | 3 ++-
 performance-test/notmuch-time-test   | 3 ++-
 test/README                          | 6 +-----
 test/notmuch-test                    | 3 ++-
 test/test-lib-common.sh              | 1 +
 test/test-lib.sh                     | 1 +
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/performance-test/notmuch-memory-test b/performance-test/notmuch-memory-test
index 3cf28c7..2db25ef 100755
--- a/performance-test/notmuch-memory-test
+++ b/performance-test/notmuch-memory-test
@@ -3,6 +3,7 @@
 # Run tests
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010-today Notmuch Developers
 #
 # Adapted from a Makefile to a shell script by Carl Worth (2010)
 
@@ -14,7 +15,7 @@ if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
     exit 1
 fi
 
-cd $(dirname "$0")
+cd "$(dirname "$0")"
 
 for test in M*.sh; do
     ./"$test" "$@"
diff --git a/performance-test/notmuch-time-test b/performance-test/notmuch-time-test
index 7113efb..262b5f9 100755
--- a/performance-test/notmuch-time-test
+++ b/performance-test/notmuch-time-test
@@ -3,6 +3,7 @@
 # Run tests
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010-today Notmuch Developers
 #
 # Adapted from a Makefile to a shell script by Carl Worth (2010)
 
@@ -14,7 +15,7 @@ if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
     exit 1
 fi
 
-cd $(dirname "$0")
+cd "$(dirname "$0")"
 
 for test in T*.sh; do
     ./"$test" "$@"
diff --git a/test/README b/test/README
index bd9ab54..104a120 100644
--- a/test/README
+++ b/test/README
@@ -145,13 +145,9 @@ Tddd-testname.sh where 'ddd' is three digits and 'testname' the "bare"
 name of your test. Tests will be run in order the 'ddd' part determines.
 
 The test script should start with the standard "#!/usr/bin/env bash"
-with copyright notices, and an assignment to variable 'test_description',
-like this:
+and an assignment to variable 'test_description', like this:
 
 	#!/usr/bin/env bash
-	#
-	# Copyright (c) 2005 Junio C Hamano
-	#
 
 	test_description='xxx test (option --frotz)
 
diff --git a/test/notmuch-test b/test/notmuch-test
index b843712..967d61c 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -3,6 +3,7 @@
 # Run tests
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010-today Notmuch Developers
 #
 # Adapted from a Makefile to a shell script by Carl Worth (2010)
 
@@ -14,7 +15,7 @@ if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
     exit 1
 fi
 
-cd $(dirname "$0")
+cd "$(dirname "$0")"
 
 TESTS=${NOTMUCH_TESTS:-`echo T[0-9][0-9][0-9]-*.sh`}
 
diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
index 4e17b78..15ebfb5 100644
--- a/test/test-lib-common.sh
+++ b/test/test-lib-common.sh
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010-today Notmuch Developers
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 17e46f8..491db1f 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010-today Notmuch Developers
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-- 
1.9.3

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

* Re: [PATCH] test: copyright information updates
  2016-04-15 16:06 Tomi Ollila
@ 2016-05-02  0:49 ` David Bremner
  2016-05-02  4:07   ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2016-05-02  0:49 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:

>  # Copyright (c) 2005 Junio C Hamano
> +# Copyright (c) 2010-today Notmuch Developers

I don't what to think about this. The convention I am familiar with
for date ranges is roughly that documented here:

    https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html

The tl;dr is that the years or ranges document the last significant
change.

On the other hand, I'd say most notmuch code has the copyright date
it is created, and that is never changed.

So I'd say go with creation date, or some actual date ranges that we
will probably forget to update.

OK, I agree it's nit picky. But it's a nit picky patch ;).

d

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

* Re: [PATCH] test: copyright information updates
  2016-05-02  0:49 ` David Bremner
@ 2016-05-02  4:07   ` Tomi Ollila
  0 siblings, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2016-05-02  4:07 UTC (permalink / raw)
  To: David Bremner, notmuch

On Mon, May 02 2016, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>>  # Copyright (c) 2005 Junio C Hamano
>> +# Copyright (c) 2010-today Notmuch Developers
>
> I don't what to think about this. The convention I am familiar with
> for date ranges is roughly that documented here:
>
>     https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
>
> The tl;dr is that the years or ranges document the last significant
> change.
>
> On the other hand, I'd say most notmuch code has the copyright date
> it is created, and that is never changed.
>
> So I'd say go with creation date, or some actual date ranges that we
> will probably forget to update.
>
> OK, I agree it's nit picky. But it's a nit picky patch ;).

You're absolutely right in all of your comments. I've not thought this
through well enough -- but better not take too much agony out of that ;)

First quick thought would just be s/-today// but let's see...

Thanks for the review.

>
> d

Tomi

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

* [PATCH] test: copyright information updates
@ 2016-05-06 15:41 Tomi Ollila
  2016-05-19 11:07 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2016-05-06 15:41 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

Files in test directories had only copyright of a single individual,
of which code was adapted here as a base of the test system.
Since then many Notmuch Developers have contributed to the test
system, which is now acknowledged with a constant string in some
of the test files.

The README file in test directory instructed new files contain a
copyright notice, but that has never been done (and it is also not
needed). To simplify things a bit (and lessen confusion) this
instruction is now removed.

As a side enchangement, all of the 3 entries in the whole source
tree cd'ing to `dirname` of "$0" now uses syntax cd "$(dirname "$0")".
This makes these particular lines work when current working directory
is e.g. /c/Program Files/notmuch/test/.
(Probably it would fail elsewhere, though.)
---

v2 of id:1460736374-10238-1-git-send-email-tomi.ollila@iki.fi
effectively
(GNU) sed -i s/-today// 0001-test-copyright-information-updates.patch

 performance-test/notmuch-memory-test | 3 ++-
 performance-test/notmuch-time-test   | 3 ++-
 test/README                          | 6 +-----
 test/notmuch-test                    | 3 ++-
 test/test-lib-common.sh              | 1 +
 test/test-lib.sh                     | 1 +
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/performance-test/notmuch-memory-test b/performance-test/notmuch-memory-test
index 3cf28c7..2db25ef 100755
--- a/performance-test/notmuch-memory-test
+++ b/performance-test/notmuch-memory-test
@@ -3,6 +3,7 @@
 # Run tests
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010 Notmuch Developers
 #
 # Adapted from a Makefile to a shell script by Carl Worth (2010)
 
@@ -14,7 +15,7 @@ if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
     exit 1
 fi
 
-cd $(dirname "$0")
+cd "$(dirname "$0")"
 
 for test in M*.sh; do
     ./"$test" "$@"
diff --git a/performance-test/notmuch-time-test b/performance-test/notmuch-time-test
index 7113efb..262b5f9 100755
--- a/performance-test/notmuch-time-test
+++ b/performance-test/notmuch-time-test
@@ -3,6 +3,7 @@
 # Run tests
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010 Notmuch Developers
 #
 # Adapted from a Makefile to a shell script by Carl Worth (2010)
 
@@ -14,7 +15,7 @@ if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
     exit 1
 fi
 
-cd $(dirname "$0")
+cd "$(dirname "$0")"
 
 for test in T*.sh; do
     ./"$test" "$@"
diff --git a/test/README b/test/README
index bd9ab54..104a120 100644
--- a/test/README
+++ b/test/README
@@ -145,13 +145,9 @@ Tddd-testname.sh where 'ddd' is three digits and 'testname' the "bare"
 name of your test. Tests will be run in order the 'ddd' part determines.
 
 The test script should start with the standard "#!/usr/bin/env bash"
-with copyright notices, and an assignment to variable 'test_description',
-like this:
+and an assignment to variable 'test_description', like this:
 
 	#!/usr/bin/env bash
-	#
-	# Copyright (c) 2005 Junio C Hamano
-	#
 
 	test_description='xxx test (option --frotz)
 
diff --git a/test/notmuch-test b/test/notmuch-test
index b843712..967d61c 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -3,6 +3,7 @@
 # Run tests
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010 Notmuch Developers
 #
 # Adapted from a Makefile to a shell script by Carl Worth (2010)
 
@@ -14,7 +15,7 @@ if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
     exit 1
 fi
 
-cd $(dirname "$0")
+cd "$(dirname "$0")"
 
 TESTS=${NOTMUCH_TESTS:-`echo T[0-9][0-9][0-9]-*.sh`}
 
diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
index 4e17b78..15ebfb5 100644
--- a/test/test-lib-common.sh
+++ b/test/test-lib-common.sh
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010 Notmuch Developers
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 17e46f8..491db1f 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2005 Junio C Hamano
+# Copyright (c) 2010 Notmuch Developers
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-- 
1.9.3

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

* Re: [PATCH] test: copyright information updates
  2016-05-06 15:41 [PATCH] test: copyright information updates Tomi Ollila
@ 2016-05-19 11:07 ` David Bremner
  0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2016-05-19 11:07 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> As a side enchangement, all of the 3 entries in the whole source
> tree cd'ing to `dirname` of "$0" now uses syntax cd "$(dirname "$0")".
> This makes these particular lines work when current working directory
> is e.g. /c/Program Files/notmuch/test/.
> (Probably it would fail elsewhere, though.)

pushed, with some grumbling about the patch combining

d

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

end of thread, other threads:[~2016-05-19 11:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 15:41 [PATCH] test: copyright information updates Tomi Ollila
2016-05-19 11:07 ` David Bremner
  -- strict thread matches above, loose matches on Subject: below --
2016-04-15 16:06 Tomi Ollila
2016-05-02  0:49 ` David Bremner
2016-05-02  4:07   ` Tomi Ollila

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).