aboutsummaryrefslogtreecommitdiff
path: root/tests/remote-git.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-02-15 20:39:14 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-02-15 20:39:14 +0300
commitf5fb552b85e14209a4ee3220b3bdfbcdec0d14bf (patch)
treec007dfa4caff53c857a6b1817b3c759280374fc5 /tests/remote-git.test
parent3540731c987437dec05976b690f9971a9ff4ac08 (diff)
Raise minimum supported git version to 2.11.0 from 2.1.4
Diffstat (limited to 'tests/remote-git.test')
-rw-r--r--tests/remote-git.test20
1 files changed, 18 insertions, 2 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