mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
9266779248
Summary: Simple tools, based on D19664298, that use the JSON report to enable py2 only tests for py3 testing, and revert the changes to those tests that fail. update-successes.py is just xavierd's original code Use as needed to enable tests on py3 after debugging, A recommended workflow is in the test plan Reviewed By: singhsrb Differential Revision: D19670838 fbshipit-source-id: fc525941cb010c9038c1f73d89913420e0c79981
19 lines
579 B
Python
Executable File
19 lines
579 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2.
|
|
|
|
import json
|
|
import subprocess
|
|
|
|
|
|
with open("report.json", "r") as f:
|
|
tests = json.load(f)
|
|
for name, t in tests.items():
|
|
name = name.split(" ")[0]
|
|
if t["result"] == "skip":
|
|
print("%s skipped" % name)
|
|
subprocess.run("sed -i '/#require py2/d' %s" % name, shell=True)
|
|
subprocess.run("sed -i '/require.*py2/d' %s" % name, shell=True)
|