aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/remote-git.testscript10
-rw-r--r--tests/rep-fetch-git-commit.testscript3
-rw-r--r--tests/rep-fetch-git-refname.testscript1
3 files changed, 11 insertions, 3 deletions
diff --git a/tests/remote-git.testscript b/tests/remote-git.testscript
index 2ce0fa0..595220d 100644
--- a/tests/remote-git.testscript
+++ b/tests/remote-git.testscript
@@ -26,11 +26,15 @@ end
+echo "$git_version" | sed -e 's/(\d+).*/\1/' | set git_version_major
+echo "$git_version" | sed -e 's/\d+\.(\d+).*/\1/' | set git_version_minor
-# This flag must be used by testscripts to decide if they should skip git
-# repository-related tests.
+# 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.
#
git_supported = ($git_version_major > 2 || \
- $git_version_major == 2 && $git_version_minor >= 14)
+ $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.
diff --git a/tests/rep-fetch-git-commit.testscript b/tests/rep-fetch-git-commit.testscript
index ff6c7a3..f5aa685 100644
--- a/tests/rep-fetch-git-commit.testscript
+++ b/tests/rep-fetch-git-commit.testscript
@@ -6,6 +6,7 @@
: unadvertised
:
+if ($git_fully_supported || $git_protocol != 'https-smart-unadv')
{
+git -C ../style-basic log '--pretty=format:%H' --all --grep='README' | \
set commit
@@ -72,6 +73,7 @@
%fetching git:.+style-basic#@$commit%
%querying .+style-basic\.git%?
%fetching from .+style-basic.\git%
+ %querying .+style-basic\.git%?
$warn
1 package\(s\) in 1 repository\(s\)
EOE
@@ -86,6 +88,7 @@
%fetching git:.+style-basic#stable@$commit%
%querying .+style-basic\.git%?
%fetching from .+style-basic\.git%
+ %querying .+style-basic\.git%?
$warn
1 package\(s\) in 1 repository\(s\)
EOE
diff --git a/tests/rep-fetch-git-refname.testscript b/tests/rep-fetch-git-refname.testscript
index fe5b330..88f1e2a 100644
--- a/tests/rep-fetch-git-refname.testscript
+++ b/tests/rep-fetch-git-refname.testscript
@@ -39,6 +39,7 @@
: changed
:
+ if ($git_fully_supported || $git_protocol != 'https-smart-unadv')
{
g = git -C
u = "$rep_git/state1"