diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 11:38:34 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-04 11:38:34 -0400 |
commit | 0d665475aca1bb847749dce7cc415aefcf238e87 (patch) | |
tree | 2348550fad6ce022d379ebae853f5cc01ad84baf | |
parent | 2d6f0a291f310b6ece9cc9e434ab7d1ff3e8cdfe (diff) | |
download | buildstream-0d665475aca1bb847749dce7cc415aefcf238e87.tar.gz |
testutis/site.py: A location for checking the presense of host features
-rw-r--r-- | tests/testutils/site.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/testutils/site.py b/tests/testutils/site.py new file mode 100644 index 000000000..048af0596 --- /dev/null +++ b/tests/testutils/site.py @@ -0,0 +1,22 @@ +# Some things resolved about the execution site, +# so we dont have to repeat this everywhere +# +from buildstream import exceptions, utils + +try: + utils.get_host_tool('bzr') + HAVE_BZR = True +except exceptions.ProgramNotFoundError: + HAVE_BZR = False + +try: + utils.get_host_tool('git') + HAVE_GIT = True +except exceptions.ProgramNotFoundError: + HAVE_GIT = False + +try: + utils.get_host_tool('ostree') + HAVE_OSTREE_CLI = True +except exceptions.ProgramNotFoundError: + HAVE_OSTREE_CLI = False |