changeset 29026:80f15aa32edd stable

hghave: add check for OS X packaging tools
author Augie Fackler <augie@google.com>
date Wed, 27 Apr 2016 11:45:55 -0400
parents f2549b0ba9ab
children db5084d27df5
files tests/hghave.py
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Mon Apr 18 23:59:55 2016 -0400
+++ b/tests/hghave.py	Wed Apr 27 11:45:55 2016 -0400
@@ -464,6 +464,19 @@
     except ImportError:
         return False
 
+@check("osxpackaging", "OS X packaging tools")
+def has_osxpackaging():
+    try:
+        return (matchoutput('pkgbuild', 'Usage: pkgbuild ', ignorestatus=1)
+                and matchoutput(
+                    'productbuild', 'Usage: productbuild ',
+                    ignorestatus=1)
+                and matchoutput('lsbom', 'Usage: lsbom', ignorestatus=1)
+                and matchoutput(
+                    'xar --help', 'Usage: xar', ignorestatus=1))
+    except ImportError:
+        return False
+
 @check("docker", "docker support")
 def has_docker():
     pat = r'A self-sufficient runtime for'