1def _test_chdir_remote_impl(ctx): 2 ctx.file("WORKSPACE", """workspace("test_chdir_remote")""") 3 ctx.file("BUILD.bazel", "") 4 for f in ["BUILD.bazel", "data_test.go", "data.txt"]: 5 input = Label("@io_bazel_rules_go//tests/legacy/test_chdir:{}".format(f)) 6 ctx.template("sub/" + f, input) 7 8_test_chdir_remote = repository_rule( 9 implementation = _test_chdir_remote_impl, 10 attrs = {}, 11) 12 13def test_chdir_remote(): 14 _test_chdir_remote(name = "test_chdir_remote") 15