Patchwork [2,of,4] hghave: add test for whether fsmonitor is enabled

login
register
mail settings
Submitter Siddharth Agarwal
Date June 10, 2017, 9:10 p.m.
Message ID <a69ae05fa66239c2aecb.1497129020@devvm31800.prn1.facebook.com>
Download mbox | patch
Permalink /patch/21320/
State Accepted
Headers show

Comments

Siddharth Agarwal - June 10, 2017, 9:10 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1497128851 25200
#      Sat Jun 10 14:07:31 2017 -0700
# Node ID a69ae05fa66239c2aecb3673115de82105c8e9c6
# Parent  af12ded5040ae8b5becf5c354aafe19949d93444
hghave: add test for whether fsmonitor is enabled

This uses the HGFSMONITOR_TESTS environment variable that
fsmonitor-run-tests.py adds.

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -643,3 +643,7 @@  def has_virtualenv():
         return True
     except ImportError:
         return False
+
+@check("fsmonitor", "running tests with fsmonitor")
+def has_fsmonitor():
+    return 'HGFSMONITOR_TESTS' in os.environ