From 3b90a21b809a26dd6bf23b125e7f6fb955c6de09 Mon Sep 17 00:00:00 2001 From: Benjy Weinberger Date: Sun, 2 Apr 2023 09:56:36 -0500 Subject: [PATCH] Fix race condition in tailor test --- src/python/pants/core/goals/tailor_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/python/pants/core/goals/tailor_test.py b/src/python/pants/core/goals/tailor_test.py index c4c47ba1ac8..7b43a1ed3f2 100644 --- a/src/python/pants/core/goals/tailor_test.py +++ b/src/python/pants/core/goals/tailor_test.py @@ -428,8 +428,12 @@ def test_tailor_rule_write_mode(rule_runner: RuleRunner) -> None: "conflict/BUILD": "fortran_library(sources=['f1.f90'])", } ) + # Ensure the test invocation of Pants doesn't restart itself after it writes the tailored files, + # and then chokes on the invalid BUILD symbol. result = rule_runner.run_goal_rule( - TailorGoal, args=["--alias-mapping={'fortran_library': 'my_fortran_lib'}", "::"] + TailorGoal, + global_args=["--no-watch-filesystem", "--no-pantsd"], + args=["--tailor-alias-mapping={'fortran_library': 'my_fortran_lib'}", "::"], ) assert result.exit_code == 0 assert result.stdout == dedent(