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

fix test execution when building OSS repo with tpx on path

Summary:
X-link: https://github.com/facebookincubator/fizz/pull/160

X-link: https://github.com/facebookincubator/zstrong/pull/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
This commit is contained in:
Alex Hornby
2025-02-19 13:18:31 -08:00
committed by Facebook GitHub Bot
parent 25e4aadad8
commit a80dc2ea5e

View File

@@ -979,13 +979,19 @@ if __name__ == "__main__":
# 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)