tests/fsmonitor-run-tests.py
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
Tue, 02 Jul 2019 12:59:58 -0400
changeset 42621 99ebde4fec99
parent 40208 b7ba1cfba174
child 43076 2372284d9457
permissions -rwxr-xr-x
commit: improve the files field of changelog for merges Currently, the files list of merge commits repeats all the deletions (either actual deletions, or files that got renamed) that happened between base and p2 of the merge. If p2 is the main branch, the list can easily be much bigger than the change being merged. This results in various problems worth improving: - changelog is bigger than necessary - `hg log directory` lists many unrelated merge commits, and `hg log -v -r commit` frequently fills multiple screens worth of files - it possibly slows down adjustlinkrev, by forcing it to read more manifests, and that function can certainly be a bottleneck - the server side of pulls can waste a lot of time simply opening the filelogs for pointless files (the constant factors for opening even a tiny filelog is apparently pretty bad) So stop listing such files as described in the code. Impacted merge commits and their descendants get a different hash than they would have without this. This doesn't seem problematic, except for convert. The previous commit helped with that in the hg->hg case (but if you do svn->hg twice from scratch, hashes can still change). The rest of the description is numbers. I don't have much to report, because recreating the files list of existing repositories is not easy: - debugupgradeformat and bundle/unbundle don't recreate the list - export/import tends to choke quickly applying patches or on description that contain diffs, - merge commits from the convert extension don't have the right files list for reasons orthogonal to the current commit - replaying the merge with hg update/hg merge/hg revert --all/hg commit can end up failing in hg revert - I wasn't sure that using debugsetparents + debugrebuilddirstate would really build the right thing I measured commit time before and after this change, in a case with no files filtered out, several files filtered out (no difference) and 5k files filtered out (+1% time). Recreating the 100 more recent merges in a private repo, the concatenated uncompressed files lists goes from 1.12MB to 0.52MB. Excluding 3 merges that are not representative, then the size goes from 570k to 15k. I converted part of mozilla-central, and observed file list shrinking quite a bit too, starting at the very first merge, 733641d9feaf, going from 550 files to 10 files (although they have relatively few merges, so they probably wouldn't care). Differential Revision: https://phab.mercurial-scm.org/D6613
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32769
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     1
#!/usr/bin/env python
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     2
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     3
# fsmonitor-run-tests.py - Run Mercurial tests with fsmonitor enabled
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     4
#
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     5
# Copyright 2017 Facebook, Inc.
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     6
#
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     7
# This software may be used and distributed according to the terms of the
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     8
# GNU General Public License version 2 or any later version.
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     9
#
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    10
# This is a wrapper around run-tests.py that spins up an isolated instance of
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    11
# Watchman and runs the Mercurial tests against it. This ensures that the global
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    12
# version of Watchman isn't affected by anything this test does.
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    13
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    14
from __future__ import absolute_import
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    15
from __future__ import print_function
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    16
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    17
import argparse
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    18
import contextlib
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    19
import json
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    20
import os
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    21
import shutil
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    22
import subprocess
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    23
import sys
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    24
import tempfile
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    25
import uuid
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    26
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    27
osenvironb = getattr(os, 'environb', os.environ)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    28
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    29
if sys.version_info > (3, 5, 0):
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    30
    PYTHON3 = True
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    31
    xrange = range # we use xrange in one place, and we'd rather not use range
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    32
    def _bytespath(p):
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    33
        return p.encode('utf-8')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    34
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    35
elif sys.version_info >= (3, 0, 0):
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    36
    print('%s is only supported on Python 3.5+ and 2.7, not %s' %
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    37
          (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3])))
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    38
    sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    39
else:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    40
    PYTHON3 = False
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    41
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    42
    # In python 2.x, path operations are generally done using
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    43
    # bytestrings by default, so we don't have to do any extra
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    44
    # fiddling there. We define the wrapper functions anyway just to
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    45
    # help keep code consistent between platforms.
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    46
    def _bytespath(p):
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    47
        return p
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    48
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    49
def getparser():
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    50
    """Obtain the argument parser used by the CLI."""
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    51
    parser = argparse.ArgumentParser(
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    52
        description='Run tests with fsmonitor enabled.',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    53
        epilog='Unrecognized options are passed to run-tests.py.')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    54
    # - keep these sorted
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    55
    # - none of these options should conflict with any in run-tests.py
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    56
    parser.add_argument('--keep-fsmonitor-tmpdir', action='store_true',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    57
        help='keep temporary directory with fsmonitor state')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    58
    parser.add_argument('--watchman',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    59
        help='location of watchman binary (default: watchman in PATH)',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    60
        default='watchman')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    61
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    62
    return parser
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    63
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    64
@contextlib.contextmanager
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    65
def watchman(args):
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    66
    basedir = tempfile.mkdtemp(prefix='hg-fsmonitor')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    67
    try:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    68
        # Much of this configuration is borrowed from Watchman's test harness.
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    69
        cfgfile = os.path.join(basedir, 'config.json')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    70
        # TODO: allow setting a config
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    71
        with open(cfgfile, 'w') as f:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    72
            f.write(json.dumps({}))
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    73
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    74
        logfile = os.path.join(basedir, 'log')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    75
        clilogfile = os.path.join(basedir, 'cli-log')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    76
        if os.name == 'nt':
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    77
            sockfile = '\\\\.\\pipe\\watchman-test-%s' % uuid.uuid4().hex
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    78
        else:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    79
            sockfile = os.path.join(basedir, 'sock')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    80
        pidfile = os.path.join(basedir, 'pid')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    81
        statefile = os.path.join(basedir, 'state')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    82
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    83
        argv = [
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    84
            args.watchman,
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    85
            '--sockname', sockfile,
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    86
            '--logfile', logfile,
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    87
            '--pidfile', pidfile,
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    88
            '--statefile', statefile,
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    89
            '--foreground',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    90
            '--log-level=2', # debug logging for watchman
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    91
        ]
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    92
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    93
        envb = osenvironb.copy()
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    94
        envb[b'WATCHMAN_CONFIG_FILE'] = _bytespath(cfgfile)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    95
        with open(clilogfile, 'wb') as f:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    96
            proc = subprocess.Popen(
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    97
                argv, env=envb, stdin=None, stdout=f, stderr=f)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    98
            try:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    99
                yield sockfile
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   100
            finally:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   101
                proc.terminate()
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   102
                proc.kill()
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   103
    finally:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   104
        if args.keep_fsmonitor_tmpdir:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   105
            print('fsmonitor dir available at %s' % basedir)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   106
        else:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   107
            shutil.rmtree(basedir, ignore_errors=True)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   108
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   109
def run():
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   110
    parser = getparser()
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   111
    args, runtestsargv = parser.parse_known_args()
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   112
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   113
    with watchman(args) as sockfile:
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   114
        osenvironb[b'WATCHMAN_SOCK'] = _bytespath(sockfile)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   115
        # Indicate to hghave that we're running with fsmonitor enabled.
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   116
        osenvironb[b'HGFSMONITOR_TESTS'] = b'1'
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   117
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   118
        runtestdir = os.path.dirname(__file__)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   119
        runtests = os.path.join(runtestdir, 'run-tests.py')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   120
        blacklist = os.path.join(runtestdir, 'blacklists', 'fsmonitor')
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   121
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   122
        runtestsargv.insert(0, runtests)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   123
        runtestsargv.extend([
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   124
            '--extra-config',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   125
            'extensions.fsmonitor=',
40208
b7ba1cfba174 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32769
diff changeset
   126
            # specify fsmonitor.mode=paranoid always in order to force
b7ba1cfba174 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32769
diff changeset
   127
            # fsmonitor extension execute "paranoid" code path
b7ba1cfba174 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32769
diff changeset
   128
            #
b7ba1cfba174 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32769
diff changeset
   129
            # TODO: make fsmonitor-run-tests.py accept specific options
b7ba1cfba174 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32769
diff changeset
   130
            '--extra-config',
b7ba1cfba174 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 32769
diff changeset
   131
            'fsmonitor.mode=paranoid',
32769
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   132
            '--blacklist',
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   133
            blacklist,
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   134
        ])
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   135
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   136
        return subprocess.call(runtestsargv)
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   137
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   138
if __name__ == '__main__':
efd6e941e933 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
   139
    sys.exit(run())