From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=altlinux.org; s=dkim; h=Subject:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1xJXKcA3Qz1TEXR0y+WXHOxinvA/djCtiPLQi57Rdk4=; b=SMd6J9IkRULYMVY6FoLVj7Jnzi 7iIaPZKRA4UDHsWOwExMqoPVgMtgqPiTOmaGxK22K4hNDVq1HvGIHsBWagzHYSjVAiNyRAZriCFSD E/UgPHni0AA38a1P8PHyrEaOXdq+2vgwtyKFzJIpibZmA2CPtldeOeohQQpo5o8VZkZtGzde/dByB BELMGObp9w6XfVzE5yXmZhX65OjW6cndrydjJsr2dwbJMGRTJ+X+rKsjVH4Hqrt0+4Vdmrer5u1yX R7YlyGDlzu04t1Rd/+TJBTwLXZpQvUJF+kBc0+fi+hmEiSIV6F6VAiSi7URLw0BIUmHyxbdKgjVaN 0zb4teWA==; From: "Vladimir D. Seleznev" To: devel@lists.altlinux.org Date: Fri, 27 Nov 2020 16:44:31 +0300 Message-Id: <20201127134431.3854941-2-vseleznv@altlinux.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201127134431.3854941-1-vseleznv@altlinux.org> References: <20201127134431.3854941-1-vseleznv@altlinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 46.39.229.3 X-SA-Exim-Mail-From: vseleznv@altlinux.org X-SA-Exim-Version: 4.2.1 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) Cc: legion@altlinux.org, "Vladimir D. Seleznev" Subject: [devel] [PATCH v4 2/2] tests: add test for diff exclude option X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 13:44:52 -0000 Archived-At: List-Archive: List-Post: Signed-off-by: Vladimir D. Seleznev --- tests/gear-rules-diff-tag-tree-exclude.test | 51 +++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/gear-rules-diff-tag-tree-exclude.test diff --git a/tests/gear-rules-diff-tag-tree-exclude.test b/tests/gear-rules-diff-tag-tree-exclude.test new file mode 100644 index 0000000..e9899ed --- /dev/null +++ b/tests/gear-rules-diff-tag-tree-exclude.test @@ -0,0 +1,51 @@ +#!/bin/sh -efu + +gear_rules_diff_tag_tree_exclude() # test entry point +{ + local spec=file.spec + local n=foo + local v=1 + local r=99 + local src=a/bb/ccc/dddd/src + local dst=1/22/333/4444/55555/dst + local patch="${dst##*/}-$v-$r.patch${gear_directive#diff}" + + printf 'Name:%s\nVersion: %s\nRelease: %s' "$n" "$v" "$r" >"$spec" + mkdir -p $src + echo one >$src/file + mkdir $src/sub + echo two >$src/sub/file2 + git add "$spec" $src/file $src/sub/file2 + git commit -q -a -m 1 + git tag -a -m t1 v1 + git rm -q -f $src/file $src/sub/file2 + mkdir .gear + echo "$gear_directive: v1:$src $dst exclude=sub/** exclude=*3" > .gear/rules + mkdir -p $dst + echo two >$dst/file + echo three >$dst/file3 + git add .gear/rules $dst/file $dst/file3 + gear-store-tags -a + git commit -q -a -m 2 + + finalize_repo + + $GEAR "$GEAR_OUT" + check_pkgtar_list "$spec +./ +./$spec +./$patch" + check_pkgtar_spec "$GEAR_OUT" "$spec" + unpack_pkgtar_to .out + result="$($decompress_prog ".out/$patch")" + assertEquals ' file | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/file b/file +index 5626abf..f719efd 100644 +--- a/file ++++ b/file +@@ -1 +1 @@ +-one ++two' "$result" +} -- 2.29.2