Mercurial > hg-stable
diff tests/hghave.py @ 35160:a2e927ded455
hghave: add a check for lfs-test-server
This is consistent with how the other tests require a feature.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 14 Nov 2017 22:35:42 -0500 |
parents | 5d4369079c86 |
children | 67cead0eb671 |
line wrap: on
line diff
--- a/tests/hghave.py Tue Nov 21 20:28:57 2017 +0800 +++ b/tests/hghave.py Tue Nov 14 22:35:42 2017 -0500 @@ -284,6 +284,17 @@ return (0, 0) return (int(m.group(1)), int(m.group(2))) +# https://github.com/git-lfs/lfs-test-server +@check("lfs-test-server", "git-lfs test server") +def has_lfsserver(): + exe = 'lfs-test-server' + if has_windows(): + exe = 'lfs-test-server.exe' + return any( + os.access(os.path.join(path, exe), os.X_OK) + for path in os.environ["PATH"].split(os.pathsep) + ) + @checkvers("git", "git client (with ext::sh support) version >= %s", (1.9,)) def has_git_range(v): major, minor = v.split('.')[0:2]