diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-15 20:39:14 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-15 20:39:14 +0300 |
commit | f5fb552b85e14209a4ee3220b3bdfbcdec0d14bf (patch) | |
tree | c007dfa4caff53c857a6b1817b3c759280374fc5 /tests | |
parent | 3540731c987437dec05976b690f9971a9ff4ac08 (diff) |
Raise minimum supported git version to 2.11.0 from 2.1.4
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 |