tests.core.test_timezone.TestGlibcNonDefaultLimitedTimezone: *runtime_test
tests.core.test_timezone.TestNoTimezone: *runtime_test
tests.download.test_git.TestGitHash: *runtime_test
+tests.download.test_git.TestGitRefs: *runtime_test
tests.fs.test_ext.TestExt2: *runtime_test
tests.fs.test_ext.TestExt2r1: *runtime_test
tests.fs.test_ext.TestExt3: *runtime_test
--- /dev/null
+name: GIT_REFS
--- /dev/null
+include $(sort $(wildcard $(BR2_EXTERNAL_GIT_REFS_PATH)/package/*/*.mk))
+
+# Get the git server port number from the test infra
+GITREMOTE_PORT_NUMBER ?= 9418
--- /dev/null
+ sha256 04715901977503d1df650e0959f4d31d8e7b105e2ac99a2182e0652b8f13baa1 git-wrong-content-a238b1dfcd825d47d834af3c5223417c8411d90d.tar.gz
+ sha256 0000000000000000000000000000000000000000000000000000000000000000 file
--- /dev/null
+################################################################################
+#
+# git-wrong-content
+#
+################################################################################
+
+GIT_WRONG_CONTENT_VERSION = a238b1dfcd825d47d834af3c5223417c8411d90d
+GIT_WRONG_CONTENT_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_WRONG_CONTENT_LICENSE_FILES = file
+
+$(eval $(generic-package))
--- /dev/null
+################################################################################
+#
+# git-wrong-sha1
+#
+################################################################################
+
+GIT_WRONG_SHA1_VERSION = 0000000000000000000000000000000000000000
+GIT_WRONG_SHA1_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git
+GIT_WRONG_SHA1_LICENSE_FILES = file
+
+$(eval $(generic-package))
"{}-source".format(package)],
env)
+ def check_download(self, package):
+ # store downloaded tarball inside the output dir so the test infra
+ # cleans it up at the end
+ env = {"BR2_DL_DIR": os.path.join(self.builddir, "dl"),
+ "GITREMOTE_PORT_NUMBER": str(self.gitremote.port)}
+ self.b.build(["{}-dirclean".format(package),
+ "{}-legal-info".format(package)],
+ env)
+
class TestGitHash(GitTestBase):
br2_external = [infra.filepath("tests/download/br2-external/git-hash")]
self.check_hash("bad")
self.check_hash("good")
self.check_hash("nohash")
+
+
+class TestGitRefs(GitTestBase):
+ br2_external = [infra.filepath("tests/download/br2-external/git-refs")]
+
+ def test_run(self):
+ with self.assertRaises(SystemError):
+ self.check_download("git-wrong-content")
+ with self.assertRaises(SystemError):
+ self.check_download("git-wrong-sha1")