From 81fba0ae8d356079c962994915ce9eda4a584c90 Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Sat, 10 Mar 2012 05:24:50 +0400 Subject: [PATCH] [PATCH v2 1/2] test: remove "Generate some messages" test from raw --- c6/532a97e39b78816ac59abb889a28f5171c092f | 99 +++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 c6/532a97e39b78816ac59abb889a28f5171c092f diff --git a/c6/532a97e39b78816ac59abb889a28f5171c092f b/c6/532a97e39b78816ac59abb889a28f5171c092f new file mode 100644 index 000000000..dee6edbc4 --- /dev/null +++ b/c6/532a97e39b78816ac59abb889a28f5171c092f @@ -0,0 +1,99 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id C46A1431FC3 + for ; Fri, 9 Mar 2012 17:26:32 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id zjD6JEPxNir5 for ; + Fri, 9 Mar 2012 17:26:32 -0800 (PST) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 232C6431FBC + for ; Fri, 9 Mar 2012 17:26:32 -0800 (PST) +Received: by bkwj4 with SMTP id j4so1791450bkw.26 + for ; Fri, 09 Mar 2012 17:26:30 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; + bh=hY3rBCqQooueK7mqUgA0UDlErn9H/dO2MM/yrDX4Sh4=; + b=IIt056a6wMuDtd53+DhqLuZfHy7DVefsqhmcDGlMqnmTx3a06NZgqWl44orKFZitXg + UyRA01f9MrmAs9thoMLJqkU8puPCHYji5aLX1AyqjZxp3tu4AtvfOYiFbFAh0voMeJ0S + KbZ5xHiX+rTOjyWJ/Ee63qBFvJ/zxDCvScw+2IOECm72rwForepfjRmuI4WvtR4ySk+1 + A58sUle51jBZspqyQTBRWNLFIG0UBqH1xOMk+iGh1/nmVfscWAV9xBdrtUOS/kwpFsSW + S2qKrtJbrKD47YkhvhvbiM4/iobWZkye9vwUxNki/rdEqNJKuBsfgqnL+y87W6nsmqLX + w+/w== +Received: by 10.204.156.12 with SMTP id u12mr1804622bkw.33.1331342790707; + Fri, 09 Mar 2012 17:26:30 -0800 (PST) +Received: from localhost ([91.144.186.21]) + by mx.google.com with ESMTPS id jw10sm137654bkb.10.2012.03.09.17.26.29 + (version=TLSv1/SSLv3 cipher=OTHER); + Fri, 09 Mar 2012 17:26:29 -0800 (PST) +From: Dmitry Kurochkin +To: notmuch@notmuchmail.org +Subject: [PATCH v2 1/2] test: remove "Generate some messages" test from raw +Date: Sat, 10 Mar 2012 05:24:50 +0400 +Message-Id: <1331342691-26899-2-git-send-email-dmitry.kurochkin@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1331342691-26899-1-git-send-email-dmitry.kurochkin@gmail.com> +References: <1327961195-4204-1-git-send-email-dmitry.kurochkin@gmail.com> + <1331342691-26899-1-git-send-email-dmitry.kurochkin@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 10 Mar 2012 01:26:32 -0000 + +Before the change, the first subtest in raw format tests just +generated messages and checked that they are added successfully. This +is not really a raw format test, it is creating of environment +required for other subtests to run. The patch removes the first +subtest from raw and replaces it with bare add_message calls, similar +to how it is done in other tests. + +TODO: we should check that test environment was created successfully. +Currently, many tests do add_message(), notmuch new and other calls +without checking the results. We should come up with a general +solution for this, i.e. if any command during test initialization +fails, all tests should be skipped with appropriate error message. +--- + test/raw | 7 ++----- + 1 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/test/raw b/test/raw +index 0171e64..de0b867 100755 +--- a/test/raw ++++ b/test/raw +@@ -3,11 +3,8 @@ + test_description='notmuch show --format=raw' + . ./test-lib.sh + +-test_begin_subtest "Generate some messages" +-generate_message +-generate_message +-output=$(NOTMUCH_NEW) +-test_expect_equal "$output" "Added 2 new messages to the database." ++add_message ++add_message + + test_begin_subtest "Attempt to show multiple raw messages" + output=$(notmuch show --format=raw "*" 2>&1) +-- +1.7.9.1 + -- 2.26.2