mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 08:02:24 +03:00
467f4aef45
Summary: Ran ./run-tests.py --json and used the following script: import json import subprocess with open("report.json", "r") as f: tests = json.load(f) for name, t in tests.items(): if t["result"] == "success": print("%s successful" % name) subprocess.run("sed -i '/#require py2/d' %s" % name, shell=True) subprocess.run("sed -i '/require.*py2/d' %s" % name, shell=True) Reviewed By: singhsrb Differential Revision: D19664298 fbshipit-source-id: fa67c7c7abd110c9f0df9345daf09f2792aacd44
28 lines
835 B
Python
28 lines
835 B
Python
# Copyright 2019 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
import os
|
|
import re
|
|
|
|
from hghave import require
|
|
|
|
|
|
def checkpath(path, dllnames):
|
|
content = open(path).read()
|
|
for name in dllnames:
|
|
for matched in sorted(set(re.findall(r"%s\.[^(.]*\(" % name, content))):
|
|
# remove tailing "("
|
|
funcname = matched[:-1]
|
|
for expected in ["%s.argtypes" % funcname, "%s.restype" % funcname]:
|
|
if expected not in content:
|
|
print("%s needs explicit argtypes and restype" % funcname)
|
|
break
|
|
|
|
|
|
checkpath(
|
|
"%s/../edenscm/mercurial/win32.py" % os.environ.get("RUNTESTDIR", "."),
|
|
["_kernel32", "_advapi32", "_user32", "_crypt32"],
|
|
)
|