[PATCH v2] test: leave T\d\d\d- in variable $this_test and introduce $this_test_bare
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 15 Jan 2014 19:02:03 +0000 (21:02 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:04 +0000 (09:59 -0800)
26/b7d714b170032206ca75e5022e1729334520c8 [new file with mode: 0644]

diff --git a/26/b7d714b170032206ca75e5022e1729334520c8 b/26/b7d714b170032206ca75e5022e1729334520c8
new file mode 100644 (file)
index 0000000..c615788
--- /dev/null
@@ -0,0 +1,98 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1C6BC431FBF\r
+       for <notmuch@notmuchmail.org>; Wed, 15 Jan 2014 11:02:18 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.312\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.312 tagged_above=-999 required=5\r
+       tests=[GAPPY_SUBJECT=1.312] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id pRWBg2MGJgb0 for <notmuch@notmuchmail.org>;\r
+       Wed, 15 Jan 2014 11:02:10 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id A5F90431FAF\r
+       for <notmuch@notmuchmail.org>; Wed, 15 Jan 2014 11:02:10 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 5CF961001E5; Wed, 15 Jan 2014 21:02:06 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2] test: leave T\d\d\d- in variable $this_test and introduce\r
+       $this_test_bare\r
+Date: Wed, 15 Jan 2014 21:02:03 +0200\r
+Message-Id: <1389812523-17278-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+In-Reply-To: <877ga2jdf6.fsf@zancas.localnet>\r
+References: <877ga2jdf6.fsf@zancas.localnet>\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 15 Jan 2014 19:02:18 -0000\r
+\r
+Script `notmuch-test` expects the results file have T\d\d\d- part\r
+intact so the results files (and some test output files) are now\r
+name as such.\r
+Without this change `notmuch-test` will exit in case the test\r
+script it was executing exited with nonzero value.\r
+\r
+The T\d\d\d- part is dropped in new variable $this_test_bare which is\r
+used in progress informational messages and when loading .el files in\r
+emacs tests (whenever $this_test_bare.el exists).\r
+---\r
+\r
+This is v2 of id:1389645491-7600-1-git-send-email-tomi.ollila@iki.fi\r
+\r
+Ignore id:1389812307-17065-1-git-send-email-tomi.ollila@iki.fi ,\r
+i sent wrong patch file :/.\r
+\r
+ test/test-lib.sh | 6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index 487075e..78af170 100644\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -27,7 +27,7 @@ shopt -u xpg_echo\r
\r
+ this_test=${0##*/}\r
+ this_test=${this_test%.sh}\r
+-this_test=${this_test#T[0-9][0-9][0-9]-}\r
++this_test_bare=${this_test#T[0-9][0-9][0-9]-}\r
\r
+ # if --tee was passed, write the output not only to the terminal, but\r
+ # additionally to the file test-results/$BASENAME.out, too.\r
+@@ -196,7 +196,7 @@ print_test_description ()\r
+ {\r
+       test -z "$test_description_printed" || return 0\r
+       echo\r
+-      echo $this_test: "Testing ${test_description}"\r
++      echo $this_test_bare: "Testing ${test_description}"\r
+       test_description_printed=1\r
+ }\r
+ if [ -z "$NOTMUCH_TEST_QUIET" ]\r
+@@ -1085,7 +1085,7 @@ test_emacs () {\r
+       test -z "$missing_dependencies" || return\r
\r
+       if [ -z "$EMACS_SERVER" ]; then\r
+-              emacs_tests="${this_test}.el"\r
++              emacs_tests="${this_test_bare}.el"\r
+               if [ -f "$TEST_DIRECTORY/$emacs_tests" ]; then\r
+                       load_emacs_tests="--eval '(load \"$emacs_tests\")'"\r
+               else\r
+-- \r
+1.8.4.2\r
+\r