From f2569bd8b6cff7f17ae71035cc3d4e86b2fc0cc4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 20 Jun 2019 13:16:52 +0300 Subject: Adapt rep-fetch tests to full support of git versions prior to 2.14 --- tests/remote-git.testscript | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/remote-git.testscript') diff --git a/tests/remote-git.testscript b/tests/remote-git.testscript index 56c33b7..81e7c54 100644 --- a/tests/remote-git.testscript +++ b/tests/remote-git.testscript @@ -27,15 +27,11 @@ end +echo "$git_version" | sed -e 's/\d+\.(\d+).*/\1/' | set git_version_minor # These flags must be used by testscripts to decide if they should skip git -# repository-related tests. See bpkg/fetch-git.cxx for the functionality -# reduction details for partially supported git versions. +# repository-related tests. # git_supported = ($git_version_major > 2 || \ $git_version_major == 2 && $git_version_minor >= 11) -git_fully_supported = ($git_version_major > 2 || \ - $git_version_major == 2 && $git_version_minor >= 14) - # Output directory path that testscripts must use to prepare repositories # required by tests they contain. # @@ -66,6 +62,15 @@ else rep_git_git = "git://git.build2.org/testing/bpkg/advonly/$cmd" rep_git_ssh = "ssh://git.build2.org/var/scm/testing/bpkg/advonly/$cmd" + # Note that we assume the git and ssh protocols as smart and never as unadv + # (see fetch-git.cxx for details). However, git may behave differently + # depending on the server setup (due to bugs, etc). That's why we test + # against different server configurations to make sure that nothing falls + # apart. + # + rep_git_git_unadv = "git://git.build2.org/testing/bpkg/unadv/$cmd" + rep_git_ssh_unadv = "ssh://git.build2.org/var/scm/testing/bpkg/unadv/$cmd" + rep_git = $rep_git_https_dumb # Default remote repository URL. end -- cgit v1.1