Skip to content

Commit

Permalink
cmake: kill testpilot on Windows
Browse files Browse the repository at this point in the history
Summary:
TPX is now available on Windows, the testpilot code is thus no longer
necessary.

Reviewed By: fanzeyi

Differential Revision: D37476157

fbshipit-source-id: 885881de2e06eab4990c6c96dcef8f51614a17f5
  • Loading branch information
xavierd authored and facebook-github-bot committed Jul 7, 2022
1 parent e42ef73 commit 203bc69
Showing 1 changed file with 12 additions and 35 deletions.
47 changes: 12 additions & 35 deletions build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,8 @@ def list_tests():
# better signals for flaky tests.
retry = 0

testpilot = path_search(env, "testpilot")
# TODO(xavierd): once tpx is really available on Windows, remove this.
tpx = path_search(env, "tpx") if sys.platform != "win32" else None
if (tpx or testpilot) and not no_testpilot:
tpx = path_search(env, "tpx")
if tpx and not no_testpilot:
buck_test_info = list_tests()
import os

Expand All @@ -835,41 +833,20 @@ def list_tests():
from sys import platform

with start_run(env["FBSOURCE_HASH"]) as run_id:
if platform == "win32":
machine_suffix = self.build_opts.host_type.as_tuple_string()
testpilot_args = [
"parexec-testinfra.exe",
"C:/tools/testpilot/sc_testpilot.par",
# Need to force the repo type otherwise testpilot on windows
# can be confused (presumably sparse profile related)
"--force-repo",
"fbcode",
"--force-repo-root",
self.build_opts.fbsource_dir,
"--buck-test-info",
buck_test_info_name,
"--retry=%d" % retry,
"-j=%s" % str(self.num_jobs),
"--test-config",
"platform=%s" % machine_suffix,
"buildsystem=getdeps",
"--return-nonzero-on-failures",
]
else:
testpilot_args = [
tpx,
"--force-local-execution",
"--buck-test-info",
buck_test_info_name,
"--retry=%d" % retry,
"-j=%s" % str(self.num_jobs),
"--print-long-results",
]
testpilot_args = [
tpx,
"--force-local-execution",
"--buck-test-info",
buck_test_info_name,
"--retry=%d" % retry,
"-j=%s" % str(self.num_jobs),
"--print-long-results",
]

if owner:
testpilot_args += ["--contacts", owner]

if tpx and env:
if env:
testpilot_args.append("--env")
testpilot_args.extend(f"{key}={val}" for key, val in env.items())

Expand Down

0 comments on commit 203bc69

Please sign in to comment.