testing/tests/download: test git tag
authorRicardo Martincoski <ricardo.martincoski@datacom.ind.br>
Sat, 12 May 2018 02:58:31 +0000 (23:58 -0300)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Wed, 6 Feb 2019 09:57:26 +0000 (10:57 +0100)
Add a tag to the static repo and check on the git refs test case the
download of a git package:
 - with the name of a tag as version;
 - with the sha1 of a tag itself as version;
 - with the partial sha1 of a tag itself as version;
 - with the sha1 of a commit pointed by a tag as version;
 - with the partial sha1 of a commit pointed by a tag as version;
 - with the sha1 of a commit reachable only by a tag as version;
 - with the partial sha1 of a commit reachable only by a tag as version.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Cc: Arnout Vandecappelle <arnout@mind.be>
Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
23 files changed:
support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.mk [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.hash [new file with mode: 0644]
support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.mk [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/2b/0e0d98a49c97da6a618ab36337e2058eb733a2 [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/46/bae5b639e5a18e2cc4dc508f080d566baeff59 [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/51/6c9c5f64ec66534d4d069c2e408d9ae4dce023 [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452 [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001 [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482 [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc [new file with mode: 0644]
support/testing/tests/download/git-remote/repo.git/refs/tags/mytag [new file with mode: 0644]
support/testing/tests/download/test_git.py

diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.hash
new file mode 100644 (file)
index 0000000..7696086
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  f2ef9772f13a9ef9a2c7cde0795e179defb12320d1747fc8d2408748ef5844c2  git-partial-sha1-reachable-by-tag-46bae5b639e5a18e2cc4.tar.gz
+sha256  2de87d77a2f226813f2d9bda906e970e4195605cdba6680443c0c04d89c532b6  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-tag/git-partial-sha1-reachable-by-tag.mk
new file mode 100644 (file)
index 0000000..05aa659
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-partial-sha1-reachable-by-tag
+#
+################################################################################
+
+GIT_PARTIAL_SHA1_REACHABLE_BY_TAG_VERSION = 46bae5b639e5a18e2cc4
+GIT_PARTIAL_SHA1_REACHABLE_BY_TAG_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_PARTIAL_SHA1_REACHABLE_BY_TAG_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.hash
new file mode 100644 (file)
index 0000000..e627caf
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  721143b41b8e56cfd9025833f1602e900a490627db2504e5b4907baa23e0019e  git-partial-sha1-tag-itself-2b0e0d98a49c97da6a61.tar.gz
+sha256  6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-itself/git-partial-sha1-tag-itself.mk
new file mode 100644 (file)
index 0000000..5154923
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-partial-sha1-tag-itself
+#
+################################################################################
+
+GIT_PARTIAL_SHA1_TAG_ITSELF_VERSION = 2b0e0d98a49c97da6a61
+GIT_PARTIAL_SHA1_TAG_ITSELF_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_PARTIAL_SHA1_TAG_ITSELF_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.hash
new file mode 100644 (file)
index 0000000..f957a0e
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  0fbf7fe935f962ceaafcf8e0ffd25dd2a83752c3f0fd055a942a53f8c9235fa7  git-partial-sha1-tag-points-to-516c9c5f64ec66534d4d.tar.gz
+sha256  6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-tag-points-to/git-partial-sha1-tag-points-to.mk
new file mode 100644 (file)
index 0000000..c810e81
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-partial-sha1-tag-points-to
+#
+################################################################################
+
+GIT_PARTIAL_SHA1_TAG_POINTS_TO_VERSION = 516c9c5f64ec66534d4d
+GIT_PARTIAL_SHA1_TAG_POINTS_TO_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_PARTIAL_SHA1_TAG_POINTS_TO_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.hash
new file mode 100644 (file)
index 0000000..0eb0ca0
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  9b20256a3058221a8e91031f11700d9945ea84e8f328fa8e42e1cb9f7a30e3b2  git-sha1-reachable-by-tag-46bae5b639e5a18e2cc4dc508f080d566baeff59.tar.gz
+sha256  2de87d77a2f226813f2d9bda906e970e4195605cdba6680443c0c04d89c532b6  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-tag/git-sha1-reachable-by-tag.mk
new file mode 100644 (file)
index 0000000..b5fde7b
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-sha1-reachable-by-tag
+#
+################################################################################
+
+GIT_SHA1_REACHABLE_BY_TAG_VERSION = 46bae5b639e5a18e2cc4dc508f080d566baeff59
+GIT_SHA1_REACHABLE_BY_TAG_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_SHA1_REACHABLE_BY_TAG_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.hash
new file mode 100644 (file)
index 0000000..48c1348
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  7d301c1a1054d6aee49193ca9e938f4da561ff73fb01719662865aa38bdc4361  git-sha1-tag-itself-2b0e0d98a49c97da6a618ab36337e2058eb733a2.tar.gz
+sha256  6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-itself/git-sha1-tag-itself.mk
new file mode 100644 (file)
index 0000000..8914496
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-sha1-tag-itself
+#
+################################################################################
+
+GIT_SHA1_TAG_ITSELF_VERSION = 2b0e0d98a49c97da6a618ab36337e2058eb733a2
+GIT_SHA1_TAG_ITSELF_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_SHA1_TAG_ITSELF_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.hash
new file mode 100644 (file)
index 0000000..3dcafc2
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  c1f9f5734529a31140a71c031534460811f001b4db37d26833f386358150ab47  git-sha1-tag-points-to-516c9c5f64ec66534d4d069c2e408d9ae4dce023.tar.gz
+sha256  6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-tag-points-to/git-sha1-tag-points-to.mk
new file mode 100644 (file)
index 0000000..adaae73
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-sha1-tag-points-to
+#
+################################################################################
+
+GIT_SHA1_TAG_POINTS_TO_VERSION = 516c9c5f64ec66534d4d069c2e408d9ae4dce023
+GIT_SHA1_TAG_POINTS_TO_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_SHA1_TAG_POINTS_TO_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.hash b/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.hash
new file mode 100644 (file)
index 0000000..1cd0b15
--- /dev/null
@@ -0,0 +1,2 @@
+sha256  85dcb5bcf9bed496688d0eb01c7a3ce05c5b46b984cc1e9e76a6dbefd976e6b3  git-tag-mytag.tar.gz
+sha256  6de8772a0a58fa62e2b8c58d4dae55c9db7534ad3b3918ecc849a9008d58f081  file
diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.mk b/support/testing/tests/download/br2-external/git-refs/package/git-tag/git-tag.mk
new file mode 100644 (file)
index 0000000..6960ceb
--- /dev/null
@@ -0,0 +1,11 @@
+################################################################################
+#
+# git-tag
+#
+################################################################################
+
+GIT_TAG_VERSION = mytag
+GIT_TAG_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_TAG_LICENSE_FILES = file
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/2b/0e0d98a49c97da6a618ab36337e2058eb733a2 b/support/testing/tests/download/git-remote/repo.git/objects/2b/0e0d98a49c97da6a618ab36337e2058eb733a2
new file mode 100644 (file)
index 0000000..39c9130
--- /dev/null
@@ -0,0 +1 @@
+x\ 1E\8eK\ e\ 2!\10\ 5]s\8a¾\80\93\1e~Bb\8c\17\r°i    *\83A6s{1³póR©Eåõ\90`6jWo\ f¦\ ef¶äÉÜ­f²Ö(\1duDëI²F\17}`\1d\89Q*Ñ×7\ 3ÕRr\17}4Ê:öG\89\e\3\85\16+\Bëy¡úyf8¶MNå/Ï©\84ü\9aFæ4NàÁ\e'ÑÁ\1e\15¢\10\v\11L3\13
\ No newline at end of file
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/46/bae5b639e5a18e2cc4dc508f080d566baeff59 b/support/testing/tests/download/git-remote/repo.git/objects/46/bae5b639e5a18e2cc4dc508f080d566baeff59
new file mode 100644 (file)
index 0000000..3bf8865
--- /dev/null
@@ -0,0 +1 @@
+x\ 1­Î1n\ 3!\10@Q×\9c\82\v¬Å0àa£(ò\ 5ÒÄ'\98e`\8d\12\96\b\93··¥\14î-·¯øú±ÕZ\86F\8b»ÑSÒ1\9bìrðB\f\16)!\11[±~\99ç\83\87À\81(±1 ~¹§mh¶\18\16\90\1c%X/\8e$ ã\8cÑ[\8b\ e(\ 6\a ³\11Å\7fãܺþ*\91»4ýÉ}\94-¶ËwÑïý\1f÷õ\81ǵrùÙÇV?4xC³\ fpðz2h\8cºë}z¤\17åÔà\15\94:\95uK2µ\9c§åúöÌ©º\ 1ÍFkb
\ No newline at end of file
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/51/6c9c5f64ec66534d4d069c2e408d9ae4dce023 b/support/testing/tests/download/git-remote/repo.git/objects/51/6c9c5f64ec66534d4d069c2e408d9ae4dce023
new file mode 100644 (file)
index 0000000..0bda23a
--- /dev/null
@@ -0,0 +1,2 @@
+x\ 1­ÎKN\ 31\10EQÆ^\85\91\7få\ fBQ6À\84¬ º\n¬à6r\9c\ 1»'\11\ 3æ\88éyÒÓ¥ÞZ\9dÒ\1aû4\a³dc|\ 2ZK
+¾pÖ\ 5\9cÅ\1c\bV\93Ââ\82\88O\1c¼Oéü\8a\f«·\89\ 1udCä2\81\8aEE\95Á?æR   ¼Í÷>ä[%\1c¹ËW\1c³îÔ¯\97*_Æ\ f\1eÚ/\9e\86õã@½\1d¥\ 6\15\12D\1d¬\\94UJÜõ\1e\9fîÄÄÍ\bq®ÛÎyé¥,ë×ó_JÅ7Ê\ fle
\ No newline at end of file
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452 b/support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452
new file mode 100644 (file)
index 0000000..1f2474b
Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/92/ef85be57d627f280d8ce3724452ac21c9a6452 differ
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001 b/support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001
new file mode 100644 (file)
index 0000000..fd22455
Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/cf/0f4f85d7a1237e377a2d25b996518a877ea001 differ
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482 b/support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482
new file mode 100644 (file)
index 0000000..15d80c7
Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/e2/2695cbf976fed1f543ad7486a531c0af473482 differ
diff --git a/support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc b/support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc
new file mode 100644 (file)
index 0000000..ee01041
Binary files /dev/null and b/support/testing/tests/download/git-remote/repo.git/objects/f6/476b879f65e956d7dedd5b08736369e9a24acc differ
diff --git a/support/testing/tests/download/git-remote/repo.git/refs/tags/mytag b/support/testing/tests/download/git-remote/repo.git/refs/tags/mytag
new file mode 100644 (file)
index 0000000..8c09448
--- /dev/null
@@ -0,0 +1 @@
+2b0e0d98a49c97da6a618ab36337e2058eb733a2
index 723f00d18855f1ed262526bb32aa4fcd17057fe0..2455557298ee877f1e1267f3d3814a5f28ef9de2 100644 (file)
@@ -68,7 +68,14 @@ class TestGitRefs(GitTestBase):
             self.check_download("git-wrong-sha1")
         self.check_download("git-partial-sha1-branch-head")
         self.check_download("git-partial-sha1-reachable-by-branch")
+        self.check_download("git-partial-sha1-reachable-by-tag")
+        self.check_download("git-partial-sha1-tag-itself")
+        self.check_download("git-partial-sha1-tag-points-to")
         self.check_download("git-sha1-branch-head")
         self.check_download("git-sha1-reachable-by-branch")
+        self.check_download("git-sha1-reachable-by-tag")
+        self.check_download("git-sha1-tag-itself")
+        self.check_download("git-sha1-tag-points-to")
         self.check_download("git-submodule-disabled")
         self.check_download("git-submodule-enabled")
+        self.check_download("git-tag")