From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wGEbLMSpemGJbQEAgWs5BA (envelope-from ) for ; Thu, 28 Oct 2021 15:46:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WEOwJ8SpemFLEAAAbx9fmQ (envelope-from ) for ; Thu, 28 Oct 2021 13:46:44 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3D8B131335 for ; Thu, 28 Oct 2021 15:46:44 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2BFE21F978; Thu, 28 Oct 2021 09:46:37 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id C77151F75D for ; Thu, 28 Oct 2021 09:46:33 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id E096A5FC42; Thu, 28 Oct 2021 09:46:32 -0400 (EDT) Received: (nullmailer pid 204945 invoked by uid 1000); Thu, 28 Oct 2021 13:46:31 -0000 From: David Bremner To: Tomi Ollila , David Bremner , notmuch@notmuchmail.org Subject: [PATCH v2 1/3] test: move system includes to notmuch-test.h Date: Thu, 28 Oct 2021 10:46:23 -0300 Message-Id: <20211028134625.204930-1-david@tethera.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: CCBAET3NOHANLTYPUFN7H3ANDXYIXHAV X-Message-ID-Hash: CCBAET3NOHANLTYPUFN7H3ANDXYIXHAV X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635428804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=Hc+lXkjHBP+vHOAcCBCavbIIg71IRGjWnV2Su1fuJN0=; b=XomuxaCDvmbGGi2MPJk0MSzuNEqw1ta1nNjweWGzH49CMafFXGbwhJrgD7m29hx2B46vfT Ip92myoYpHbhqR4157fjss6ZZGn8pIlSMGxBt2zthxRCiFqbhqpiz9Npw+XOUcNkUQ9yuS 0Vk9ps+5Bdsl+kRWzzZzUM6nRIOwD4dDcU5ZbW5HlC1p0UDixaV7sjDlBGxYNckWqLt0gZ 2JEo6edre0z0+7babcHRtidg3sV6/1Ei0rBQVsDXHWXFj1aha+j0PFzWsAFTAVQqSXo096 gdmm8svz9s6GnfW6Q1m30xlFxdpV8OcrQh6l9Dm6PZnvoUzR+EkLxM9fYYzP0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635428804; a=rsa-sha256; cv=none; b=HpkeWuOpZzGqFzYXvqPCuwcFm0d6Q/i5WqxUU2kkaYiMIoce6c8OTp5AmGj1+VY8pB4M9f rnJbSeQb5HoW4B1ZyYUpv/yvqK9vYZOl8AcqEcCu7FzNErofHNLdtzUQ4qw4GJpEEfpudY mQSm04QkDxOOeJfhqWzxL76Xxxs0Y5ncmNqfeEe9+utb6HX+56dcHHvYYAYbG0DByKneAQ OeRLMxbcjc9vxsL4OOfpoBrgZDILF/roc+6VC9Ki+ogQHnVyXfdtj5NxQPfpcz/P/ipAFR ETUZ/uFl62ECgGLbsFmfAE/TavAruYRiUPv3zgtIsZw0+/Myp3GxhabuyfHBOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.90 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3D8B131335 X-Spam-Score: -0.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: SBJNX6Fdm+F/ This removes some redudant includes, and will also make it easier to introduce "#define _GNU_SOURCE", which must come before all system includes. --- test/T562-lib-database.sh | 4 +--- test/T563-lib-directory.sh | 4 +--- test/T564-lib-query.sh | 4 +--- test/T566-lib-message.sh | 3 +-- test/T568-lib-thread.sh | 3 +-- test/T590-libconfig.sh | 4 ---- test/T595-reopen.sh | 2 -- test/T610-message-property.sh | 4 ---- test/T620-lock.sh | 3 --- test/T640-database-modified.sh | 5 +---- test/notmuch-test.h | 6 ++++++ 11 files changed, 12 insertions(+), 30 deletions(-) diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh index 769fe86e..d9f5d18e 100755 --- a/test/T562-lib-database.sh +++ b/test/T562-lib-database.sh @@ -9,10 +9,8 @@ test_begin_subtest "building database" test_expect_success "NOTMUCH_NEW" cat < c_head -#include -#include #include -#include + int main (int argc, char** argv) { notmuch_database_t *db; diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh index 28325ff2..ad390c1c 100755 --- a/test/T563-lib-directory.sh +++ b/test/T563-lib-directory.sh @@ -9,10 +9,8 @@ test_begin_subtest "building database" test_expect_success "NOTMUCH_NEW" cat < c_head -#include -#include #include -#include + int main (int argc, char** argv) { notmuch_database_t *db; diff --git a/test/T564-lib-query.sh b/test/T564-lib-query.sh index 50b0a88e..ff1d4984 100755 --- a/test/T564-lib-query.sh +++ b/test/T564-lib-query.sh @@ -9,10 +9,8 @@ test_begin_subtest "building database" test_expect_success "NOTMUCH_NEW" cat < c_head -#include -#include #include -#include + int main (int argc, char** argv) { notmuch_database_t *db; diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh index ee55ef29..8b61d182 100755 --- a/test/T566-lib-message.sh +++ b/test/T566-lib-message.sh @@ -19,9 +19,8 @@ cat <<'EOF' > c_tail EOF cat < c_head0 -#include -#include #include + int main (int argc, char** argv) { notmuch_database_t *db; diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh index 088e66dd..b45836cd 100755 --- a/test/T568-lib-thread.sh +++ b/test/T568-lib-thread.sh @@ -24,9 +24,8 @@ cat <<'EOF' > c_tail EOF cat < c_head -#include -#include #include + int main (int argc, char** argv) { notmuch_database_t *db; diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index a9566c13..0d890ca0 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -23,8 +23,6 @@ EOF } cat < c_head -#include -#include #include int main (int argc, char** argv) @@ -616,8 +614,6 @@ cp notmuch-config.bak notmuch-config test_expect_equal_file EXPECTED OUTPUT cat < c_head2 -#include -#include #include int main (int argc, char** argv) diff --git a/test/T595-reopen.sh b/test/T595-reopen.sh index 7375e2ac..1a517423 100755 --- a/test/T595-reopen.sh +++ b/test/T595-reopen.sh @@ -6,8 +6,6 @@ test_description="library reopen API" add_email_corpus cat < c_head -#include -#include #include int main (int argc, char** argv) diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh index d0e52f4a..4ec85474 100755 --- a/test/T610-message-property.sh +++ b/test/T610-message-property.sh @@ -6,10 +6,6 @@ test_description="message property API" add_email_corpus cat < c_head -#include -#include -#include -#include #include void print_properties (notmuch_message_t *message, const char *prefix, notmuch_bool_t exact) { diff --git a/test/T620-lock.sh b/test/T620-lock.sh index 7aaaff2a..8f4c380f 100755 --- a/test/T620-lock.sh +++ b/test/T620-lock.sh @@ -9,9 +9,6 @@ if [ $NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK -ne 1 ]; then test_subtest_known_broken fi test_C ${MAIL_DIR} <<'EOF' -#include -#include -#include #include void diff --git a/test/T640-database-modified.sh b/test/T640-database-modified.sh index 274105c7..636b20c7 100755 --- a/test/T640-database-modified.sh +++ b/test/T640-database-modified.sh @@ -10,11 +10,8 @@ test_begin_subtest "catching DatabaseModifiedError in _notmuch_message_ensure_me first_id=$(notmuch search --output=messages '*'| head -1 | sed s/^id://) test_C ${MAIL_DIR} < -#include #include -#include -#include + int main (int argc, char **argv) { diff --git a/test/notmuch-test.h b/test/notmuch-test.h index 34dbb8e0..3a0e90a3 100644 --- a/test/notmuch-test.h +++ b/test/notmuch-test.h @@ -1,7 +1,13 @@ #ifndef _NOTMUCH_TEST_H #define _NOTMUCH_TEST_H +#include #include #include +#include +#include +#include +#include + #include inline static void -- 2.33.0