diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-05-22 11:51:06 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-05-24 16:00:11 +0200 |
commit | dc2cc2d18381ab7bbef5bbce17736f5252b5da6c (patch) | |
tree | 1770725d29d32303cafd71d7929e3bbd59ed8b3c | |
parent | d4396683860b5aed391a336692bacae71e1007cd (diff) | |
download | justbuild-dc2cc2d18381ab7bbef5bbce17736f5252b5da6c.tar.gz |
Split off tests into a separate logical repository
This allows better separation and, in particular, repositories
needed only for tests do not have to be provided for building the
tools. This also better documents which dependencies are only needed
for testing.
44 files changed, 362 insertions, 323 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc574ccf..e423ca02 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,11 +11,12 @@ be agreed upon and committed to the repository first. For all changes, remember to also update the documentation and add appropriate test coverage. For code to be accepted, all tests -must pass; the two global test suites are `["test", "ALL"]` and -`["test", "bootstrap-test"]` where the latter needs an increased -action time out. Code is formatted with `clang-format` and linted -with `clang-tidy`; the corresponding configuration files can be -found in the top-level directory of this repository. +must pass; the two global test suites are `["@", "just tests", "", "ALL"]` +and `["@", "just tests", "test", "bootstrap-test"]` where the +latter needs an increased action time out. Code is formatted with +`clang-format` and linted with `clang-tidy`; the corresponding +configuration files can be found in the top-level directory of +this repository. Changes should be organized as a patch series, i.e., as a sequence of small changes that are easy to review, but nevertheless self-contained @@ -270,9 +270,4 @@ , [["TREE", null, "src/utils"], "."] ] } -, "large-tests": - { "type": "install" - , "tainted": ["test"] - , "dirs": [[["test", "bootstrap-test"], "bootstrap-test"]] - } } diff --git a/etc/dev/TARGETS b/etc/dev/TARGETS index dbfbf15c..8368f0c8 100644 --- a/etc/dev/TARGETS +++ b/etc/dev/TARGETS @@ -18,7 +18,6 @@ , ["@", "fmt", "", "fmt"] , ["@", "cli11", "", "cli11"] , ["@", "json", "", "json"] - , ["@", "catch2", "", "catch2"] , ["", "libgit2"] , ["", "libcurl"] , ["", "libarchive"] diff --git a/etc/repos.json b/etc/repos.json index 4cb8e00c..eb152d8c 100644 --- a/etc/repos.json +++ b/etc/repos.json @@ -4,7 +4,6 @@ { "repository": {"type": "file", "path": "."} , "bindings": { "rules": "rules-just" - , "just-distfiles": "just-distfiles" , "gsl": "com_github_microsoft_gsl" , "cli11": "cli11" , "json": "json" @@ -14,7 +13,6 @@ , "googleapis": "google_apis" , "bazel_remote_apis": "bazel_remote_apis" , "libgit2": "com_github_libgit2_libgit2" - , "catch2": "catch2" , "protoc": "protobuf" , "libcurl": "com_github_curl_curl" , "libarchive": "com_github_libarchive_libarchive" @@ -22,6 +20,25 @@ , "bootstrap": {"link": ["-pthread"]} , "bootstrap_local": {"link": ["-pthread"]} } + , "just tests": + { "repository": {"type": "file", "path": "test"} + , "bindings": + { "src": "just" + , "rules": "rules-just" + , "just-distfiles": "just-distfiles" + , "catch2": "catch2" + , "gsl": "com_github_microsoft_gsl" + , "cli11": "cli11" + , "json": "json" + , "fmt": "fmt" + , "ssl": "ssl" + , "grpc": "com_github_grpc_grpc" + , "googleapis": "google_apis" + , "bazel_remote_apis": "bazel_remote_apis" + , "libgit2": "com_github_libgit2_libgit2" + , "protoc": "protobuf" + } + } , "just-distfiles": { "repository": { "type": "distdir" diff --git a/test/TARGETS b/test/TARGETS index 8fb612ec..92838f66 100644 --- a/test/TARGETS +++ b/test/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["main.cpp"] , "deps": [ ["@", "catch2", "", "catch2"] - , ["test/utils", "log_config"] - , ["src/buildtool/file_system", "git_context"] + , ["utils", "log_config"] + , ["@", "src", "src/buildtool/file_system", "git_context"] ] , "stage": ["test"] } @@ -70,4 +70,32 @@ , "tainted": ["test"] , "deps": [["./", "bootstrap", "TESTS"]] } +, "large-tests": + { "type": "install" + , "tainted": ["test"] + , "dirs": [["bootstrap-test", "bootstrap-test"]] + } +, "test-deps-headers": + { "type": ["@", "rules", "CC", "install-with-deps"] + , "hdrs-only": ["yes"] + , "targets": [["@", "catch2", "", "catch2"]] + } +, "just-ext-hdrs (unconfigured)": + { "type": "install" + , "dirs": + [[["@", "src", "", "just-ext-hdrs"], "."], ["test-deps-headers", "."]] + } +, "just-ext-hdrs": + { "type": "configure" + , "arguments_config": ["OS", "ARCH"] + , "target": "just-ext-hdrs (unconfigured)" + , "config": + { "type": "let*" + , "bindings": + [ ["OS", {"type": "var", "name": "OS", "default": "linux"}] + , ["ARCH", {"type": "var", "name": "ARCH", "default": "x86_64"}] + ] + , "body": {"type": "env", "vars": ["OS", "ARCH"]} + } + } } diff --git a/test/bootstrap/TARGETS b/test/bootstrap/TARGETS index c5c744b2..ab8ae1e6 100644 --- a/test/bootstrap/TARGETS +++ b/test/bootstrap/TARGETS @@ -7,7 +7,7 @@ ] , "test": ["test-bootstrap.sh"] , "deps": - [ ["", "bootstrap-src"] + [ ["@", "src", "", "bootstrap-src"] , ["@", "just-distfiles", "", "distdir"] , "prune-config.py" ] @@ -56,7 +56,7 @@ , ["@", "gsl", "", "gsl"] , ["@", "cli11", "", "cli11"] , ["@", "ssl", "", "crypto"] - , ["", "libgit2"] + , ["@", "src", "", "libgit2"] , ["@", "protoc", "", "protoc"] , ["@", "protoc", "", "libprotobuf"] , ["@", "grpc", "", "grpc++"] @@ -64,7 +64,7 @@ ] } , "just_other_deps": - { "type": ["test/bootstrap", "stage-deps"] + { "type": ["bootstrap", "stage-deps"] , "protos": [ ["@", "bazel_remote_apis", "", "remote_execution_proto"] , ["@", "googleapis", "", "google_bytestream_proto"] @@ -74,7 +74,9 @@ ] } , "staged-sources": - {"type": "install", "dirs": [[["", "bootstrap-src"], "srcs/just"]]} + { "type": "install" + , "dirs": [[["@", "src", "", "bootstrap-src"], "srcs/just"]] + } , "pkgconfig-test": { "type": ["@", "rules", "shell/test", "script"] , "name": ["bootstrap-test-pkgconfig"] diff --git a/test/buildtool/build_engine/base_maps/TARGETS b/test/buildtool/build_engine/base_maps/TARGETS index 642804c9..862aa3dc 100644 --- a/test/buildtool/build_engine/base_maps/TARGETS +++ b/test/buildtool/build_engine/base_maps/TARGETS @@ -3,9 +3,9 @@ , "name": ["test_repo"] , "hdrs": ["test_repo.hpp"] , "deps": - [ ["src/buildtool/common", "config"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["test/utils", "shell_quoting"] + [ ["@", "src", "src/buildtool/common", "config"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } @@ -15,8 +15,8 @@ , "srcs": ["entity_name.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/build_engine/base_maps", "entity_name"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "entity_name"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } @@ -28,9 +28,9 @@ , "private-deps": [ "test_repo" , ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "config"] - , ["src/buildtool/build_engine/base_maps", "directory_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "config"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "directory_map"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } @@ -42,8 +42,8 @@ , "private-deps": [ "test_repo" , ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/build_engine/base_maps", "json_file_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "json_file_map"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } @@ -55,9 +55,9 @@ , "private-deps": [ "test_repo" , ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/build_engine/base_maps", "directory_map"] - , ["src/buildtool/build_engine/base_maps", "source_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "directory_map"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "source_map"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } @@ -69,8 +69,8 @@ , "private-deps": [ "test_repo" , ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/build_engine/base_maps", "expression_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "expression_map"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } @@ -82,8 +82,8 @@ , "private-deps": [ "test_repo" , ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/build_engine/base_maps", "rule_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "rule_map"] ] , "stage": ["test", "buildtool", "build_engine", "base_maps"] } diff --git a/test/buildtool/build_engine/expression/TARGETS b/test/buildtool/build_engine/expression/TARGETS index 5488c212..a4d56e57 100644 --- a/test/buildtool/build_engine/expression/TARGETS +++ b/test/buildtool/build_engine/expression/TARGETS @@ -4,9 +4,9 @@ , "srcs": ["linked_map.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/build_engine/expression", "linked_map"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/build_engine/expression", "linked_map"] ] , "stage": ["test", "buildtool", "build_engine", "expression"] } @@ -16,9 +16,9 @@ , "srcs": ["expression.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/build_engine/expression", "expression"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/build_engine/expression", "expression"] ] , "stage": ["test", "buildtool", "build_engine", "expression"] } @@ -28,9 +28,9 @@ , "srcs": ["configuration.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/build_engine/expression", "expression"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/build_engine/expression", "expression"] ] , "stage": ["test", "buildtool", "build_engine", "expression"] } diff --git a/test/buildtool/build_engine/target_map/TARGETS b/test/buildtool/build_engine/target_map/TARGETS index d266a4cd..7eae3c0c 100644 --- a/test/buildtool/build_engine/target_map/TARGETS +++ b/test/buildtool/build_engine/target_map/TARGETS @@ -4,9 +4,9 @@ , "srcs": ["result_map.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/buildtool/build_engine/target_map", "result_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/build_engine/target_map", "result_map"] ] , "stage": ["test", "buildtool", "build_engine", "target_map"] } @@ -17,12 +17,12 @@ , "data": ["test_data"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/build_engine/base_maps", "directory_map"] - , ["src/buildtool/build_engine/base_maps", "rule_map"] - , ["src/buildtool/build_engine/base_maps", "source_map"] - , ["src/buildtool/build_engine/base_maps", "targets_file_map"] - , ["src/buildtool/build_engine/target_map", "target_map"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "directory_map"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "rule_map"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "source_map"] + , ["@", "src", "src/buildtool/build_engine/base_maps", "targets_file_map"] + , ["@", "src", "src/buildtool/build_engine/target_map", "target_map"] ] , "stage": ["test", "buildtool", "build_engine", "target_map"] } @@ -32,11 +32,13 @@ , "srcs": ["target_map_internals.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , [ "src/buildtool/build_engine/target_map" + , ["", "catch-main"] + , [ "@" + , "src" + , "src/buildtool/build_engine/target_map" , "target_map_testable_internals" ] - , ["src/buildtool/build_engine/expression", "expression"] + , ["@", "src", "src/buildtool/build_engine/expression", "expression"] ] , "stage": ["test", "buildtool", "build_engine", "target_map"] } diff --git a/test/buildtool/common/TARGETS b/test/buildtool/common/TARGETS index 3d1c9216..e26ff319 100644 --- a/test/buildtool/common/TARGETS +++ b/test/buildtool/common/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["artifact_factory.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "artifact_factory"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] ] , "stage": ["test", "buildtool", "common"] } @@ -15,9 +15,9 @@ , "srcs": ["artifact_description.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/common", "artifact_description"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/common", "artifact_description"] ] , "stage": ["test", "buildtool", "common"] } @@ -27,9 +27,9 @@ , "srcs": ["action_description.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/common", "action_description"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/common", "action_description"] ] , "stage": ["test", "buildtool", "common"] } @@ -39,10 +39,10 @@ , "srcs": ["repository_config.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "config"] - , ["test/utils", "local_hermeticity"] - , ["src/buildtool/execution_api/local", "local"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "config"] + , ["utils", "local_hermeticity"] + , ["@", "src", "src/buildtool/execution_api/local", "local"] ] , "stage": ["test", "buildtool", "common"] } diff --git a/test/buildtool/crypto/TARGETS b/test/buildtool/crypto/TARGETS index a3b7d880..c4177579 100644 --- a/test/buildtool/crypto/TARGETS +++ b/test/buildtool/crypto/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["hasher.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/crypto", "hasher"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/crypto", "hasher"] ] , "stage": ["test", "buildtool", "crypto"] } @@ -15,8 +15,8 @@ , "srcs": ["hash_function.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/crypto", "hash_function"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/crypto", "hash_function"] ] , "stage": ["test", "buildtool", "crypto"] } diff --git a/test/buildtool/execution_api/bazel/TARGETS b/test/buildtool/execution_api/bazel/TARGETS index 966485b2..4a2187c3 100644 --- a/test/buildtool/execution_api/bazel/TARGETS +++ b/test/buildtool/execution_api/bazel/TARGETS @@ -1,48 +1,48 @@ { "cas_client": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["cas_client"] , "srcs": ["bazel_cas_client.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test/utils", "catch-main-remote-execution"] - , ["src/buildtool/execution_api/remote", "bazel_network"] - , ["src/buildtool/execution_api/remote", "config"] + , ["utils", "catch-main-remote-execution"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel_network"] + , ["@", "src", "src/buildtool/execution_api/remote", "config"] ] , "stage": ["test", "buildtool", "execution_api", "bazel"] } , "execution_client": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["execution_client"] , "srcs": ["bazel_execution_client.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test/utils", "catch-main-remote-execution"] - , ["test/utils", "execution_bazel"] - , ["src/buildtool/execution_api/remote", "bazel_network"] + , ["utils", "catch-main-remote-execution"] + , ["utils", "execution_bazel"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel_network"] ] , "stage": ["test", "buildtool", "execution_api", "bazel"] } , "bytestream_client": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["bytestream_client"] , "srcs": ["bytestream_client.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test/utils", "catch-main-remote-execution"] - , ["test/utils", "execution_bazel"] - , ["src/buildtool/execution_api/remote", "bazel_network"] + , ["utils", "catch-main-remote-execution"] + , ["utils", "execution_bazel"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel_network"] ] , "stage": ["test", "buildtool", "execution_api", "bazel"] } , "network": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["network"] , "srcs": ["bazel_network.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test/utils", "catch-main-remote-execution"] - , ["test/utils", "execution_bazel"] - , ["src/buildtool/execution_api/remote", "bazel_network"] + , ["utils", "catch-main-remote-execution"] + , ["utils", "execution_bazel"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel_network"] ] , "stage": ["test", "buildtool", "execution_api", "bazel"] } @@ -50,25 +50,29 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["msg_factory"] , "srcs": ["bazel_msg_factory.test.cpp"] - , "data": [["test/buildtool/storage", "test_data"]] + , "data": [["buildtool/storage", "test_data"]] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_api/bazel_msg", "bazel_msg_factory"] - , ["src/buildtool/file_system", "object_type"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , [ "@" + , "src" + , "src/buildtool/execution_api/bazel_msg" + , "bazel_msg_factory" + ] + , ["@", "src", "src/buildtool/file_system", "object_type"] ] , "stage": ["test", "buildtool", "execution_api", "bazel"] } , "bazel_api": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["bazel_api"] , "srcs": ["bazel_api.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test/utils", "catch-main-remote-execution"] - , ["src/buildtool/execution_api/remote", "bazel"] - , ["test/buildtool/execution_api/common", "api_test"] + , ["utils", "catch-main-remote-execution"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel"] + , ["buildtool/execution_api/common", "api_test"] ] , "stage": ["test", "buildtool", "execution_api", "bazel"] } diff --git a/test/buildtool/execution_api/common/TARGETS b/test/buildtool/execution_api/common/TARGETS index abd7e3a3..b8039b02 100644 --- a/test/buildtool/execution_api/common/TARGETS +++ b/test/buildtool/execution_api/common/TARGETS @@ -4,9 +4,9 @@ , "hdrs": ["api_test.hpp"] , "deps": [ ["@", "catch2", "", "catch2"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_api/common", "common"] - , ["src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_api/common", "common"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] ] , "stage": ["test", "buildtool", "execution_api", "common"] } diff --git a/test/buildtool/execution_api/local/TARGETS b/test/buildtool/execution_api/local/TARGETS index c0131568..11e92a45 100644 --- a/test/buildtool/execution_api/local/TARGETS +++ b/test/buildtool/execution_api/local/TARGETS @@ -4,10 +4,10 @@ , "srcs": ["local_execution.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_api/local", "local"] - , ["test/utils", "local_hermeticity"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_api/local", "local"] + , ["utils", "local_hermeticity"] ] , "stage": ["test", "buildtool", "execution_api", "local"] } @@ -17,10 +17,10 @@ , "srcs": ["local_api.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/execution_api/local", "local"] - , ["test/buildtool/execution_api/common", "api_test"] - , ["test/utils", "local_hermeticity"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/execution_api/local", "local"] + , ["buildtool/execution_api/common", "api_test"] + , ["utils", "local_hermeticity"] ] , "stage": ["test", "buildtool", "execution_api", "local"] } diff --git a/test/buildtool/execution_engine/dag/TARGETS b/test/buildtool/execution_engine/dag/TARGETS index 95dff1fe..a6ac316a 100644 --- a/test/buildtool/execution_engine/dag/TARGETS +++ b/test/buildtool/execution_engine/dag/TARGETS @@ -4,10 +4,10 @@ , "srcs": ["dag.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_engine/dag", "dag"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_engine/dag", "dag"] ] , "stage": ["test", "buildtool", "execution_engine", "dag"] } diff --git a/test/buildtool/execution_engine/executor/TARGETS b/test/buildtool/execution_engine/executor/TARGETS index e9f2bccd..a3e97d89 100644 --- a/test/buildtool/execution_engine/executor/TARGETS +++ b/test/buildtool/execution_engine/executor/TARGETS @@ -9,45 +9,45 @@ , "name": ["executor"] , "srcs": ["executor.test.cpp"] , "private-deps": - [ ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_api/common", "common"] - , ["src/buildtool/execution_engine/dag", "dag"] - , ["src/buildtool/execution_engine/executor", "executor"] - , ["test", "catch-main"] + [ ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_api/common", "common"] + , ["@", "src", "src/buildtool/execution_engine/dag", "dag"] + , ["@", "src", "src/buildtool/execution_engine/executor", "executor"] + , ["", "catch-main"] , ["@", "catch2", "", "catch2"] ] , "stage": ["test", "buildtool", "execution_engine", "executor"] } , "local": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["local"] , "srcs": ["executor_api_local.test.cpp"] , "data": ["test_data"] , "private-deps": [ "executor_api_tests" - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_api/local", "local"] - , ["src/buildtool/execution_api/remote", "config"] - , ["src/buildtool/execution_engine/dag", "dag"] - , ["src/buildtool/execution_engine/executor", "executor"] - , ["test/utils", "catch-main-remote-execution"] - , ["test/utils", "local_hermeticity"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_api/local", "local"] + , ["@", "src", "src/buildtool/execution_api/remote", "config"] + , ["@", "src", "src/buildtool/execution_engine/dag", "dag"] + , ["@", "src", "src/buildtool/execution_engine/executor", "executor"] + , ["utils", "catch-main-remote-execution"] + , ["utils", "local_hermeticity"] , ["@", "catch2", "", "catch2"] ] , "stage": ["test", "buildtool", "execution_engine", "executor"] } , "remote_bazel": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["remote_bazel"] , "srcs": ["executor_api_remote_bazel.test.cpp"] , "data": ["test_data"] , "private-deps": [ "executor_api_tests" - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_api/remote", "bazel"] - , ["src/buildtool/execution_api/remote", "config"] - , ["src/buildtool/execution_engine/executor", "executor"] - , ["test/utils", "catch-main-remote-execution"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel"] + , ["@", "src", "src/buildtool/execution_api/remote", "config"] + , ["@", "src", "src/buildtool/execution_engine/executor", "executor"] + , ["utils", "catch-main-remote-execution"] , ["@", "catch2", "", "catch2"] ] , "stage": ["test", "buildtool", "execution_engine", "executor"] diff --git a/test/buildtool/execution_engine/traverser/TARGETS b/test/buildtool/execution_engine/traverser/TARGETS index 2b9ced2d..9f1e1387 100644 --- a/test/buildtool/execution_engine/traverser/TARGETS +++ b/test/buildtool/execution_engine/traverser/TARGETS @@ -4,11 +4,11 @@ , "srcs": ["traverser.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/common", "artifact_factory"] - , ["src/buildtool/execution_engine/dag", "dag"] - , ["src/buildtool/execution_engine/traverser", "traverser"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/common", "artifact_factory"] + , ["@", "src", "src/buildtool/execution_engine/dag", "dag"] + , ["@", "src", "src/buildtool/execution_engine/traverser", "traverser"] ] , "stage": ["test", "buildtool", "execution_engine", "traverser"] } diff --git a/test/buildtool/file_system/TARGETS b/test/buildtool/file_system/TARGETS index d1caab19..ba00a11c 100644 --- a/test/buildtool/file_system/TARGETS +++ b/test/buildtool/file_system/TARGETS @@ -5,8 +5,8 @@ , "data": ["test_data"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/file_system", "file_system_manager"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] ] , "stage": ["test", "buildtool", "file_system"] } @@ -16,10 +16,10 @@ , "srcs": ["object_cas.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/crypto", "hash_function"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["test/utils", "local_hermeticity"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/crypto", "hash_function"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["utils", "local_hermeticity"] ] , "stage": ["test", "buildtool", "file_system"] } @@ -30,11 +30,11 @@ , "data": ["test_data"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/file_system", "git_tree"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["test/utils", "shell_quoting"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/file_system", "git_tree"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "buildtool", "file_system"] } @@ -45,11 +45,11 @@ , "data": ["test_data"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/common", "artifact_description"] - , ["src/buildtool/file_system", "file_root"] - , ["test/utils", "shell_quoting"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/common", "artifact_description"] + , ["@", "src", "src/buildtool/file_system", "file_root"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "buildtool", "file_system"] } @@ -60,11 +60,11 @@ , "data": ["test_data"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/common", "artifact_description"] - , ["src/buildtool/file_system", "file_root"] - , ["test/utils", "shell_quoting"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/common", "artifact_description"] + , ["@", "src", "src/buildtool/file_system", "file_root"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "buildtool", "file_system"] } @@ -91,12 +91,12 @@ , "data": ["test_data"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] + , ["", "catch-main"] , ["@", "json", "", "json"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/buildtool/file_system", "git_repo"] - , ["src/utils/cpp", "atomic"] - , ["test/utils", "shell_quoting"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/file_system", "git_repo"] + , ["@", "src", "src/utils/cpp", "atomic"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "buildtool", "file_system"] } diff --git a/test/buildtool/graph_traverser/TARGETS b/test/buildtool/graph_traverser/TARGETS index db9d532e..22a8cc79 100644 --- a/test/buildtool/graph_traverser/TARGETS +++ b/test/buildtool/graph_traverser/TARGETS @@ -4,11 +4,11 @@ , "hdrs": ["graph_traverser.test.hpp"] , "deps": [ ["@", "catch2", "", "catch2"] - , ["src/buildtool/common", "common"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/buildtool/file_system", "jsonfs"] - , ["src/buildtool/graph_traverser", "graph_traverser"] - , ["test/utils", "test_env"] + , ["@", "src", "src/buildtool/common", "common"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/file_system", "jsonfs"] + , ["@", "src", "src/buildtool/graph_traverser", "graph_traverser"] + , ["utils", "test_env"] ] , "stage": ["test", "buildtool", "graph_traverser"] } @@ -20,26 +20,26 @@ , "private-deps": [ "graph_traverser_tests" , ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "local_hermeticity"] + , ["", "catch-main"] + , ["utils", "local_hermeticity"] ] , "stage": ["test", "buildtool", "graph_traverser"] } , "graph_traverser_remote": - { "type": ["test/utils/remote_execution", "CC test"] + { "type": ["utils/remote_execution", "CC test"] , "name": ["graph_traverser_remote"] , "srcs": ["graph_traverser_remote.test.cpp"] , "data": ["test_data"] , "private-deps": [ "graph_traverser_tests" , ["@", "catch2", "", "catch2"] - , ["test/utils", "catch-main-remote-execution"] + , ["utils", "catch-main-remote-execution"] ] , "stage": ["test", "buildtool", "graph_traverser"] } , "test_data": { "type": ["@", "rules", "data", "staged"] - , "srcs": [["TREE", "test/buildtool/graph_traverser", "data"]] + , "srcs": [["TREE", null, "data"]] , "stage": ["test", "buildtool", "graph_traverser"] } , "TESTS": diff --git a/test/buildtool/logging/TARGETS b/test/buildtool/logging/TARGETS index c6046227..869ee786 100644 --- a/test/buildtool/logging/TARGETS +++ b/test/buildtool/logging/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["logger.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/logging", "logging"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/logging", "logging"] ] , "stage": ["test", "buildtool", "logging"] } @@ -15,9 +15,9 @@ , "srcs": ["log_sink_file.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/logging", "logging"] - , ["src/buildtool/file_system", "file_system_manager"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/logging", "logging"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] ] , "stage": ["test", "buildtool", "logging"] , "private-ldflags": ["-pthread"] diff --git a/test/buildtool/main/TARGETS b/test/buildtool/main/TARGETS index e7305262..084fcb8e 100644 --- a/test/buildtool/main/TARGETS +++ b/test/buildtool/main/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["install_cas.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/main", "install_cas"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/main", "install_cas"] ] , "stage": ["test", "buildtool", "main"] } diff --git a/test/buildtool/multithreading/TARGETS b/test/buildtool/multithreading/TARGETS index 65f38330..c7b28d88 100644 --- a/test/buildtool/multithreading/TARGETS +++ b/test/buildtool/multithreading/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["task.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/multithreading", "task_system"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/multithreading", "task_system"] ] , "stage": ["test", "buildtool", "multithreading"] } @@ -15,9 +15,9 @@ , "srcs": ["task_system.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/multithreading", "task_system"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/multithreading", "task_system"] ] , "stage": ["test", "buildtool", "multithreading"] } @@ -27,10 +27,10 @@ , "srcs": ["async_map_node.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/multithreading", "async_map_node"] - , ["src/buildtool/multithreading", "task_system"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/multithreading", "async_map_node"] + , ["@", "src", "src/buildtool/multithreading", "task_system"] ] , "stage": ["test", "buildtool", "multithreading"] } @@ -40,11 +40,11 @@ , "srcs": ["async_map.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/multithreading", "async_map"] - , ["src/buildtool/multithreading", "async_map_node"] - , ["src/buildtool/multithreading", "task_system"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/multithreading", "async_map"] + , ["@", "src", "src/buildtool/multithreading", "async_map_node"] + , ["@", "src", "src/buildtool/multithreading", "task_system"] ] , "stage": ["test", "buildtool", "multithreading"] } @@ -54,11 +54,11 @@ , "srcs": ["async_map_consumer.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "container_matchers"] - , ["src/buildtool/multithreading", "async_map_consumer"] - , ["src/buildtool/multithreading", "async_map"] - , ["src/buildtool/multithreading", "task_system"] + , ["", "catch-main"] + , ["utils", "container_matchers"] + , ["@", "src", "src/buildtool/multithreading", "async_map_consumer"] + , ["@", "src", "src/buildtool/multithreading", "async_map"] + , ["@", "src", "src/buildtool/multithreading", "task_system"] ] , "stage": ["test", "buildtool", "multithreading"] } diff --git a/test/buildtool/storage/TARGETS b/test/buildtool/storage/TARGETS index abfab7b7..31e5ceb5 100644 --- a/test/buildtool/storage/TARGETS +++ b/test/buildtool/storage/TARGETS @@ -12,11 +12,11 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["local_cas"] , "srcs": ["local_cas.test.cpp"] - , "data": [["test/buildtool/storage", "test_data"]] + , "data": [["buildtool/storage", "test_data"]] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["test/utils", "local_hermeticity"] + , ["", "catch-main"] + , ["utils", "local_hermeticity"] ] , "stage": ["test", "buildtool", "storage"] } @@ -26,9 +26,9 @@ , "srcs": ["local_ac.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["test/utils", "local_hermeticity"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["utils", "local_hermeticity"] ] , "stage": ["test", "buildtool", "storage"] } diff --git a/test/buildtool/system/TARGETS b/test/buildtool/system/TARGETS index 952fe8d2..fb501d81 100644 --- a/test/buildtool/system/TARGETS +++ b/test/buildtool/system/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["system_command.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/system", "system_command"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/system", "system_command"] ] , "stage": ["test", "buildtool", "system"] } diff --git a/test/end-to-end/RULES b/test/end-to-end/RULES index af15181e..37434719 100644 --- a/test/end-to-end/RULES +++ b/test/end-to-end/RULES @@ -69,7 +69,7 @@ , "implicit": { "runner": ["with_remote_test_runner.py"] , "summarizer": [["@", "rules", "shell/test", "test_summary.py"]] - , "just": [["", "just"]] + , "just": [["@", "src", "", "just"]] } , "imports": { "test-result": "test-result" diff --git a/test/end-to-end/TARGETS b/test/end-to-end/TARGETS index 74962cff..c0c59681 100644 --- a/test/end-to-end/TARGETS +++ b/test/end-to-end/TARGETS @@ -1,5 +1,7 @@ { "tool-under-test": - {"type": "install", "files": {"bin/tool-under-test": [".", "just"]}} + { "type": "install" + , "files": {"bin/tool-under-test": ["@", "src", "", "just"]} + } , "mr-tool-under-test": { "type": "install" , "arguments_config": ["TEST_BOOTSTRAP_JUST_MR"] @@ -7,14 +9,15 @@ { "bin/mr-tool-under-test": { "type": "if" , "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"} - , "then": ["", "bin/just-mr.py"] - , "else": [".", "just-mr"] + , "then": ["@", "src", "", "bin/just-mr.py"] + , "else": ["@", "src", "", "just-mr"] } } } , "git-import-under-test": { "type": "install" - , "files": {"bin/git-import-under-test": ["", "bin/just-import-git.py"]} + , "files": + {"bin/git-import-under-test": ["@", "src", "", "bin/just-import-git.py"]} } , "TESTS": { "type": "install" diff --git a/test/end-to-end/actions/TARGETS b/test/end-to-end/actions/TARGETS index f8aa354f..af77f119 100644 --- a/test/end-to-end/actions/TARGETS +++ b/test/end-to-end/actions/TARGETS @@ -3,20 +3,20 @@ , "name": ["equality"] , "test": ["action-equality.sh"] , "keep": ["graph.json"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "trees": { "type": ["@", "rules", "shell/test", "script"] , "name": ["trees"] , "test": ["nested-trees.sh"] , "keep": ["blobs.json", "trees.json", "out/index.txt"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "conflicts": { "type": ["@", "rules", "shell/test", "script"] , "name": ["conflicts"] , "test": ["conflicts.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": { "type": "install" diff --git a/test/end-to-end/build-fails/TARGETS b/test/end-to-end/build-fails/TARGETS index 05e2c957..991c1770 100644 --- a/test/end-to-end/build-fails/TARGETS +++ b/test/end-to-end/build-fails/TARGETS @@ -2,7 +2,7 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["single_fail_dep"] , "test": ["single_fail_dep.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["single_fail_dep"]} diff --git a/test/end-to-end/built-in-rules/TARGETS b/test/end-to-end/built-in-rules/TARGETS index 5b507f9d..e4322e15 100644 --- a/test/end-to-end/built-in-rules/TARGETS +++ b/test/end-to-end/built-in-rules/TARGETS @@ -2,19 +2,19 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["generic_out_dirs"] , "test": ["generic_out_dirs.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "filegen_config": { "type": ["@", "rules", "shell/test", "script"] , "name": ["filegen_config"] , "test": ["filegen_config.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "tree": { "type": ["@", "rules", "shell/test", "script"] , "name": ["tree"] , "test": ["tree.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": { "type": "install" diff --git a/test/end-to-end/cli/TARGETS b/test/end-to-end/cli/TARGETS index dd7b0444..b45a0f10 100644 --- a/test/end-to-end/cli/TARGETS +++ b/test/end-to-end/cli/TARGETS @@ -2,7 +2,7 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["defaults"] , "test": ["defaults.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["defaults"]} } diff --git a/test/end-to-end/execution-service/TARGETS b/test/end-to-end/execution-service/TARGETS index f27220b9..a5ae6322 100644 --- a/test/end-to-end/execution-service/TARGETS +++ b/test/end-to-end/execution-service/TARGETS @@ -2,7 +2,7 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["simple_build"] , "test": ["simple_build.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["simple_build"]} } diff --git a/test/end-to-end/gc/TARGETS b/test/end-to-end/gc/TARGETS index 95091695..b80714cf 100644 --- a/test/end-to-end/gc/TARGETS +++ b/test/end-to-end/gc/TARGETS @@ -2,16 +2,14 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["basic"] , "test": ["basic.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "export": { "type": ["@", "rules", "shell/test", "script"] , "name": ["export"] , "test": ["export.sh"] , "deps": - [ ["test/end-to-end", "tool-under-test"] - , ["test/end-to-end", "mr-tool-under-test"] - ] + [["end-to-end", "tool-under-test"], ["end-to-end", "mr-tool-under-test"]] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["basic", "export"]} diff --git a/test/end-to-end/generated-binary/TARGETS b/test/end-to-end/generated-binary/TARGETS index e19f97f3..f488090e 100644 --- a/test/end-to-end/generated-binary/TARGETS +++ b/test/end-to-end/generated-binary/TARGETS @@ -3,7 +3,7 @@ , "name": ["shell"] , "test": ["shell-script.sh"] , "keep": ["out/out.txt"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "compile rules": {"type": "install", "files": {"RULES": "data/RULES.compiled"}} @@ -12,7 +12,7 @@ , "name": ["compiled"] , "test": ["compiled.sh"] , "keep": ["graph.json", "out/out.txt"] - , "deps": [["test/end-to-end", "tool-under-test"], "compile rules"] + , "deps": [["end-to-end", "tool-under-test"], "compile rules"] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["shell", "compiled"]} diff --git a/test/end-to-end/git-import/TARGETS b/test/end-to-end/git-import/TARGETS index 4dc63805..0ff1522f 100644 --- a/test/end-to-end/git-import/TARGETS +++ b/test/end-to-end/git-import/TARGETS @@ -3,9 +3,9 @@ , "name": ["chained-import"] , "test": ["chained-import.sh"] , "deps": - [ ["test/end-to-end", "git-import-under-test"] - , ["test/end-to-end", "mr-tool-under-test"] - , ["test/end-to-end", "tool-under-test"] + [ ["end-to-end", "git-import-under-test"] + , ["end-to-end", "mr-tool-under-test"] + , ["end-to-end", "tool-under-test"] ] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["chained-import"]} diff --git a/test/end-to-end/just-mr/TARGETS b/test/end-to-end/just-mr/TARGETS index 4acce98f..2f44f962 100644 --- a/test/end-to-end/just-mr/TARGETS +++ b/test/end-to-end/just-mr/TARGETS @@ -2,22 +2,20 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["cas-independent"] , "test": ["cas-independent.sh"] - , "deps": [["test/end-to-end", "mr-tool-under-test"]] + , "deps": [["end-to-end", "mr-tool-under-test"]] } , "fetch": { "type": ["@", "rules", "shell/test", "script"] , "name": ["fetch"] , "test": ["fetch.sh"] - , "deps": [["test/end-to-end", "mr-tool-under-test"]] + , "deps": [["end-to-end", "mr-tool-under-test"]] } , "fetch-gc": { "type": ["@", "rules", "shell/test", "script"] , "name": ["fetch-gc"] , "test": ["fetch-gc.sh"] , "deps": - [ ["test/end-to-end", "mr-tool-under-test"] - , ["test/end-to-end", "tool-under-test"] - ] + [["end-to-end", "mr-tool-under-test"], ["end-to-end", "tool-under-test"]] } , "create_test_archives": { "type": ["@", "rules", "CC", "binary"] @@ -25,10 +23,10 @@ , "name": ["create_test_archives"] , "srcs": ["create_test_archives.cpp"] , "private-deps": - [ ["src/buildtool/file_system", "file_system_manager"] - , ["src/buildtool/logging", "logging"] - , ["src/other_tools/utils", "archive_ops"] - , ["src/utils/cpp", "tmp_dir"] + [ ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/logging", "logging"] + , ["@", "src", "src/other_tools/utils", "archive_ops"] + , ["@", "src", "src/utils/cpp", "tmp_dir"] ] , "private-ldflags": ["-pthread"] , "stage": ["src"] @@ -39,30 +37,28 @@ , "test": ["just-mr.test.sh"] , "deps": [ "create_test_archives" - , ["test/utils", "test_utils_install"] - , ["test/end-to-end", "mr-tool-under-test"] + , ["utils", "test_utils_install"] + , ["end-to-end", "mr-tool-under-test"] ] } , "git-tree-verbosity": { "type": ["@", "rules", "shell/test", "script"] , "name": ["git-tree-verbosity"] , "test": ["verbosity.sh"] - , "deps": [["test/end-to-end", "mr-tool-under-test"]] + , "deps": [["end-to-end", "mr-tool-under-test"]] } , "defaults": { "type": ["@", "rules", "shell/test", "script"] , "name": ["default-values"] , "test": ["defaults.sh"] - , "deps": [["test/end-to-end", "mr-tool-under-test"]] + , "deps": [["end-to-end", "mr-tool-under-test"]] } , "install-roots": { "type": ["@", "rules", "shell/test", "script"] , "name": ["install-roots"] , "test": ["install-roots.sh"] , "deps": - [ ["test/end-to-end", "mr-tool-under-test"] - , ["test/end-to-end", "tool-under-test"] - ] + [["end-to-end", "mr-tool-under-test"], ["end-to-end", "tool-under-test"]] } , "TESTS": { "type": "install" diff --git a/test/end-to-end/remote-execution/TARGETS b/test/end-to-end/remote-execution/TARGETS index 81ec99e0..5917f55b 100644 --- a/test/end-to-end/remote-execution/TARGETS +++ b/test/end-to-end/remote-execution/TARGETS @@ -1,29 +1,27 @@ { "native-protocol": - { "type": ["test/end-to-end", "with remote"] + { "type": ["end-to-end", "with remote"] , "name": ["native-protocol"] , "test": ["native-protocol.sh"] , "deps": - [ ["test/end-to-end", "tool-under-test"] - , ["test/end-to-end", "mr-tool-under-test"] - ] + [["end-to-end", "tool-under-test"], ["end-to-end", "mr-tool-under-test"]] } , "large-blobs": - { "type": ["test/end-to-end", "with remote"] + { "type": ["end-to-end", "with remote"] , "name": ["large-blobs"] , "test": ["large-blobs.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "upload-test": - { "type": ["test/end-to-end", "with remote"] + { "type": ["end-to-end", "with remote"] , "name": ["upload-test"] , "test": ["upload-test.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "install": - { "type": ["test/end-to-end", "with remote"] + { "type": ["end-to-end", "with remote"] , "name": ["install"] , "test": ["install.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": { "type": "install" diff --git a/test/end-to-end/target-cache/TARGETS b/test/end-to-end/target-cache/TARGETS index fb3b42b9..b2e14a55 100644 --- a/test/end-to-end/target-cache/TARGETS +++ b/test/end-to-end/target-cache/TARGETS @@ -1,25 +1,23 @@ { "target-cache-hit": - { "type": ["test/end-to-end", "with remote"] + { "type": ["end-to-end", "with remote"] , "name": ["target-cache-hit"] , "test": ["target-cache-hit.sh"] , "deps": - [ ["test/end-to-end", "tool-under-test"] - , ["test/end-to-end", "mr-tool-under-test"] - ] + [["end-to-end", "tool-under-test"], ["end-to-end", "mr-tool-under-test"]] } , "artifacts-sync": - { "type": ["test/end-to-end", "with remote"] + { "type": ["end-to-end", "with remote"] , "name": ["artifacts-sync"] , "test": ["artifacts-sync.sh"] , "deps": - [ ["test/end-to-end", "tool-under-test"] + [ ["end-to-end", "tool-under-test"] , ["./", "test-data-artifacts-sync", "greetlib"] , ["./", "test-data-artifacts-sync", "pydicts"] , "bootstrap-src-staged" ] } , "bootstrap-src-staged": - {"type": "install", "dirs": [[["", "bootstrap-src"], "foo"]]} + {"type": "install", "dirs": [[["@", "src", "", "bootstrap-src"], "foo"]]} , "TESTS": { "type": "install" , "tainted": ["test"] diff --git a/test/end-to-end/targets/TARGETS b/test/end-to-end/targets/TARGETS index 13de53ad..d45db9eb 100644 --- a/test/end-to-end/targets/TARGETS +++ b/test/end-to-end/targets/TARGETS @@ -2,37 +2,37 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["upwards"] , "test": ["upwards.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "repository naming": { "type": ["@", "rules", "shell/test", "script"] , "name": ["repo_names"] , "test": ["repo_names.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "resolution of built-in rules": { "type": ["@", "rules", "shell/test", "script"] , "name": ["built-in-resolution"] , "test": ["built-in-resolution.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "glob expansion": { "type": ["@", "rules", "shell/test", "script"] , "name": ["glob"] , "test": ["glob.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "configure target name": { "type": ["@", "rules", "shell/test", "script"] , "name": ["configure-target"] , "test": ["configure-target.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "configure variables": { "type": ["@", "rules", "shell/test", "script"] , "name": ["configure-vars"] , "test": ["configure-vars.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": { "type": "install" diff --git a/test/end-to-end/user-errors/TARGETS b/test/end-to-end/user-errors/TARGETS index f12f6151..4a3c4e90 100644 --- a/test/end-to-end/user-errors/TARGETS +++ b/test/end-to-end/user-errors/TARGETS @@ -2,13 +2,13 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["flat-stage"] , "test": ["flat-stage.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "json-errors": { "type": ["@", "rules", "shell/test", "script"] , "name": ["json-errors"] , "test": ["json-errors.sh"] - , "deps": [["test/end-to-end", "tool-under-test"]] + , "deps": [["end-to-end", "tool-under-test"]] } , "TESTS": { "type": "install" diff --git a/test/other_tools/git_operations/TARGETS b/test/other_tools/git_operations/TARGETS index a20409c1..a546a76e 100644 --- a/test/other_tools/git_operations/TARGETS +++ b/test/other_tools/git_operations/TARGETS @@ -5,12 +5,12 @@ , "srcs": ["critical_git_ops.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] + , ["", "catch-main"] , ["@", "json", "", "json"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/other_tools/ops_maps", "critical_git_op_map"] - , ["src/buildtool/execution_api/common", "common"] - , ["test/utils", "shell_quoting"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/other_tools/ops_maps", "critical_git_op_map"] + , ["@", "src", "src/buildtool/execution_api/common", "common"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "other_tools", "git_operations"] } @@ -19,23 +19,21 @@ , "name": ["critical_git_ops_mp"] , "test": ["critical_git_ops_mp.sh"] , "deps": - [ ["test/buildtool/file_system", "test_data"] - , "critical_git_ops_test_install" - ] + [["buildtool/file_system", "test_data"], "critical_git_ops_test_install"] } , "git_repo_remote": { "type": ["@", "rules", "CC/test", "test"] , "name": ["git_repo_remote"] , "srcs": ["git_repo_remote.test.cpp"] - , "data": [["test/buildtool/file_system", "test_data"]] + , "data": [["buildtool/file_system", "test_data"]] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] + , ["", "catch-main"] , ["@", "json", "", "json"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/other_tools/git_operations", "git_repo_remote"] - , ["src/utils/cpp", "atomic"] - , ["test/utils", "shell_quoting"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/other_tools/git_operations", "git_repo_remote"] + , ["@", "src", "src/utils/cpp", "atomic"] + , ["utils", "shell_quoting"] ] , "stage": ["test", "other_tools", "git_operations"] } @@ -45,12 +43,12 @@ , "name": ["git_config_run_test"] , "srcs": ["git_config_run.test.cpp"] , "private-deps": - [ ["", "libgit2"] - , ["src/other_tools/git_operations", "git_config_settings"] - , ["src/buildtool/file_system", "git_utils"] - , ["src/buildtool/file_system", "git_context"] - , ["src/buildtool/logging", "logging"] - , ["test/utils", "log_config"] + [ ["@", "src", "", "libgit2"] + , ["@", "src", "src/other_tools/git_operations", "git_config_settings"] + , ["@", "src", "src/buildtool/file_system", "git_utils"] + , ["@", "src", "src/buildtool/file_system", "git_context"] + , ["@", "src", "src/buildtool/logging", "logging"] + , ["utils", "log_config"] ] , "stage": ["src"] } diff --git a/test/other_tools/utils/TARGETS b/test/other_tools/utils/TARGETS index 42d243f5..11bb619b 100644 --- a/test/other_tools/utils/TARGETS +++ b/test/other_tools/utils/TARGETS @@ -4,10 +4,10 @@ , "srcs": ["archive_usage.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["", "libarchive"] - , ["src/other_tools/utils", "archive_ops"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "", "libarchive"] + , ["@", "src", "src/other_tools/utils", "archive_ops"] ] , "stage": ["test", "other_tools", "utils"] } @@ -18,10 +18,10 @@ , "srcs": ["curl_usage.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/other_tools/utils", "curl_context"] - , ["src/other_tools/utils", "curl_easy_handle"] - , ["src/buildtool/file_system", "file_system_manager"] + , ["", "catch-main"] + , ["@", "src", "src/other_tools/utils", "curl_context"] + , ["@", "src", "src/other_tools/utils", "curl_easy_handle"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] ] , "stage": ["test", "other_tools", "utils"] } @@ -29,7 +29,7 @@ { "type": ["@", "rules", "shell/test", "script"] , "name": ["curl_usage"] , "test": ["curl_usage_test.sh"] - , "deps": [["test/utils", "test_utils_install"], "curl_usage_install"] + , "deps": [["utils", "test_utils_install"], "curl_usage_install"] } , "curl_url": { "type": ["@", "rules", "CC/test", "test"] @@ -37,8 +37,8 @@ , "srcs": ["curl_url.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/other_tools/utils", "curl_url_handle"] + , ["", "catch-main"] + , ["@", "src", "src/other_tools/utils", "curl_url_handle"] ] , "stage": ["test", "other_tools", "utils"] } diff --git a/test/utils/TARGETS b/test/utils/TARGETS index fd94f48c..c8fe2f19 100644 --- a/test/utils/TARGETS +++ b/test/utils/TARGETS @@ -11,7 +11,7 @@ , "hdrs": ["remote_execution/bazel_action_creator.hpp"] , "deps": [ ["@", "gsl", "", "gsl"] - , ["src/buildtool/execution_api/remote", "bazel_network"] + , ["@", "src", "src/buildtool/execution_api/remote", "bazel_network"] ] , "stage": ["test", "utils"] } @@ -19,7 +19,7 @@ { "type": ["@", "rules", "CC", "library"] , "name": ["log_config"] , "hdrs": ["logging/log_config.hpp"] - , "deps": [["src/buildtool/logging", "logging"]] + , "deps": [["@", "src", "src/buildtool/logging", "logging"]] , "stage": ["test", "utils"] } , "test_env": @@ -28,8 +28,8 @@ , "hdrs": ["test_env.hpp"] , "deps": [ "log_config" - , ["src/buildtool/compatibility", "compatibility"] - , ["src/buildtool/auth", "auth"] + , ["@", "src", "src/buildtool/compatibility", "compatibility"] + , ["@", "src", "src/buildtool/auth", "auth"] ] , "stage": ["test", "utils"] } @@ -38,11 +38,11 @@ , "name": ["local_hermeticity"] , "hdrs": ["hermeticity/local.hpp"] , "deps": - [ ["src/buildtool/common", "common"] - , ["src/buildtool/execution_api/local", "config"] - , ["src/buildtool/execution_api/local", "local"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/buildtool/logging", "logging"] + [ ["@", "src", "src/buildtool/common", "common"] + , ["@", "src", "src/buildtool/execution_api/local", "config"] + , ["@", "src", "src/buildtool/execution_api/local", "local"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/logging", "logging"] ] , "stage": ["test", "utils"] } @@ -52,10 +52,10 @@ , "srcs": ["remote_execution/main-remote-execution.cpp"] , "deps": [ ["@", "catch2", "", "catch2"] - , ["src/buildtool/execution_api/remote", "config"] - , ["src/buildtool/storage", "storage"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/buildtool/compatibility", "compatibility"] + , ["@", "src", "src/buildtool/execution_api/remote", "config"] + , ["@", "src", "src/buildtool/storage", "storage"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/buildtool/compatibility", "compatibility"] , "log_config" , "test_env" ] @@ -64,7 +64,7 @@ , "test_utils_install": { "type": "install" , "tainted": ["test"] - , "files": {"utils/run_test_server.py": ["test/utils", "run_test_server.py"]} + , "files": {"utils/run_test_server.py": "run_test_server.py"} } , "shell_quoting": { "type": ["@", "rules", "CC", "library"] diff --git a/test/utils/cpp/TARGETS b/test/utils/cpp/TARGETS index 16daa3c7..702172b4 100644 --- a/test/utils/cpp/TARGETS +++ b/test/utils/cpp/TARGETS @@ -4,8 +4,8 @@ , "srcs": ["path.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/utils/cpp", "path"] + , ["", "catch-main"] + , ["@", "src", "src/utils/cpp", "path"] ] , "stage": ["test", "utils", "cpp"] } @@ -15,10 +15,10 @@ , "srcs": ["file_locking.test.cpp"] , "private-deps": [ ["@", "catch2", "", "catch2"] - , ["test", "catch-main"] - , ["src/buildtool/file_system", "file_system_manager"] - , ["src/utils/cpp", "file_locking"] - , ["src/utils/cpp", "atomic"] + , ["", "catch-main"] + , ["@", "src", "src/buildtool/file_system", "file_system_manager"] + , ["@", "src", "src/utils/cpp", "file_locking"] + , ["@", "src", "src/utils/cpp", "atomic"] ] , "stage": ["test", "utils", "cpp"] , "private-ldflags": ["-pthread"] diff --git a/test/utils/remote_execution/RULES b/test/utils/remote_execution/RULES index 340fc83b..ea1057ba 100644 --- a/test/utils/remote_execution/RULES +++ b/test/utils/remote_execution/RULES @@ -29,7 +29,7 @@ , "implicit": { "defaults": [["@", "rules", "CC", "defaults"]] , "runner": ["test_runner.py"] - , "just": [["", "just"]] + , "just": [["@", "src", "", "just"]] } , "field_doc": { "name": |