[PATCH] test: Make it easier to resolve conflicts when adding new tests
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 23 Jan 2011 11:12:24 +0000 (12:12 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:44 +0000 (09:37 -0800)
74/8df420840633290b4ea101b732f42e716908b8 [new file with mode: 0644]

diff --git a/74/8df420840633290b4ea101b732f42e716908b8 b/74/8df420840633290b4ea101b732f42e716908b8
new file mode 100644 (file)
index 0000000..bfe1c3c
--- /dev/null
@@ -0,0 +1,121 @@
+Return-Path: <sojkam1@fel.cvut.cz>\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 32286431FD0\r
+       for <notmuch@notmuchmail.org>; Sun, 23 Jan 2011 03:12:36 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 UzcD9rg9HM7p for <notmuch@notmuchmail.org>;\r
+       Sun, 23 Jan 2011 03:12:35 -0800 (PST)\r
+Received: from mail.loccal.net (gw.loccal.net [94.142.235.206])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4D7DD431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 23 Jan 2011 03:12:35 -0800 (PST)\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by mail.loccal.net (Postfix) with ESMTP id 05AAF1046D;\r
+       Sun, 23 Jan 2011 12:25:50 +0100 (CET)\r
+X-Virus-Scanned: amavisd-new at loccal.net\r
+Received: from mail.loccal.net ([127.0.0.1])\r
+       by localhost (mail.loccal.net [127.0.0.1]) (amavisd-new, port 10024)\r
+       with LMTP id 435znnV5-dLI; Sun, 23 Jan 2011 12:25:46 +0100 (CET)\r
+Received: from steelpick.2x.cz (unknown [10.21.129.4])\r
+       by mail.loccal.net (Postfix) with ESMTPS id 847151043A;\r
+       Sun, 23 Jan 2011 12:25:46 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.72)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1Pgxry-0005I4-7A; Sun, 23 Jan 2011 12:12:30 +0100\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test: Make it easier to resolve conflicts when adding new\r
+       tests\r
+Date: Sun, 23 Jan 2011 12:12:24 +0100\r
+Message-Id: <1295781144-20308-1-git-send-email-sojkam1@fel.cvut.cz>\r
+X-Mailer: git-send-email 1.7.2.3\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: Sun, 23 Jan 2011 11:12:36 -0000\r
+\r
+Currently, there are two places in the test framework that contain very\r
+long list on a single line. Whenever a test is added (or changed) in\r
+several branches and these branches are merged, it results in conflict\r
+which is hard to resolve because one has to go through the whole long\r
+line to find where the conflict is.\r
+\r
+This patch splits these long lists to several lines so that the\r
+conflicts are easier to resolve.\r
+---\r
+ test/basic        |    9 +++++++--\r
+ test/notmuch-test |   21 ++++++++++++++++++++-\r
+ 2 files changed, 27 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/basic b/test/basic\r
+index e1269e2..3b43ad9 100755\r
+--- a/test/basic\r
++++ b/test/basic\r
+@@ -51,8 +51,13 @@ test_expect_code 2 'failure to clean up causes the test to fail' '\r
\r
+ # Ensure that all tests are being run\r
+ test_begin_subtest 'Ensure that all available tests will be run by notmuch-test'\r
+-tests_in_suite=$(grep TESTS= ../notmuch-test | sed -e "s/TESTS=\"\(.*\)\"/\1/" | tr " " "\n" | sort)\r
+-available=$(ls -1 ../ | grep -v -E "^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test|README|test-lib.sh|test-results|tmp.*|valgrind|corpus*|emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|test.expected-output|.*~)" | sort)\r
++eval $(sed -n -e '/^TESTS="$/,/^"$/p' notmuch-test ../notmuch-test)\r
++tests_in_suite=$(for i in $TESTS; do echo $i; done | sort)\r
++available=$(ls -1 ../ | \\r
++    sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \\r
++         -e "/^(README|test-lib.sh|test-results|tmp.*|valgrind|corpus*)/d" \\r
++         -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose)/d" \\r
++         -e "/^(test.expected-output|.*~)/d" | sort)\r
+ test_expect_equal "$tests_in_suite" "$available"\r
\r
+ EXPECTED=../test.expected-output\r
+diff --git a/test/notmuch-test b/test/notmuch-test\r
+index fcf43a8..1e5ac11 100755\r
+--- a/test/notmuch-test\r
++++ b/test/notmuch-test\r
+@@ -16,7 +16,26 @@ fi\r
\r
+ cd $(dirname "$0")\r
\r
+-TESTS="basic new search search-output search-by-folder json thread-naming raw reply dump-restore uuencode thread-order author-order from-guessing long-id encoding emacs maildir-sync"\r
++TESTS="\r
++  basic\r
++  new\r
++  search\r
++  search-output\r
++  search-by-folder\r
++  json\r
++  thread-naming\r
++  raw\r
++  reply\r
++  dump-restore\r
++  uuencode\r
++  thread-order\r
++  author-order\r
++  from-guessing\r
++  long-id\r
++  encoding\r
++  emacs\r
++  maildir-sync\r
++"\r
\r
+ # Clean up any results from a previous run\r
+ rm -r test-results >/dev/null 2>/dev/null\r
+-- \r
+1.7.2.3\r
+\r