tests/hghave.py
changeset 43699 21e05aabef8c
parent 43470 32ac4d0b4102
child 43819 e8a3bbffdc7d
--- a/tests/hghave.py	Thu Nov 14 22:31:21 2019 -0800
+++ b/tests/hghave.py	Tue Nov 12 17:47:42 2019 -0500
@@ -673,6 +673,13 @@
         return False
 
 
+@check("xz", "xz compression utility")
+def has_xz():
+    # When Windows invokes a subprocess in shell mode, it uses `cmd.exe`, which
+    # only knows `where`, not `which`.  So invoke MSYS shell explicitly.
+    return matchoutput("sh -c 'test -x \"`which xz`\"'", b'')
+
+
 @check("msys", "Windows with MSYS")
 def has_msys():
     return os.getenv('MSYSTEM')