1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-08 18:02:05 +03:00

test: create a testinfra run and pass it to tpx/testpilot

Reviewed By: danalex97

Differential Revision: D37196281

fbshipit-source-id: e23c2122711594f8baaa2999853351a3fcf6d559
This commit is contained in:
Xavier Deguillard
2022-06-16 12:24:36 -07:00
committed by Facebook GitHub Bot
parent 6c039a848e
commit 5f9415de2b

View File

@@ -822,6 +822,8 @@ if __name__ == "__main__":
buck_test_info = list_tests() buck_test_info = list_tests()
import os import os
from .facebook.testinfra import start_run
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)
@@ -831,6 +833,7 @@ if __name__ == "__main__":
runs = [] runs = []
from sys import platform from sys import platform
with start_run(env["FBSOURCE_HASH"]) as run_id:
if platform == "win32": if platform == "win32":
machine_suffix = self.build_opts.host_type.as_tuple_string() machine_suffix = self.build_opts.host_type.as_tuple_string()
testpilot_args = [ testpilot_args = [
@@ -869,6 +872,8 @@ if __name__ == "__main__":
testpilot_args.append("--env") testpilot_args.append("--env")
testpilot_args.extend(f"{key}={val}" for key, val in env.items()) testpilot_args.extend(f"{key}={val}" for key, val in env.items())
testpilot_args += ["--run-id", str(run_id)]
if test_filter: if test_filter:
testpilot_args += ["--", test_filter] testpilot_args += ["--", test_filter]