Skip to content

Commit

Permalink
fix test execution when building OSS repo with tpx on path
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookincubator/fizz#160

X-link: facebookincubator/zstrong#1192

Fix case when testing a github repo checkout, wth tpx on path, where --no-testpilot not specified.

As workaround before this lands, if in this situation pass --no-testpilot

Reviewed By: bigfootjon

Differential Revision: D69852662

fbshipit-source-id: 5065cdf3acae3bc9c90df89ed96eab3fc3e19906
  • Loading branch information
ahornby authored and facebook-github-bot committed Feb 19, 2025
1 parent c98552d commit 5bc875b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,13 +979,19 @@ def list_tests():
# better signals for flaky tests.
retry = 0

tpx = path_search(env, "tpx")
tpx = None
try:
from .facebook.testinfra import start_run

tpx = path_search(env, "tpx")
except ImportError:
# internal testinfra not available
pass

if tpx and not no_testpilot:
buck_test_info = list_tests()
import os

from .facebook.testinfra import start_run

buck_test_info_name = os.path.join(self.build_dir, ".buck-test-info.json")
with open(buck_test_info_name, "w") as f:
json.dump(buck_test_info, f)
Expand Down

0 comments on commit 5bc875b

Please sign in to comment.