aboutsummaryrefslogtreecommitdiff
path: root/tests/common.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-08-14 19:28:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-08-14 19:28:54 +0300
commit8e5f53fd249f08b0be0a7d4eec65f425cfb79eae (patch)
tree247b5321b3fda46c390525fab1cc194e64c20ddb /tests/common.test
parentfc9dbf81953ebe3b0757638671eb31787f4f387d (diff)
Adapt to git_version() returning semantic_version now
Diffstat (limited to 'tests/common.test')
-rw-r--r--tests/common.test13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/common.test b/tests/common.test
index f532d76..80d37d3 100644
--- a/tests/common.test
+++ b/tests/common.test
@@ -30,13 +30,10 @@ 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 or adjust bdep commands. Note that specific command
-# tests may still adjust this flag to express the higher requirements for the
-# minimum supported git version.
-#
-git_supported = ($git_version_major > 2 || \
- $git_version_major == 2 && $git_version_minor >= 1)
++if! ($git_version_major > 2 || \
+ $git_version_major == 2 && $git_version_minor >= 1)
+ exit "minimum supported git version is 2.1"
+end
# Helper commands that can be used by tests to prepare the testing environment
# or validate an outcome of the command being tested. They are likely to get
@@ -50,7 +47,7 @@ clean = $* clean
deinit = $* deinit
init = $* init
fetch = $* fetch
-new = $* new --no-checks --vcs ($git_supported ? git : none)
+new = $* new --no-checks
status = $* status
sync = $* sync
update = $* update