diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/remote-git.test | 20 | ||||
-rw-r--r-- | tests/rep-fetch.test | 7 |
2 files changed, 24 insertions, 3 deletions
diff --git a/tests/remote-git.test b/tests/remote-git.test index 24b31e4..5214b35 100644 --- a/tests/remote-git.test +++ b/tests/remote-git.test @@ -11,13 +11,29 @@ # contain repositories produced) are not cleaned up. # +# Check that git version is the minimum supported one (2.11.0) or above. +# ++git --version | set git_version_out + ++echo "$git_version_out" | sed -n -e 's/git version (\d+\.\d+\.\d+).*/\1/p' | \ + set git_version + ++if ("$git_version" == "") + exit "unable to obtain git version from '$git_version_out'" +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 + +git_supported = ($git_version_major > 2 || \ + $git_version_major == 2 && $git_version_minor >= 11) + # Output directory path that testscripts must use to prepare repositories # required by tests they contains. # out_git = $canonicalize([dir_path] $~/git/$cmd) -# If $remote is true then remote repositories locations must be used for -# tests. +# If $remote is true then remote repository locations must be used for tests. # remote = $config.bpkg.test.remote diff --git a/tests/rep-fetch.test b/tests/rep-fetch.test index f3732e6..3630709 100644 --- a/tests/rep-fetch.test +++ b/tests/rep-fetch.test @@ -163,7 +163,12 @@ $* 2>>/EOE != 0 : git-repos : -if ($remote != true) +if ($git_supported != true) +{ + # Skip git repository fetch tests. + # +} +elif ($remote != true) { git_protocol = 'local' .include rep-fetch-git.test |