From: "Vladimir D. Seleznev" <vseleznv@altlinux.org> To: devel@lists.altlinux.org Cc: legion@altlinux.org, "Vladimir D. Seleznev" <vseleznv@altlinux.org> Subject: [devel] [PATCH v2 2/2] tests: add test for diff exclude option Date: Fri, 27 Nov 2020 13:03:22 +0300 Message-ID: <20201127100322.3542476-2-vseleznv@altlinux.org> (raw) In-Reply-To: <20201127100322.3542476-1-vseleznv@altlinux.org> Signed-off-by: Vladimir D. Seleznev <vseleznv@altlinux.org> --- 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
next prev parent reply other threads:[~2020-11-27 10:03 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-27 10:03 [devel] [PATCH v2 1/2] Add diff exclude option for gear-rules Vladimir D. Seleznev 2020-11-27 10:03 ` Vladimir D. Seleznev [this message] 2020-11-27 10:35 ` Alexey Gladkov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201127100322.3542476-2-vseleznv@altlinux.org \ --to=vseleznv@altlinux.org \ --cc=devel@lists.altlinux.org \ --cc=legion@altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git