summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-03-01 13:57:45 +0100
committerFabian Groffen <grobian@gentoo.org>2018-03-01 13:57:45 +0100
commitf41c147c266066d118587af930e8518203ed355b (patch)
tree80e3066f76571a49cc8f766cb4d4febd771b3266
parentscripts/rsync-generation/hashgen: return when write_hashes would produce garbage (diff)
downloadprefix-f41c147c266066d118587af930e8518203ed355b.tar.gz
prefix-f41c147c266066d118587af930e8518203ed355b.tar.bz2
prefix-f41c147c266066d118587af930e8518203ed355b.zip
scripts/rsync-generation: add initial tests for hashverify
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/Manifest2
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gzbin0 -> 437 bytes
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gzbin0 -> 231 bytes
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest6
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml10
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild16
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild18
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild16
-rw-r--r--scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file1
9 files changed, 69 insertions, 0 deletions
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/Manifest b/scripts/rsync-generation/tests/hashverify/simpletree/Manifest
new file mode 100644
index 0000000000..58c61a8625
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/Manifest
@@ -0,0 +1,2 @@
+MANIFEST Manifest.files.gz 437 BLAKE2B 32dd239c7cc855c08a02c50b07970cc4df0af1a40e4be3c69c05d36e97ec8b611a45f2fdc773450fecd4d22253122f3978080cea595247e7891b66688ac45668 SHA512 85036ad84f245f8137591223c0db936ab80a21c363e06dae63e6e0f1f2c78715a733abc55b9707a89df39481dedcddd3887f66fd59d4ce8dcdf5e8ccf3c2a267
+TIMESTAMP 2018-03-01T10:58:37Z
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gz b/scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gz
new file mode 100644
index 0000000000..09eadcad7b
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/Manifest.files.gz
Binary files differ
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gz b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gz
new file mode 100644
index 0000000000..9bc47b288a
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/Manifest.gz
Binary files differ
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest
new file mode 100644
index 0000000000..da5accb70b
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/Manifest
@@ -0,0 +1,6 @@
+DIST foo 12 bar
+EBUILD mypackage-0.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61
+EBUILD mypackage-1.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61
+EBUILD mypackage-2.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61
+EBUILD mypackage-3.ebuild 237 BLAKE2B 2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3 SHA512 b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61
+MISC metadata.xml 297 BLAKE2B 14dd1b26d504485cb920cf01ddb68fe36a3f4646c7283b01697363680a0c56520cc28f1ad3df4f41a7dba532e08e66321fe89a309f43feeeafc65ef1f7617c8e SHA512 4b07eaacba80c46a68348ecc95c67b821d5e23ef5f6e7a0dec89f1a380d5562fc50d65d9fb09fe2c3079b4ca16ed6a9774668aabb93a56a9d8864f5de53aac57
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml
new file mode 100644
index 0000000000..33b480e2ec
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild
new file mode 100644
index 0000000000..708fc58efb
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-0.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION=""
+HOMEPAGE=""
+SRC_URI=""
+
+LICENSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild
new file mode 100644
index 0000000000..a4388abd8e
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#filesize mismatch
+
+EAPI=6
+
+DESCRIPTION=""
+HOMEPAGE=""
+SRC_URI=""
+
+LICENSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild
new file mode 100644
index 0000000000..38bbcfc4e4
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/mypackage-2.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+HASH_MISMATCH_
+HOMEPAGE=""
+SRC_URI=""
+
+LICENSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
diff --git a/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file
new file mode 100644
index 0000000000..257cc5642c
--- /dev/null
+++ b/scripts/rsync-generation/tests/hashverify/simpletree/my-cat/mypackage/unrecorded-file
@@ -0,0 +1 @@
+foo