mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
OSS jobs to tpx
Summary: Tpx works well for all OSS jobs, we should migrate to Tpx instead of relying testpilot. Reviewed By: marcelogomez Differential Revision: D27396539 fbshipit-source-id: dd1994be0eb3b4396764c1f3e68ddd6763b60139
This commit is contained in:
committed by
Facebook GitHub Bot
parent
50c5f27e05
commit
ab6a30c61c
@@ -668,11 +668,18 @@ if __name__ == "__main__":
|
|||||||
for test in data["tests"]:
|
for test in data["tests"]:
|
||||||
working_dir = get_property(test, "WORKING_DIRECTORY")
|
working_dir = get_property(test, "WORKING_DIRECTORY")
|
||||||
labels = []
|
labels = []
|
||||||
|
machine_suffix = self.build_opts.host_type.as_tuple_string()
|
||||||
|
labels.append("tpx_test_config::buildsystem=getdeps")
|
||||||
|
labels.append("tpx_test_config::platform={}".format(machine_suffix))
|
||||||
|
|
||||||
if get_property(test, "DISABLED"):
|
if get_property(test, "DISABLED"):
|
||||||
labels.append("disabled")
|
labels.append("disabled")
|
||||||
command = test["command"]
|
command = test["command"]
|
||||||
if working_dir:
|
if working_dir:
|
||||||
command = [cmake, "-E", "chdir", working_dir] + command
|
command = [cmake, "-E", "chdir", working_dir] + command
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
tests.append(
|
tests.append(
|
||||||
{
|
{
|
||||||
"type": "custom",
|
"type": "custom",
|
||||||
@@ -680,6 +687,10 @@ if __name__ == "__main__":
|
|||||||
% (self.manifest.name, test["name"], machine_suffix),
|
% (self.manifest.name, test["name"], machine_suffix),
|
||||||
"command": command,
|
"command": command,
|
||||||
"labels": labels,
|
"labels": labels,
|
||||||
|
"env": {},
|
||||||
|
"required_paths": [],
|
||||||
|
"contacts": [],
|
||||||
|
"cwd": os.getcwd(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return tests
|
return tests
|
||||||
@@ -689,36 +700,51 @@ if __name__ == "__main__":
|
|||||||
# better signals for flaky tests.
|
# better signals for flaky tests.
|
||||||
retry = 0
|
retry = 0
|
||||||
|
|
||||||
|
from sys import platform
|
||||||
|
|
||||||
testpilot = path_search(env, "testpilot")
|
testpilot = path_search(env, "testpilot")
|
||||||
if testpilot and not no_testpilot:
|
tpx = path_search(env, "tpx")
|
||||||
|
if (tpx or testpilot) and not no_testpilot:
|
||||||
buck_test_info = list_tests()
|
buck_test_info = list_tests()
|
||||||
|
import os
|
||||||
|
|
||||||
buck_test_info_name = os.path.join(self.build_dir, ".buck-test-info.json")
|
buck_test_info_name = os.path.join(self.build_dir, ".buck-test-info.json")
|
||||||
with open(buck_test_info_name, "w") as f:
|
with open(buck_test_info_name, "w") as f:
|
||||||
json.dump(buck_test_info, f)
|
json.dump(buck_test_info, f)
|
||||||
|
|
||||||
env.set("http_proxy", "")
|
env.set("http_proxy", "")
|
||||||
env.set("https_proxy", "")
|
env.set("https_proxy", "")
|
||||||
machine_suffix = self.build_opts.host_type.as_tuple_string()
|
|
||||||
|
|
||||||
runs = []
|
runs = []
|
||||||
|
from sys import platform
|
||||||
|
|
||||||
testpilot_args = [
|
if platform == "win32":
|
||||||
testpilot,
|
machine_suffix = self.build_opts.host_type.as_tuple_string()
|
||||||
# Need to force the repo type otherwise testpilot on windows
|
testpilot_args = [
|
||||||
# can be confused (presumably sparse profile related)
|
testpilot,
|
||||||
"--force-repo",
|
# Need to force the repo type otherwise testpilot on windows
|
||||||
"fbcode",
|
# can be confused (presumably sparse profile related)
|
||||||
"--force-repo-root",
|
"--force-repo",
|
||||||
self.build_opts.fbsource_dir,
|
"fbcode",
|
||||||
"--buck-test-info",
|
"--force-repo-root",
|
||||||
buck_test_info_name,
|
self.build_opts.fbsource_dir,
|
||||||
"--retry=%d" % retry,
|
"--buck-test-info",
|
||||||
"-j=%s" % str(self.build_opts.num_jobs),
|
buck_test_info_name,
|
||||||
"--test-config",
|
"--retry=%d" % retry,
|
||||||
"platform=%s" % machine_suffix,
|
"-j=%s" % str(self.build_opts.num_jobs),
|
||||||
"buildsystem=getdeps",
|
"--test-config",
|
||||||
"--print-long-results",
|
"platform=%s" % machine_suffix,
|
||||||
]
|
"buildsystem=getdeps",
|
||||||
|
"--print-long-results",
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
testpilot_args = [
|
||||||
|
tpx,
|
||||||
|
"--buck-test-info",
|
||||||
|
buck_test_info_name,
|
||||||
|
"--retry=%d" % retry,
|
||||||
|
"-j=%s" % str(self.build_opts.num_jobs),
|
||||||
|
"--print-long-results",
|
||||||
|
]
|
||||||
|
|
||||||
if owner:
|
if owner:
|
||||||
testpilot_args += ["--contacts", owner]
|
testpilot_args += ["--contacts", owner]
|
||||||
|
@@ -154,6 +154,10 @@ _path_search_cache = {}
|
|||||||
_not_found = object()
|
_not_found = object()
|
||||||
|
|
||||||
|
|
||||||
|
def tpx_path():
|
||||||
|
return "xplat/testinfra/tpx/ctp.tpx"
|
||||||
|
|
||||||
|
|
||||||
def path_search(env, exename, defval=None):
|
def path_search(env, exename, defval=None):
|
||||||
"""Search for exename in the PATH specified in env.
|
"""Search for exename in the PATH specified in env.
|
||||||
exename is eg: `ninja` and this function knows to append a .exe
|
exename is eg: `ninja` and this function knows to append a .exe
|
||||||
|
Reference in New Issue
Block a user