diff --git a/test/BUILD b/test/BUILD index 9993cb6924..55c77bda7c 100644 --- a/test/BUILD +++ b/test/BUILD @@ -307,16 +307,6 @@ plz_e2e_test( expected_output = "query_alltargets_2.txt", ) -plz_e2e_test( - name = "cyclic_dependency_test", - timeout = 30, - cmd = "plz test //plz-out/tmp/test/cyclic_dependency_test._test/run_1/test/cycle:all", - data = ["cycle/TEST_BUILD"], - expect_output_contains = "Dependency cycle found", - expected_failure = True, - pre_cmd = "mv test/cycle/TEST_BUILD test/cycle/BUILD", -) - # Used manually for testing the test flakiness stuff. python_test( name = "flaky_test", diff --git a/test/cyclic_dependency/BUILD b/test/cyclic_dependency/BUILD new file mode 100644 index 0000000000..0232914b08 --- /dev/null +++ b/test/cyclic_dependency/BUILD @@ -0,0 +1,11 @@ +subinclude("//test/build_defs") + +please_repo_e2e_test( + name = "cyclic_dependency_test", + expected_failure = True, + expect_output_contains = { + "output.txt": "Dependency cycle found", + }, + plz_command = "plz test //cycle:all > output.txt 2>&1", + repo = "test_repo", +) diff --git a/test/cyclic_dependency/test_repo/.plzconfig b/test/cyclic_dependency/test_repo/.plzconfig new file mode 100644 index 0000000000..0ecbe86e7b --- /dev/null +++ b/test/cyclic_dependency/test_repo/.plzconfig @@ -0,0 +1,3 @@ +[Parse] +BuildFileName = BUILD_FILE + diff --git a/test/cycle/TEST_BUILD b/test/cyclic_dependency/test_repo/cycle/BUILD_FILE similarity index 92% rename from test/cycle/TEST_BUILD rename to test/cyclic_dependency/test_repo/cycle/BUILD_FILE index 3dbba580d5..77bcbbebf0 100644 --- a/test/cycle/TEST_BUILD +++ b/test/cyclic_dependency/test_repo/cycle/BUILD_FILE @@ -1,12 +1,12 @@ # A set of build targets that test issue #43. # Due to the nature of how we exercise the issue the test itself cannot be in this package. -python_library( +filegroup( name = "cycle_1", deps = [":cycle_2"], ) -python_library( +filegroup( name = "cycle_2", deps = [":cycle_1"], )