aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2014-08-05 17:28:12 -0500
committerAndy Doan <andy.doan@linaro.org>2014-08-05 17:28:12 -0500
commit92e3a3cc1ac91708b109a79d32497c8381eac5da (patch)
tree47c228d9759d5212a4686f395ef3d74bed87cc53 /tests
parent8ce1b19702e0f4c4949c8b7a60364f589d1aeab8 (diff)
bug #322: fix version information for snapshots2014.07.2
There were 2 issues: 1) ensure git is run from the proper directory 2) ensure we can parse git-log returns for both Trusty and Precise Change-Id: I9d7b59742e4e82f668de5bc57070ef9f8d4f198d
Diffstat (limited to 'tests')
-rw-r--r--tests/test_version.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_version.py b/tests/test_version.py
index af0ef1e..0fc050b 100644
--- a/tests/test_version.py
+++ b/tests/test_version.py
@@ -28,6 +28,11 @@ class TestVersion(unittest.TestCase):
self.subprocess.return_value = 'fakehash (HEAD, tag: 2014.07.02, refs'
self.assertEquals('2014.07.02', version._get_version())
+ def test_precise_tag(self):
+ # older git versions on precise don't include "tag:" in the git-log
+ self.subprocess.return_value = 'fakehash (HEAD, 2014.07.2, origin'
+ self.assertEquals('2014.07.2', version._get_version())
+
def test_invalid_tag(self):
self.subprocess.return_value = 'fakehash (HEAD, tag: aaaa.bb, refs'
self.assertEquals('fakehash', version._get_version())