run-tests: use a shorter watchman sock dir

Summary:
When running all tests with watchman, I noticed there are other tests that fail
with the sock path length limit. So let's just pick a shorter path in
run-tests.py.

Remove `#require no-fsmonitor` that is no longer necessary.

Reviewed By: phillco

Differential Revision: D8844485

fbshipit-source-id: 2d3c40bf33868c65517adf98d6c1e8b4cb46697a
This commit is contained in:
Jun Wu 2018-07-13 17:15:58 -07:00 committed by Facebook Github Bot
parent 1b2b294b18
commit 4ce060d4c7
2 changed files with 5 additions and 6 deletions

View File

@ -50,6 +50,7 @@ import collections
import difflib
import distutils.version as version
import errno
import hashlib
import json
import multiprocessing
import os
@ -994,7 +995,10 @@ class Test(unittest.TestCase):
os.mkdir(self._chgsockdir)
if self._watchman:
self._watchmandir = os.path.join(self._threadtmp, b"%s.watchman" % name)
shortname = hashlib.sha1(b"%s" % name).hexdigest()[:6]
self._watchmandir = os.path.join(
self._threadtmp, b"%s.watchman" % shortname
)
os.mkdir(self._watchmandir)
cfgfile = os.path.join(self._watchmandir, b"config.json")

View File

@ -1,8 +1,3 @@
#require no-fsmonitor
Disabled fsmonitor test since watchman sock path exceeds limit:
AssertionError: /tmp/hgtests.8M8JR4/child3/test-fb-hgext-treemanifest-prefetch.t-remotefilelog.true.shallowrepo.true.watchman/sock: path is too long
There are three cases which are of interest in this test:
- client remotefilelog enabled and the client repo is a shallowrepo