From patchwork Sun Sep 9 17:36:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10593377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 312A0112B for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13BBD28A80 for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0822B29037; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9088E28B1E for ; Sun, 9 Sep 2018 17:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbeIIW1C (ORCPT ); Sun, 9 Sep 2018 18:27:02 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]:38946 "EHLO mail-lj1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbeIIW1C (ORCPT ); Sun, 9 Sep 2018 18:27:02 -0400 Received: by mail-lj1-f172.google.com with SMTP id l15-v6so15947085lji.6 for ; Sun, 09 Sep 2018 10:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mVHGx1JTpVXa0ds892+8PxBxOtAYrM8hBhiMYaYArBQ=; b=GOIN2McXUEStqJxwKSHeSDYX/g7LVhUGRXKe1vwQDJtGl+3tXWl7tKbFaceZTfA/dD u8IyFjoylM35tEg0TbvYjB4tFkbooKIWfFJiLSdfgK3QtLyAHFCuDNZ7oAkKQINZL47O eMVQx2mpv96I1AYo1Dq7VPsuZahzo78f3EhfYJevwC3VtZBKA3G0sNHqiiO/kDBwcdaX SDtNkOIQzooULHK9+QACSGV9ubrP880OIuDY0zgNc7x11vPfHy6lKkmHzKqytzlc+d4s Qc2NCRIXBdN0G9sCKYejUbZFmVM6YfcHPzoaffWDxbC7lXz1PlT9DlIaUvXs7Wg1j3C7 KxzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mVHGx1JTpVXa0ds892+8PxBxOtAYrM8hBhiMYaYArBQ=; b=g38wX2ajlOXUdLha4mks+Ig6UZN1KMr73NinKovHxrY6qdZMM+rvw8UxbiwMMOa++6 MWEslRgCYSq5+2gg2Tf6kmyDyE37A64fqJYRsf/8Rt1T0LY6NAfJFJqOsbcvfDRKR+yE KARbeSt3z6TJ2oJIcUgp5/ly8BzOnStoAU5MfFJxgqV2j3xJFpanFjqCBu2MFZwkvO5q ECh4kdDfmDwxyxUABvaVrh7cX/SdTC2mdP5ahaUUNtShoJpEbkkUboQ9X386qLoN5xCM zcJWTzD+8IrdnPfT8gF2CUBSIqY4ySJxMXg+Ms1GGJ0ARNxOZaM4ZWEwHCE59VfVcDR7 L5SQ== X-Gm-Message-State: APzg51Cj+mYvFBqOD8fDXqZT5mqYqa6KB5SzihpNMsFBFgTSkjMGkud5 W3hZ3mLFsTvZaIKh2jzctKVxsamU X-Google-Smtp-Source: ANB0VdaV4vRvS28SYi/FthsSJKZk6IB2mJLxY3cMkLlgRzuDPoZZYzvGX79EbBb1UQ9FfAHNLRoUcQ== X-Received: by 2002:a2e:9243:: with SMTP id v3-v6mr9867681ljg.92.1536514597999; Sun, 09 Sep 2018 10:36:37 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id u19-v6sm2317793lje.51.2018.09.09.10.36.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 10:36:37 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH 1/6] t/helper: keep test-tool command list sorted Date: Sun, 9 Sep 2018 19:36:26 +0200 Message-Id: <20180909173631.1446-2-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180909173631.1446-1-pclouds@gmail.com> References: <20180909173631.1446-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-tool.c | 2 +- t/helper/test-tool.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5a969f5830..1208584fa1 100644 --- a/Makefile +++ b/Makefile @@ -729,8 +729,8 @@ TEST_BUILTINS_OBJS += test-repository.o TEST_BUILTINS_OBJS += test-revision-walking.o TEST_BUILTINS_OBJS += test-run-command.o TEST_BUILTINS_OBJS += test-scrap-cache-tree.o -TEST_BUILTINS_OBJS += test-sha1-array.o TEST_BUILTINS_OBJS += test-sha1.o +TEST_BUILTINS_OBJS += test-sha1-array.o TEST_BUILTINS_OBJS += test-sigchain.o TEST_BUILTINS_OBJS += test-strcmp-offset.o TEST_BUILTINS_OBJS += test-string-list.o diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index 0edafcfd65..79e03eecb5 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -34,8 +34,8 @@ static struct test_cmd cmds[] = { { "revision-walking", cmd__revision_walking }, { "run-command", cmd__run_command }, { "scrap-cache-tree", cmd__scrap_cache_tree }, - { "sha1-array", cmd__sha1_array }, { "sha1", cmd__sha1 }, + { "sha1-array", cmd__sha1_array }, { "sigchain", cmd__sigchain }, { "strcmp-offset", cmd__strcmp_offset }, { "string-list", cmd__string_list }, diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index e954e8c522..4b7212827a 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -30,8 +30,8 @@ int cmd__repository(int argc, const char **argv); int cmd__revision_walking(int argc, const char **argv); int cmd__run_command(int argc, const char **argv); int cmd__scrap_cache_tree(int argc, const char **argv); -int cmd__sha1_array(int argc, const char **argv); int cmd__sha1(int argc, const char **argv); +int cmd__sha1_array(int argc, const char **argv); int cmd__sigchain(int argc, const char **argv); int cmd__strcmp_offset(int argc, const char **argv); int cmd__string_list(int argc, const char **argv); From patchwork Sun Sep 9 17:36:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10593379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B38F23E9D for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99FD328BBC for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ECB8291CD; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0E8C28BBC for ; Sun, 9 Sep 2018 17:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726710AbeIIW1E (ORCPT ); Sun, 9 Sep 2018 18:27:04 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42655 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbeIIW1D (ORCPT ); Sun, 9 Sep 2018 18:27:03 -0400 Received: by mail-lf1-f67.google.com with SMTP id z11-v6so15630805lff.9 for ; Sun, 09 Sep 2018 10:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MMiWs7niUsz9wqiIH675JT4TbW7ELu/v+RLxLzOQCoM=; b=Hk3tnbjKc7RkzakUNPP4XL7nIpzQ9gGLxk8sNhIZxa5SGOUOUxEx7q8MRflZkVYEG6 gUIbgv3pxg3I7aP51Zt3X7GCtgvNua0TGHf9LbfWkJEVP4fQf5xTBAFhzbyJokr60d/P UHrID13VIeQr1kiexb+iLpOzJvV75dFpb0iBwxzDCrw+pWUtJIl8M4nimGJE1UerCSHD wnmuEGtTdUzteSXFxIcf4ouGbhKno5kcRcnkrSaaWOG4sFcHokKmmnFuxiDDaTxwDazg 3RkyBHX4CId4rRIs2rLi3rsbjxwj5F0XRLwJ5K1jJ7obbqV/i8+lPQtBC2PLQpZcflff NEYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MMiWs7niUsz9wqiIH675JT4TbW7ELu/v+RLxLzOQCoM=; b=QfHBP/g2ucg2zT/wnwmMixGblosfmjn5DJbs20x+KM365qCOAqwZ2JRqvjwpydIrBQ BxET8hwcGZpRg6gR0NC1Y5gh5HrOH0mFkCAUNElfYwLiKDLBQ7N7qE5eWouTp6pvFwJJ QTaIuOi5eDAvgRyDkcN3H+Lpm2NRtvOJmPpNOLxMSuU3t43UM4dHxyNeXIiu3Nk5sz5Z zg4qbzJ9beu5TMa+3BMLEbT0lpjadOvOYz0s5rlU/rmYaUKy6a4+mGJqKkgwKZG2ErGs 9KuhSR2epuDyK4MWvObFWGpsEU6VvTmxAasueuyDoHU8CNiqVhbk6HINkdkZMFeF33O5 p8zg== X-Gm-Message-State: APzg51Bk0HCnRD5z9XR8deJnUWzmimZKGo8wUvbYL9rMPgm0mrGyShHb MY9ArGSOzVHmUZyaEEqNR2+rWwgn X-Google-Smtp-Source: ANB0Vda51rsh1NdCOjHRwezWoSC3XDR/I7hRB46dUSX0JCSs1KsWLI6GgXlS39Vurw1LrrQMwnTgMg== X-Received: by 2002:a19:124d:: with SMTP id h74-v6mr10158107lfi.107.1536514598962; Sun, 09 Sep 2018 10:36:38 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id u19-v6sm2317793lje.51.2018.09.09.10.36.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 10:36:38 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH 2/6] t/helper: merge test-dump-untracked-cache into test-tool Date: Sun, 9 Sep 2018 19:36:27 +0200 Message-Id: <20180909173631.1446-3-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180909173631.1446-1-pclouds@gmail.com> References: <20180909173631.1446-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-dump-untracked-cache.c | 3 +- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t7063-status-untracked-cache.sh | 68 ++++++++++++++-------------- t/t7519-status-fsmonitor.sh | 4 +- 6 files changed, 41 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index 1208584fa1..fa67d76780 100644 --- a/Makefile +++ b/Makefile @@ -710,6 +710,7 @@ TEST_BUILTINS_OBJS += test-delta.o TEST_BUILTINS_OBJS += test-drop-caches.o TEST_BUILTINS_OBJS += test-dump-cache-tree.o TEST_BUILTINS_OBJS += test-dump-split-index.o +TEST_BUILTINS_OBJS += test-dump-untracked-cache.o TEST_BUILTINS_OBJS += test-example-decorate.o TEST_BUILTINS_OBJS += test-genrandom.o TEST_BUILTINS_OBJS += test-hashmap.o @@ -741,7 +742,6 @@ TEST_BUILTINS_OBJS += test-wildmatch.o TEST_BUILTINS_OBJS += test-write-cache.o TEST_PROGRAMS_NEED_X += test-dump-fsmonitor -TEST_PROGRAMS_NEED_X += test-dump-untracked-cache TEST_PROGRAMS_NEED_X += test-fake-ssh TEST_PROGRAMS_NEED_X += test-line-buffer TEST_PROGRAMS_NEED_X += test-parse-options diff --git a/t/helper/test-dump-untracked-cache.c b/t/helper/test-dump-untracked-cache.c index bd92fb305a..52870ebbb3 100644 --- a/t/helper/test-dump-untracked-cache.c +++ b/t/helper/test-dump-untracked-cache.c @@ -1,3 +1,4 @@ +#include "test-tool.h" #include "cache.h" #include "dir.h" @@ -38,7 +39,7 @@ static void dump(struct untracked_cache_dir *ucd, struct strbuf *base) strbuf_setlen(base, len); } -int cmd_main(int ac, const char **av) +int cmd__dump_untracked_cache(int ac, const char **av) { struct untracked_cache *uc; struct strbuf base = STRBUF_INIT; diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index 79e03eecb5..820335704a 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -15,6 +15,7 @@ static struct test_cmd cmds[] = { { "drop-caches", cmd__drop_caches }, { "dump-cache-tree", cmd__dump_cache_tree }, { "dump-split-index", cmd__dump_split_index }, + { "dump-untracked-cache", cmd__dump_untracked_cache }, { "example-decorate", cmd__example_decorate }, { "genrandom", cmd__genrandom }, { "hashmap", cmd__hashmap }, diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index 4b7212827a..118c700c7a 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -11,6 +11,7 @@ int cmd__delta(int argc, const char **argv); int cmd__drop_caches(int argc, const char **argv); int cmd__dump_cache_tree(int argc, const char **argv); int cmd__dump_split_index(int argc, const char **argv); +int cmd__dump_untracked_cache(int argc, const char **argv); int cmd__example_decorate(int argc, const char **argv); int cmd__genrandom(int argc, const char **argv); int cmd__hashmap(int argc, const char **argv); diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh index 2da57fce7b..190ae149cf 100755 --- a/t/t7063-status-untracked-cache.sh +++ b/t/t7063-status-untracked-cache.sh @@ -55,7 +55,7 @@ test_expect_success 'setup' ' ' test_expect_success 'untracked cache is empty' ' - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && cat >../expect-empty <../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../dump.expect ../actual ' @@ -126,7 +126,7 @@ EOF ' test_expect_success 'untracked cache after second status' ' - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../dump.expect ../actual ' @@ -157,7 +157,7 @@ EOF ' test_expect_success 'verify untracked cache dump' ' - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect <../actual && + test-tool dump-untracked-cache >../actual && cat >../expect-from-test-dump <../actual && + test-tool dump-untracked-cache >../actual && echo "no untracked cache" >../expect-no-uc && test_cmp ../expect-no-uc ../actual ' test_expect_success 'git status does not change anything' ' git status && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-no-uc ../actual ' test_expect_success 'setting core.untrackedCache to true and using git status creates the cache' ' git config core.untrackedCache true && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-no-uc ../actual && git status && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-from-test-dump ../actual ' test_expect_success 'using --no-untracked-cache does not fail when core.untrackedCache is true' ' git update-index --no-untracked-cache && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-no-uc ../actual && git update-index --untracked-cache && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-empty ../actual ' test_expect_success 'setting core.untrackedCache to false and using git status removes the cache' ' git config core.untrackedCache false && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-empty ../actual && git status && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-no-uc ../actual ' test_expect_success 'using --untracked-cache does not fail when core.untrackedCache is false' ' git update-index --untracked-cache && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-empty ../actual ' test_expect_success 'setting core.untrackedCache to keep' ' git config core.untrackedCache keep && git update-index --untracked-cache && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-empty ../actual && git status && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-from-test-dump ../actual && git update-index --no-untracked-cache && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-no-uc ../actual && git update-index --force-untracked-cache && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-empty ../actual && git status && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && test_cmp ../expect-from-test-dump ../actual ' @@ -671,23 +671,23 @@ test_expect_success 'test ident field is working' ' test_expect_success 'untracked cache survives a checkout' ' git commit --allow-empty -m empty && - test-dump-untracked-cache >../before && + test-tool dump-untracked-cache >../before && test_when_finished "git checkout master" && git checkout -b other_branch && - test-dump-untracked-cache >../after && + test-tool dump-untracked-cache >../after && test_cmp ../before ../after && test_commit test && - test-dump-untracked-cache >../before && + test-tool dump-untracked-cache >../before && git checkout master && - test-dump-untracked-cache >../after && + test-tool dump-untracked-cache >../after && test_cmp ../before ../after ' test_expect_success 'untracked cache survives a commit' ' - test-dump-untracked-cache >../before && + test-tool dump-untracked-cache >../before && git add done/two && git commit -m commit && - test-dump-untracked-cache >../after && + test-tool dump-untracked-cache >../after && test_cmp ../before ../after ' @@ -751,7 +751,7 @@ test_expect_success '"status" after file replacement should be clean with UC=tru git checkout master && avoid_racy && status_is_clean && - test-dump-untracked-cache >../actual && + test-tool dump-untracked-cache >../actual && grep -F "recurse valid" ../actual >../actual.grep && cat >../expect.grep <../before + test-tool dump-untracked-cache >../before ) && cat >>dot-git/.git/hooks/fsmonitor-test <<-\EOF && printf ".git\0" @@ -345,7 +345,7 @@ test_expect_success UNTRACKED_CACHE 'ignore .git changes when invalidating UNTR' cd dot-git && GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace-after" \ git status && - test-dump-untracked-cache >../after + test-tool dump-untracked-cache >../after ) && grep "directory invalidation" trace-before >>before && grep "directory invalidation" trace-after >>after && From patchwork Sun Sep 9 17:36:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10593385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C211B112B for ; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7F6028A80 for ; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C3F128BBC; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB057291B6 for ; Sun, 9 Sep 2018 17:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726748AbeIIW1G (ORCPT ); Sun, 9 Sep 2018 18:27:06 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:32796 "EHLO mail-lf1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbeIIW1F (ORCPT ); Sun, 9 Sep 2018 18:27:05 -0400 Received: by mail-lf1-f49.google.com with SMTP id m26-v6so15665301lfb.0 for ; Sun, 09 Sep 2018 10:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZQB0taE16QpLEoO5Yr6fIeRXzSzGnikChpyQhF4iqxA=; b=I9jVVzmXJYWZbSHgSaYcSOjrrm0CXr4OXGlL0Ss3JuDBseQS6w84p2OjWAn5F04JzG z6naijP4PBDgSWEmIndsRTZNRNU+XcvByE2MNWn6Q/Xqd1nF2qDLTpWbO1+fz933KSN1 +uuGNlSS0OSVApXHe/09TAhG8KNdHDqWIxLD6A755X9u0zfeELSBH7FZPsJUrx0c2D/A Llwzg9aKB0HTCU0YdnuDa2tGqhksZjFRq/UpQ4t+YUo2fcsklfHaWxGbDd2qoz3iQLQW lEwpnZ1DPSxD65ynWT7gpvewAlmNEQdDspoWOgXfcDkHfohTNDStGNsTe6LRcbTClBik i5fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZQB0taE16QpLEoO5Yr6fIeRXzSzGnikChpyQhF4iqxA=; b=TEChJqYuG5X0EUl7ixw5aa55OOkeaRCskqKaAR8znztLEOKvsTMzoFZMIpofZwsixe k6PcplwSaqoMQ6DtHW548Im1WuFtcUIKyjzuVtwnThzguwgP3HdDQdbwqOGr0lRmGlF7 2TaZgoNISZLGwOWIyvv4ifWcnwozeG3gN1OL5GzjKH6tz9qFOz8kfipFNirRjPbGGR7C LIhYsYWaO9t8uqqM+AK5oeYWvaMJk/lt2twi+msz8S+KwFGWgayadIPwcw3zMkYCUh30 qIo4GSWrS0MumUH6feTxAkadwQILwmdEK1ILU2hw6rLlqdVC9rtvgVCJ+NUjy9HaF119 B3VA== X-Gm-Message-State: APzg51BNom/uT7MANVVyVO7ByzG91IC1Id6OWvC6rkyxax5YT/rJYUbs 7+zZf3Zdgnyy0Y0IxI3VGCmIcPrP X-Google-Smtp-Source: ANB0VdbVqZ8H39XQ6eO1hBhlK8ThhYbiZ1/5GQJQhXtRHeUdJsyEyUXsUFvVpAjVA2Tv/hac3x+smQ== X-Received: by 2002:a19:f802:: with SMTP id a2-v6mr9972898lff.33.1536514600440; Sun, 09 Sep 2018 10:36:40 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id u19-v6sm2317793lje.51.2018.09.09.10.36.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 10:36:39 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH 3/6] t/helper: merge test-pkt-line into test-tool Date: Sun, 9 Sep 2018 19:36:28 +0200 Message-Id: <20180909173631.1446-4-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180909173631.1446-1-pclouds@gmail.com> References: <20180909173631.1446-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-pkt-line.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t5701-git-serve.sh | 36 +++++++++++++++--------------- t/t5702-protocol-v2.sh | 2 +- t/t5703-upload-pack-ref-in-want.sh | 14 ++++++------ 7 files changed, 31 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index fa67d76780..d9a4029895 100644 --- a/Makefile +++ b/Makefile @@ -722,6 +722,7 @@ TEST_BUILTINS_OBJS += test-mergesort.o TEST_BUILTINS_OBJS += test-mktemp.o TEST_BUILTINS_OBJS += test-online-cpus.o TEST_BUILTINS_OBJS += test-path-utils.o +TEST_BUILTINS_OBJS += test-pkt-line.o TEST_BUILTINS_OBJS += test-prio-queue.o TEST_BUILTINS_OBJS += test-read-cache.o TEST_BUILTINS_OBJS += test-ref-store.o @@ -745,7 +746,6 @@ TEST_PROGRAMS_NEED_X += test-dump-fsmonitor TEST_PROGRAMS_NEED_X += test-fake-ssh TEST_PROGRAMS_NEED_X += test-line-buffer TEST_PROGRAMS_NEED_X += test-parse-options -TEST_PROGRAMS_NEED_X += test-pkt-line TEST_PROGRAMS_NEED_X += test-svn-fe TEST_PROGRAMS_NEED_X += test-tool diff --git a/t/helper/test-pkt-line.c b/t/helper/test-pkt-line.c index 30775f986f..282d536384 100644 --- a/t/helper/test-pkt-line.c +++ b/t/helper/test-pkt-line.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "test-tool.h" #include "pkt-line.h" static void pack_line(const char *line) @@ -79,7 +80,7 @@ static void unpack_sideband(void) } } -int cmd_main(int argc, const char **argv) +int cmd__pkt_line(int argc, const char **argv) { if (argc < 2) die("too few arguments"); diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index 820335704a..0ef53152c4 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -27,6 +27,7 @@ static struct test_cmd cmds[] = { { "mktemp", cmd__mktemp }, { "online-cpus", cmd__online_cpus }, { "path-utils", cmd__path_utils }, + { "pkt-line", cmd__pkt_line }, { "prio-queue", cmd__prio_queue }, { "read-cache", cmd__read_cache }, { "ref-store", cmd__ref_store }, diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index 118c700c7a..7a0ac22ef7 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -23,6 +23,7 @@ int cmd__mergesort(int argc, const char **argv); int cmd__mktemp(int argc, const char **argv); int cmd__online_cpus(int argc, const char **argv); int cmd__path_utils(int argc, const char **argv); +int cmd__pkt_line(int argc, const char **argv); int cmd__prio_queue(int argc, const char **argv); int cmd__read_cache(int argc, const char **argv); int cmd__ref_store(int argc, const char **argv); diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh index 75ec79e6cb..29a54fbfff 100755 --- a/t/t5701-git-serve.sh +++ b/t/t5701-git-serve.sh @@ -15,13 +15,13 @@ test_expect_success 'test capability advertisement' ' EOF git serve --advertise-capabilities >out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'stateless-rpc flag does not list capabilities' ' # Empty request - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && 0000 EOF git serve --stateless-rpc >out in <<-EOF && + test-tool pkt-line pack >in <<-EOF && foobar 0000 EOF @@ -42,7 +42,7 @@ test_expect_success 'request invalid capability' ' ' test_expect_success 'request with no command' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && agent=git/test 0000 EOF @@ -51,7 +51,7 @@ test_expect_success 'request with no command' ' ' test_expect_success 'request invalid command' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=foo agent=git/test 0000 @@ -71,7 +71,7 @@ test_expect_success 'setup some refs and tags' ' ' test_expect_success 'basics of ls-refs' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=ls-refs 0000 EOF @@ -88,12 +88,12 @@ test_expect_success 'basics of ls-refs' ' EOF git serve --stateless-rpc out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'basic ref-prefixes' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=ls-refs 0001 ref-prefix refs/heads/master @@ -108,12 +108,12 @@ test_expect_success 'basic ref-prefixes' ' EOF git serve --stateless-rpc out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'refs/heads prefix' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=ls-refs 0001 ref-prefix refs/heads/ @@ -128,12 +128,12 @@ test_expect_success 'refs/heads prefix' ' EOF git serve --stateless-rpc out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'peel parameter' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=ls-refs 0001 peel @@ -149,12 +149,12 @@ test_expect_success 'peel parameter' ' EOF git serve --stateless-rpc out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'symrefs parameter' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=ls-refs 0001 symrefs @@ -170,12 +170,12 @@ test_expect_success 'symrefs parameter' ' EOF git serve --stateless-rpc out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'sending server-options' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=ls-refs server-option=hello server-option=world @@ -190,14 +190,14 @@ test_expect_success 'sending server-options' ' EOF git serve --stateless-rpc out && - test-pkt-line unpack actual && + test-tool pkt-line unpack actual && test_cmp actual expect ' test_expect_success 'unexpected lines are not allowed in fetch request' ' git init server && - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 this-is-not-a-command diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh index 3beeed4546..88a886975d 100755 --- a/t/t5702-protocol-v2.sh +++ b/t/t5702-protocol-v2.sh @@ -334,7 +334,7 @@ test_expect_success 'even with handcrafted request, filter does not work if not git -C server config uploadpack.allowfilter 0 && # Custom request that tries to filter even though it is not advertised. - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 want $(git -C server rev-parse master) diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh index d1ccc22331..3f58f05cbb 100755 --- a/t/t5703-upload-pack-ref-in-want.sh +++ b/t/t5703-upload-pack-ref-in-want.sh @@ -9,14 +9,14 @@ get_actual_refs () { /wanted-refs/d /0001/d p - }' actual_refs + }' actual_refs } get_actual_commits () { sed -n -e '/packfile/,/0000/{ /packfile/d p - }' o.pack && + }' o.pack && git index-pack o.pack && git verify-pack -v o.idx | grep commit | cut -c-40 | sort >actual_commits } @@ -61,7 +61,7 @@ test_expect_success 'config controls ref-in-want advertisement' ' ' test_expect_success 'invalid want-ref line' ' - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 no-progress @@ -80,7 +80,7 @@ test_expect_success 'basic want-ref' ' EOF git rev-parse f | sort >expected_commits && - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 no-progress @@ -101,7 +101,7 @@ test_expect_success 'multiple want-ref lines' ' EOF git rev-parse c d | sort >expected_commits && - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 no-progress @@ -122,7 +122,7 @@ test_expect_success 'mix want and want-ref' ' EOF git rev-parse e f | sort >expected_commits && - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 no-progress @@ -143,7 +143,7 @@ test_expect_success 'want-ref with ref we already have commit for' ' EOF >expected_commits && - test-pkt-line pack >in <<-EOF && + test-tool pkt-line pack >in <<-EOF && command=fetch 0001 no-progress From patchwork Sun Sep 9 17:36:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10593381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 033F2921 for ; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDCE328BBC for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D28E0291CD; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07C6B28EB9 for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbeIIW1G (ORCPT ); Sun, 9 Sep 2018 18:27:06 -0400 Received: from mail-lj1-f173.google.com ([209.85.208.173]:44176 "EHLO mail-lj1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbeIIW1G (ORCPT ); Sun, 9 Sep 2018 18:27:06 -0400 Received: by mail-lj1-f173.google.com with SMTP id q127-v6so15928936ljq.11 for ; Sun, 09 Sep 2018 10:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U7ueFhAXEXx5fnWhpQP9jIrpsOgrOCcwrcKd+gLk878=; b=mIx9IwGmaQnOYCN6FaqzXeHOv9guCmqlTv+jpVa0VuyeNq+tIZ6zaqlVrawsRs/9R0 gGhUvKWui05y0slFYBO3xSSogD5omX23H98ylspk6kGKeLSfW3SL9j7HC5hD031KqrDZ iRHKP54k4pjRBob12cTt8Iiu42qJGnxNkkMK9nbFGUeTBtJ/MgInJCeBnimoJrUUe8kY CCYzZ0CwepEhzLWkuvNfYachEWnBMdsG1nqvqnA1+Kpg7mOAt+DFLhjg7t0fu2LOtuFm uq1D3sXL23z6m6Jl+FZlLnv8CBcpt6poFhYGL/NEIO2R0CkGS9klDG7N1Lxw37snnVux qXfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U7ueFhAXEXx5fnWhpQP9jIrpsOgrOCcwrcKd+gLk878=; b=M5QsMRfQQJc38Knh3xGfKPdyFUtPZXYOv5h6lwyrAbKUOKB+lUS8ZGpky+asQhZAtB TIv7DJLOJt23uGIuDAQdptdf4g2SgJ6wfEyCvgKSYko4B92X9nqP0f0KtpIafliBRhuf l7wUm/gxD6rPHjOKDjoamHK6hXSNeXbyY6T64egVT5TYnIlqOTHqDrR2+tgKo4Rq7ZT1 MZ6AaZ89lwwXm9+FcDB8zMrW8KJP+5LEEzqss+NqteLP/4eMuUki7WU232d31x2/JMiZ XFOmicI3cNFDpArg5TciuiC0y+WAyXrLT85B9mHK4MUkhJqxSUQcKlAn02KYnEX1ukzq frUw== X-Gm-Message-State: APzg51BUCb/lhDc46Diu9AUHZ1fTg2BSP0v0+b6tYm+zRuU+BxxTvIq8 peIIUm2LNZd1jNgw99A22tnq4TND X-Google-Smtp-Source: ANB0VdYTvygWZfQaWlUHSUBy/qGkMoYJZNGCVW+cNdcQYxD7B4T2HBqqMPuCZC3CgygDyBSTWkQNlA== X-Received: by 2002:a2e:4557:: with SMTP id s84-v6mr10035751lja.47.1536514601500; Sun, 09 Sep 2018 10:36:41 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id u19-v6sm2317793lje.51.2018.09.09.10.36.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 10:36:40 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH 4/6] t/helper: merge test-parse-options into test-tool Date: Sun, 9 Sep 2018 19:36:29 +0200 Message-Id: <20180909173631.1446-5-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180909173631.1446-1-pclouds@gmail.com> References: <20180909173631.1446-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-parse-options.c | 5 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0040-parse-options.sh | 70 +++++++++++++++++------------------ 5 files changed, 41 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index d9a4029895..1a8a7cb82d 100644 --- a/Makefile +++ b/Makefile @@ -721,6 +721,7 @@ TEST_BUILTINS_OBJS += test-match-trees.o TEST_BUILTINS_OBJS += test-mergesort.o TEST_BUILTINS_OBJS += test-mktemp.o TEST_BUILTINS_OBJS += test-online-cpus.o +TEST_BUILTINS_OBJS += test-parse-options.o TEST_BUILTINS_OBJS += test-path-utils.o TEST_BUILTINS_OBJS += test-pkt-line.o TEST_BUILTINS_OBJS += test-prio-queue.o @@ -745,7 +746,6 @@ TEST_BUILTINS_OBJS += test-write-cache.o TEST_PROGRAMS_NEED_X += test-dump-fsmonitor TEST_PROGRAMS_NEED_X += test-fake-ssh TEST_PROGRAMS_NEED_X += test-line-buffer -TEST_PROGRAMS_NEED_X += test-parse-options TEST_PROGRAMS_NEED_X += test-svn-fe TEST_PROGRAMS_NEED_X += test-tool diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c index 630c76d127..9cb8a0ea0f 100644 --- a/t/helper/test-parse-options.c +++ b/t/helper/test-parse-options.c @@ -1,3 +1,4 @@ +#include "test-tool.h" #include "cache.h" #include "parse-options.h" #include "string-list.h" @@ -94,11 +95,11 @@ static void show(struct string_list *expect, int *status, const char *fmt, ...) strbuf_release(&buf); } -int cmd_main(int argc, const char **argv) +int cmd__parse_options(int argc, const char **argv) { const char *prefix = "prefix/"; const char *usage[] = { - "test-parse-options ", + "test-tool parse-options ", "", "A helper function for the parse-options API.", NULL diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index 0ef53152c4..9cc21024e9 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -26,6 +26,7 @@ static struct test_cmd cmds[] = { { "mergesort", cmd__mergesort }, { "mktemp", cmd__mktemp }, { "online-cpus", cmd__online_cpus }, + { "parse-options", cmd__parse_options }, { "path-utils", cmd__path_utils }, { "pkt-line", cmd__pkt_line }, { "prio-queue", cmd__prio_queue }, diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index 7a0ac22ef7..527722f4b0 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -22,6 +22,7 @@ int cmd__match_trees(int argc, const char **argv); int cmd__mergesort(int argc, const char **argv); int cmd__mktemp(int argc, const char **argv); int cmd__online_cpus(int argc, const char **argv); +int cmd__parse_options(int argc, const char **argv); int cmd__path_utils(int argc, const char **argv); int cmd__pkt_line(int argc, const char **argv); int cmd__prio_queue(int argc, const char **argv); diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index 5b0560fa20..17d0c18feb 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -8,7 +8,7 @@ test_description='our own option parser' . ./test-lib.sh cat >expect <<\EOF -usage: test-parse-options +usage: test-tool parse-options A helper function for the parse-options API. @@ -52,7 +52,7 @@ Standard options EOF test_expect_success 'test help' ' - test_must_fail test-parse-options -h >output 2>output.err && + test_must_fail test-tool parse-options -h >output 2>output.err && test_must_be_empty output.err && test_i18ncmp expect output ' @@ -64,7 +64,7 @@ check () { shift && expect="$1" && shift && - test-parse-options --expect="$what $expect" "$@" + test-tool parse-options --expect="$what $expect" "$@" } check_unknown_i18n() { @@ -75,7 +75,7 @@ check_unknown_i18n() { echo error: unknown switch \`${1#-}\' >expect ;; esac && cat expect.err >>expect && - test_must_fail test-parse-options $* >output 2>output.err && + test_must_fail test-tool parse-options $* >output 2>output.err && test_must_be_empty output && test_i18ncmp expect output.err } @@ -133,7 +133,7 @@ file: prefix/my.file EOF test_expect_success 'short options' ' - test-parse-options -s123 -b -i 1729 -m 16k -b -vv -n -F my.file \ + test-tool parse-options -s123 -b -i 1729 -m 16k -b -vv -n -F my.file \ >output 2>output.err && test_cmp expect output && test_must_be_empty output.err @@ -153,7 +153,7 @@ file: prefix/fi.le EOF test_expect_success 'long options' ' - test-parse-options --boolean --integer 1729 --magnitude 16k \ + test-tool parse-options --boolean --integer 1729 --magnitude 16k \ --boolean --string2=321 --verbose --verbose --no-dry-run \ --abbrev=10 --file fi.le --obsolete \ >output 2>output.err && @@ -162,9 +162,9 @@ test_expect_success 'long options' ' ' test_expect_success 'missing required value' ' - test_expect_code 129 test-parse-options -s && - test_expect_code 129 test-parse-options --string && - test_expect_code 129 test-parse-options --file + test_expect_code 129 test-tool parse-options -s && + test_expect_code 129 test-tool parse-options --string && + test_expect_code 129 test-tool parse-options --file ' cat >expect <<\EOF @@ -184,7 +184,7 @@ arg 02: --boolean EOF test_expect_success 'intermingled arguments' ' - test-parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \ + test-tool parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \ >output 2>output.err && test_must_be_empty output.err && test_cmp expect output @@ -204,21 +204,21 @@ file: (not set) EOF test_expect_success 'unambiguously abbreviated option' ' - test-parse-options --int 2 --boolean --no-bo >output 2>output.err && + test-tool parse-options --int 2 --boolean --no-bo >output 2>output.err && test_must_be_empty output.err && test_cmp expect output ' test_expect_success 'unambiguously abbreviated option with "="' ' - test-parse-options --expect="integer: 2" --int=2 + test-tool parse-options --expect="integer: 2" --int=2 ' test_expect_success 'ambiguously abbreviated option' ' - test_expect_code 129 test-parse-options --strin 123 + test_expect_code 129 test-tool parse-options --strin 123 ' test_expect_success 'non ambiguous option (after two options it abbreviates)' ' - test-parse-options --expect="string: 123" --st 123 + test-tool parse-options --expect="string: 123" --st 123 ' cat >typo.err <<\EOF @@ -226,7 +226,7 @@ error: did you mean `--boolean` (with two dashes ?) EOF test_expect_success 'detect possible typos' ' - test_must_fail test-parse-options -boolean >output 2>output.err && + test_must_fail test-tool parse-options -boolean >output 2>output.err && test_must_be_empty output && test_cmp typo.err output.err ' @@ -236,13 +236,13 @@ error: did you mean `--ambiguous` (with two dashes ?) EOF test_expect_success 'detect possible typos' ' - test_must_fail test-parse-options -ambiguous >output 2>output.err && + test_must_fail test-tool parse-options -ambiguous >output 2>output.err && test_must_be_empty output && test_cmp typo.err output.err ' test_expect_success 'keep some options as arguments' ' - test-parse-options --expect="arg 00: --quux" --quux + test-tool parse-options --expect="arg 00: --quux" --quux ' cat >expect <<\EOF @@ -260,7 +260,7 @@ arg 00: foo EOF test_expect_success 'OPT_DATE() works' ' - test-parse-options -t "1970-01-01 00:00:01 +0000" \ + test-tool parse-options -t "1970-01-01 00:00:01 +0000" \ foo -q >output 2>output.err && test_must_be_empty output.err && test_cmp expect output @@ -281,13 +281,13 @@ file: (not set) EOF test_expect_success 'OPT_CALLBACK() and OPT_BIT() work' ' - test-parse-options --length=four -b -4 >output 2>output.err && + test-tool parse-options --length=four -b -4 >output 2>output.err && test_must_be_empty output.err && test_cmp expect output ' test_expect_success 'OPT_CALLBACK() and callback errors work' ' - test_must_fail test-parse-options --no-length >output 2>output.err && + test_must_fail test-tool parse-options --no-length >output 2>output.err && test_must_be_empty output && test_must_be_empty output.err ' @@ -306,31 +306,31 @@ file: (not set) EOF test_expect_success 'OPT_BIT() and OPT_SET_INT() work' ' - test-parse-options --set23 -bbbbb --no-or4 >output 2>output.err && + test-tool parse-options --set23 -bbbbb --no-or4 >output 2>output.err && test_must_be_empty output.err && test_cmp expect output ' test_expect_success 'OPT_NEGBIT() and OPT_SET_INT() work' ' - test-parse-options --set23 -bbbbb --neg-or4 >output 2>output.err && + test-tool parse-options --set23 -bbbbb --neg-or4 >output 2>output.err && test_must_be_empty output.err && test_cmp expect output ' test_expect_success 'OPT_BIT() works' ' - test-parse-options --expect="boolean: 6" -bb --or4 + test-tool parse-options --expect="boolean: 6" -bb --or4 ' test_expect_success 'OPT_NEGBIT() works' ' - test-parse-options --expect="boolean: 6" -bb --no-neg-or4 + test-tool parse-options --expect="boolean: 6" -bb --no-neg-or4 ' test_expect_success 'OPT_COUNTUP() with PARSE_OPT_NODASH works' ' - test-parse-options --expect="boolean: 6" + + + + + + + test-tool parse-options --expect="boolean: 6" + + + + + + ' test_expect_success 'OPT_NUMBER_CALLBACK() works' ' - test-parse-options --expect="integer: 12345" -12345 + test-tool parse-options --expect="integer: 12345" -12345 ' cat >expect <<\EOF @@ -347,7 +347,7 @@ file: (not set) EOF test_expect_success 'negation of OPT_NONEG flags is not ambiguous' ' - test-parse-options --no-ambig >output 2>output.err && + test-tool parse-options --no-ambig >output 2>output.err && test_must_be_empty output.err && test_cmp expect output ' @@ -358,38 +358,38 @@ list: bar list: baz EOF test_expect_success '--list keeps list of strings' ' - test-parse-options --list foo --list=bar --list=baz >output && + test-tool parse-options --list foo --list=bar --list=baz >output && test_cmp expect output ' test_expect_success '--no-list resets list' ' - test-parse-options --list=other --list=irrelevant --list=options \ + test-tool parse-options --list=other --list=irrelevant --list=options \ --no-list --list=foo --list=bar --list=baz >output && test_cmp expect output ' test_expect_success 'multiple quiet levels' ' - test-parse-options --expect="quiet: 3" -q -q -q + test-tool parse-options --expect="quiet: 3" -q -q -q ' test_expect_success 'multiple verbose levels' ' - test-parse-options --expect="verbose: 3" -v -v -v + test-tool parse-options --expect="verbose: 3" -v -v -v ' test_expect_success '--no-quiet sets --quiet to 0' ' - test-parse-options --expect="quiet: 0" --no-quiet + test-tool parse-options --expect="quiet: 0" --no-quiet ' test_expect_success '--no-quiet resets multiple -q to 0' ' - test-parse-options --expect="quiet: 0" -q -q -q --no-quiet + test-tool parse-options --expect="quiet: 0" -q -q -q --no-quiet ' test_expect_success '--no-verbose sets verbose to 0' ' - test-parse-options --expect="verbose: 0" --no-verbose + test-tool parse-options --expect="verbose: 0" --no-verbose ' test_expect_success '--no-verbose resets multiple verbose to 0' ' - test-parse-options --expect="verbose: 0" -v -v -v --no-verbose + test-tool parse-options --expect="verbose: 0" -v -v -v --no-verbose ' test_done From patchwork Sun Sep 9 17:36:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10593383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CA7915E2 for ; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1256228A80 for ; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06C1A28EB9; Sun, 9 Sep 2018 17:36:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4916E28A80 for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726849AbeIIW1H (ORCPT ); Sun, 9 Sep 2018 18:27:07 -0400 Received: from mail-lj1-f179.google.com ([209.85.208.179]:44182 "EHLO mail-lj1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbeIIW1H (ORCPT ); Sun, 9 Sep 2018 18:27:07 -0400 Received: by mail-lj1-f179.google.com with SMTP id q127-v6so15928958ljq.11 for ; Sun, 09 Sep 2018 10:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5uNZiYLip/1WdtP0gjVHEBpa7pD9oIik1b4gHrB6bks=; b=ZMTIt3xqpA6/Iy9EbI3CafhfSKRW6YCuneyuzDCsM8pqvqlAhBWsI6Wm2uYVleDcgo x8KUbrlBVlgkPNXeALD440aSQ4Vqx9oRJ/J5BvncLeCKroDgsE7Cqs1fync+ckEzdAKz qU6PokoNVeYw2GUyT77GPBoboDU4/mBpHge0KYPPc4ggM8u29hen4GFGxceWlmZ8Jt7G 1rnoszK/bvA+YChAXKZg3FjdPIsh+7LvifXuQ2ByzaBpai5m2zIcPs+bXj/0p3IJU9ky Wr/g5qvGc5zpSc5noz5Lb7wOcRwGucjbbNCPFVc1C0rVvs2l3ShmzczLmbJSWRmGhw9/ AUUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5uNZiYLip/1WdtP0gjVHEBpa7pD9oIik1b4gHrB6bks=; b=bl85gjQtRuoU/E1H8arjha9IkXUEe/fhnMTk0XyzYrkisVJT9bbSV4JlvqFq64OtAD bYbiTgSbh5GgivsawLWV5QVSInPkduAixZXrRVVp0KHSoSm8zIuWwAizYT8SG7UA8huj rrnYA6lU2a4lODM312H/MJH+EYbC4ZTktcZj+eZZtfz7+UdVtCBMhEKvJYPmiK8VhfiL YfG/F+Q64DEFJt8VXoyuiBmFnqiGKYKMN/8xUf6t4DehraW2uHfiqPyr2FzDX+QQtefw McbfcX0wCrdKV8HplUKpD2N7MJvzThbmhV2clQkdTgD7Jxwiq6cvPTmkM08ZR3xiA7DP m6nA== X-Gm-Message-State: APzg51DKHak6+c8t2x6BrNIwjr/yLOceB/zE8Qi6xrcghrBPqe7LX9nS noC+cMNq/4emOXUMDmvOBmiNwMw6 X-Google-Smtp-Source: ANB0Vda9aSt3ehbcdOonZgUkmE78Z6ov40p2lJ0hbpbj//E5FQJhTYSOzjHbgwGUN9SLbt/8Q4oQOA== X-Received: by 2002:a2e:2282:: with SMTP id i124-v6mr10910045lji.11.1536514602564; Sun, 09 Sep 2018 10:36:42 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id u19-v6sm2317793lje.51.2018.09.09.10.36.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 10:36:41 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH 5/6] t/helper: merge test-dump-fsmonitor into test-tool Date: Sun, 9 Sep 2018 19:36:30 +0200 Message-Id: <20180909173631.1446-6-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180909173631.1446-1-pclouds@gmail.com> References: <20180909173631.1446-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-dump-fsmonitor.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t7519-status-fsmonitor.sh | 10 +++++----- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1a8a7cb82d..ea7454632d 100644 --- a/Makefile +++ b/Makefile @@ -709,6 +709,7 @@ TEST_BUILTINS_OBJS += test-date.o TEST_BUILTINS_OBJS += test-delta.o TEST_BUILTINS_OBJS += test-drop-caches.o TEST_BUILTINS_OBJS += test-dump-cache-tree.o +TEST_BUILTINS_OBJS += test-dump-fsmonitor.o TEST_BUILTINS_OBJS += test-dump-split-index.o TEST_BUILTINS_OBJS += test-dump-untracked-cache.o TEST_BUILTINS_OBJS += test-example-decorate.o @@ -743,7 +744,6 @@ TEST_BUILTINS_OBJS += test-urlmatch-normalization.o TEST_BUILTINS_OBJS += test-wildmatch.o TEST_BUILTINS_OBJS += test-write-cache.o -TEST_PROGRAMS_NEED_X += test-dump-fsmonitor TEST_PROGRAMS_NEED_X += test-fake-ssh TEST_PROGRAMS_NEED_X += test-line-buffer TEST_PROGRAMS_NEED_X += test-svn-fe diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c index ad452707e8..08e3684aff 100644 --- a/t/helper/test-dump-fsmonitor.c +++ b/t/helper/test-dump-fsmonitor.c @@ -1,6 +1,7 @@ +#include "test-tool.h" #include "cache.h" -int cmd_main(int ac, const char **av) +int cmd__dump_fsmonitor(int ac, const char **av) { struct index_state *istate = &the_index; int i; diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index 9cc21024e9..6261c2fda0 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -14,6 +14,7 @@ static struct test_cmd cmds[] = { { "delta", cmd__delta }, { "drop-caches", cmd__drop_caches }, { "dump-cache-tree", cmd__dump_cache_tree }, + { "dump-fsmonitor", cmd__dump_fsmonitor }, { "dump-split-index", cmd__dump_split_index }, { "dump-untracked-cache", cmd__dump_untracked_cache }, { "example-decorate", cmd__example_decorate }, diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index 527722f4b0..38da025511 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -10,6 +10,7 @@ int cmd__date(int argc, const char **argv); int cmd__delta(int argc, const char **argv); int cmd__drop_caches(int argc, const char **argv); int cmd__dump_cache_tree(int argc, const char **argv); +int cmd__dump_fsmonitor(int argc, const char **argv); int cmd__dump_split_index(int argc, const char **argv); int cmd__dump_untracked_cache(int argc, const char **argv); int cmd__example_decorate(int argc, const char **argv); diff --git a/t/t7519-status-fsmonitor.sh b/t/t7519-status-fsmonitor.sh index 603d27789b..8384ad258c 100755 --- a/t/t7519-status-fsmonitor.sh +++ b/t/t7519-status-fsmonitor.sh @@ -84,21 +84,21 @@ test_expect_success 'setup' ' # test that the fsmonitor extension is off by default test_expect_success 'fsmonitor extension is off by default' ' - test-dump-fsmonitor >actual && + test-tool dump-fsmonitor >actual && grep "^no fsmonitor" actual ' # test that "update-index --fsmonitor" adds the fsmonitor extension test_expect_success 'update-index --fsmonitor" adds the fsmonitor extension' ' git update-index --fsmonitor && - test-dump-fsmonitor >actual && + test-tool dump-fsmonitor >actual && grep "^fsmonitor last update" actual ' # test that "update-index --no-fsmonitor" removes the fsmonitor extension test_expect_success 'update-index --no-fsmonitor" removes the fsmonitor extension' ' git update-index --no-fsmonitor && - test-dump-fsmonitor >actual && + test-tool dump-fsmonitor >actual && grep "^no fsmonitor" actual ' @@ -307,9 +307,9 @@ test_expect_success 'splitting the index results in the same state' ' dirty_repo && git update-index --fsmonitor && git ls-files -f >expect && - test-dump-fsmonitor >&2 && echo && + test-tool dump-fsmonitor >&2 && echo && git update-index --fsmonitor --split-index && - test-dump-fsmonitor >&2 && echo && + test-tool dump-fsmonitor >&2 && echo && git ls-files -f >actual && test_cmp expect actual ' From patchwork Sun Sep 9 17:36:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10593387 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4971015E2 for ; Sun, 9 Sep 2018 17:36:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F65B28A80 for ; Sun, 9 Sep 2018 17:36:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23B1C28BBC; Sun, 9 Sep 2018 17:36:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28A1E28B1E for ; Sun, 9 Sep 2018 17:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbeIIW1I (ORCPT ); Sun, 9 Sep 2018 18:27:08 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:41688 "EHLO mail-lj1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbeIIW1H (ORCPT ); Sun, 9 Sep 2018 18:27:07 -0400 Received: by mail-lj1-f171.google.com with SMTP id y17-v6so15933426ljy.8 for ; Sun, 09 Sep 2018 10:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PEV4pbrWgCf2ZtGm2bOMvtucp86Gd1EEZG2F1VO7OQ0=; b=aw4QyQoxfnVVsQmtJCeNooAX+pqjedRcb/uxxCzejXXHs56jn/60js5fPyyE6vjV2D b6ly/tXUZv+G/JbuFEsgUYFQFXWQMvF7i+r47whvnHFMu+QNVMXUQJ04aEhLfWcUr761 sJHVZt/aRPYxU+FoEnNC+tyPyprMhnEFhMcHBvorDg/a2T3NOdcelNjiss7B41Ly3QBS HBMK94+6COR3VYS4GTeKBwdTKVfiCZ2f5LGjfPQjsIFgSbq4HLLkPJucjr+xw7vtqazC 7D14nNwqay9cQwInaUq4RpXn/JdoxDizAFCsufiW5baK0PrNc6I+V/UzHXiWp6riLl0q EL4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PEV4pbrWgCf2ZtGm2bOMvtucp86Gd1EEZG2F1VO7OQ0=; b=ni/RjI37dULVfrtbKoE9aVKyILrMsPFWXrGeVIut9ETL9zEp0azlRZ0/IWt1LyQJ3i G0RUCp/8SO5t0G2b4c6GqC8Zcv63DorQOWPoxmfOcH47RHxMikpmwfeMKwbF5pys24Xh whFoGh7gGT5+2pF5rJ++cqPBH2Y5wviD4K315TTYfJkcrlGtkikev4+7t/I6vOcKqG2q 3fxjY8dvQ4oj+nko4p1cZiYlvXJlojxO2pnHIJzdfuXmfCzJaZfLlMjf3Sh7V7sq2Ybq 6i8W+s7IvXe3S5dsfr3FcnbrITij1VrwooqN7Kdoes3M1Rrczdntq/hFtPez+BpnIQMS hFsg== X-Gm-Message-State: APzg51Caf5OwFPZUAhKN/FHMiRuJn9OBsBJj65MKlDBgF5tO6sXxE4ZA Mrm0Uz2Bwi5OurXPtY8Zibr8Ik+q X-Google-Smtp-Source: ANB0VdZS5IlB5Vp0vGfPdy/IW1ekv4oE1PwpOCbq75fnHtBzyoCNLA4yQFuJpMB9tbxyFHmFb7qwpQ== X-Received: by 2002:a2e:2e02:: with SMTP id u2-v6mr10546878lju.77.1536514603509; Sun, 09 Sep 2018 10:36:43 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id u19-v6sm2317793lje.51.2018.09.09.10.36.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 10:36:42 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH 6/6] Makefile: add a hint about TEST_BUILTINS_OBJS Date: Sun, 9 Sep 2018 19:36:31 +0200 Message-Id: <20180909173631.1446-7-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180909173631.1446-1-pclouds@gmail.com> References: <20180909173631.1446-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index ea7454632d..39d39257e0 100644 --- a/Makefile +++ b/Makefile @@ -744,6 +744,8 @@ TEST_BUILTINS_OBJS += test-urlmatch-normalization.o TEST_BUILTINS_OBJS += test-wildmatch.o TEST_BUILTINS_OBJS += test-write-cache.o +# Do not add more tests here unless they have extra dependencies. Add +# them in TEST_BUILTINS_OBJS above. TEST_PROGRAMS_NEED_X += test-fake-ssh TEST_PROGRAMS_NEED_X += test-line-buffer TEST_PROGRAMS_NEED_X += test-svn-fe