unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: auto load elisp tests file in test_emacs if available
@ 2012-01-29  3:36 Dmitry Kurochkin
  2012-01-29  3:36 ` [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning Dmitry Kurochkin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dmitry Kurochkin @ 2012-01-29  3:36 UTC (permalink / raw)
  To: notmuch

This allows us to simplify shell part of tests written in elisp.
---
 test/test-lib.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 8158328..0174e93 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -943,6 +943,12 @@ test_emacs () {
 	test -z "$missing_dependencies" || return
 
 	if [ -z "$EMACS_SERVER" ]; then
+		emacs_tests="$(basename $0).el"
+		if [ -f "$TEST_DIRECTORY/$emacs_tests" ]; then
+			load_emacs_tests="--eval '(load \"$emacs_tests\")'"
+		else
+			load_emacs_tests=
+		fi
 		server_name="notmuch-test-suite-$$"
 		# start a detached session with an emacs server
 		# user's TERM is given to dtach which assumes a minimally
@@ -950,6 +956,7 @@ test_emacs () {
 		TERM=$ORIGINAL_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \
 			sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \
 				--no-window-system \
+				$load_emacs_tests \
 				--eval '(setq server-name \"$server_name\")' \
 				--eval '(server-start)' \
 				--eval '(orphan-watchdog $$)'" || return
-- 
1.7.8.3

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

* [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning
  2012-01-29  3:36 [PATCH 1/2] test: auto load elisp tests file in test_emacs if available Dmitry Kurochkin
@ 2012-01-29  3:36 ` Dmitry Kurochkin
  2012-01-30  9:25   ` David Edmondson
  2012-01-30  9:25 ` [PATCH 1/2] test: auto load elisp tests file in test_emacs if available David Edmondson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Dmitry Kurochkin @ 2012-01-29  3:36 UTC (permalink / raw)
  To: notmuch

It is no longer needed, since elisp tests files are auto loaded now.
---
 test/emacs-address-cleaning |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/test/emacs-address-cleaning b/test/emacs-address-cleaning
index 51018fe..6ddde5c 100755
--- a/test/emacs-address-cleaning
+++ b/test/emacs-address-cleaning
@@ -4,15 +4,12 @@ test_description="emacs address cleaning"
 . test-lib.sh
 
 test_begin_subtest "notmuch-test-address-clean part 1"
-test_emacs_expect_t \
-    '(load "emacs-address-cleaning.el") (notmuch-test-address-cleaning-1)'
+test_emacs_expect_t '(notmuch-test-address-cleaning-1)'
 
 test_begin_subtest "notmuch-test-address-clean part 2"
-test_emacs_expect_t \
-    '(load "emacs-address-cleaning.el") (notmuch-test-address-cleaning-2)'
+test_emacs_expect_t '(notmuch-test-address-cleaning-2)'
 
 test_begin_subtest "notmuch-test-address-clean part 3"
-test_emacs_expect_t \
-    '(load "emacs-address-cleaning.el") (notmuch-test-address-cleaning-3)'
+test_emacs_expect_t '(notmuch-test-address-cleaning-3)'
 
 test_done
-- 
1.7.8.3

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

* Re: [PATCH 1/2] test: auto load elisp tests file in test_emacs if available
  2012-01-29  3:36 [PATCH 1/2] test: auto load elisp tests file in test_emacs if available Dmitry Kurochkin
  2012-01-29  3:36 ` [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning Dmitry Kurochkin
@ 2012-01-30  9:25 ` David Edmondson
  2012-02-05  7:08 ` Dmitry Kurochkin
  2012-02-12 17:32 ` David Bremner
  3 siblings, 0 replies; 6+ messages in thread
From: David Edmondson @ 2012-01-30  9:25 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

[-- Attachment #1: Type: text/plain, Size: 15 bytes --]

Nice idea, +1.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning
  2012-01-29  3:36 ` [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning Dmitry Kurochkin
@ 2012-01-30  9:25   ` David Edmondson
  0 siblings, 0 replies; 6+ messages in thread
From: David Edmondson @ 2012-01-30  9:25 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

[-- Attachment #1: Type: text/plain, Size: 20 bytes --]

Obviously good, +1.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH 1/2] test: auto load elisp tests file in test_emacs if available
  2012-01-29  3:36 [PATCH 1/2] test: auto load elisp tests file in test_emacs if available Dmitry Kurochkin
  2012-01-29  3:36 ` [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning Dmitry Kurochkin
  2012-01-30  9:25 ` [PATCH 1/2] test: auto load elisp tests file in test_emacs if available David Edmondson
@ 2012-02-05  7:08 ` Dmitry Kurochkin
  2012-02-12 17:32 ` David Bremner
  3 siblings, 0 replies; 6+ messages in thread
From: Dmitry Kurochkin @ 2012-02-05  7:08 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Hi David.

I think this is a pretty simple change.  And there is one +1 for it.  So
I am going to remove the needs-review tag, please add it back if you
disagree.

Regards,
  Dmitry

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

* Re: [PATCH 1/2] test: auto load elisp tests file in test_emacs if available
  2012-01-29  3:36 [PATCH 1/2] test: auto load elisp tests file in test_emacs if available Dmitry Kurochkin
                   ` (2 preceding siblings ...)
  2012-02-05  7:08 ` Dmitry Kurochkin
@ 2012-02-12 17:32 ` David Bremner
  3 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2012-02-12 17:32 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

On Sun, 29 Jan 2012 07:36:02 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> This allows us to simplify shell part of tests written in elisp.

Pushed.

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

end of thread, other threads:[~2012-02-12 17:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29  3:36 [PATCH 1/2] test: auto load elisp tests file in test_emacs if available Dmitry Kurochkin
2012-01-29  3:36 ` [PATCH 2/2] test: remove explicit loading of elisp tests in emacs-address-cleaning Dmitry Kurochkin
2012-01-30  9:25   ` David Edmondson
2012-01-30  9:25 ` [PATCH 1/2] test: auto load elisp tests file in test_emacs if available David Edmondson
2012-02-05  7:08 ` Dmitry Kurochkin
2012-02-12 17:32 ` 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).