diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-03-21 10:31:11 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-03-21 13:13:50 +0100 |
commit | 53ef14352f9e1101972ca6fa22b19074321317fa (patch) | |
tree | 20181c82128d4f5ad9090ea5d3b95c873c8a8db0 /test | |
parent | 91ae0a4b683fa29261ddf0508576231144fe8a85 (diff) | |
download | justbuild-53ef14352f9e1101972ca6fa22b19074321317fa.tar.gz |
Move end-to-end tests to a common place
While for unit tests it is best practice to replicate the layout
of the source tree, for end-to-end tests, this is less so. This
is particularly true, as the distinction between the tests for two
tools is a bit blurry; some tests for just still use just-mr as a
launcher, and, e.g., the fetch test for just-mr uses just to carry
out the garbage collection. Therefore, move all end-to-end tests
together so that we also have a joinded target for precisely the
end-to-end tests.
In this reorganisation also indicate more explicitly which tests are
also available for the bootstrap multi-repo tool. That information
was so far hidden by the fact that in the other directory the tool
dependency would not dispatch on TEST_BOOTSTRAP_JUST_MR.
Diffstat (limited to 'test')
-rw-r--r-- | test/end-to-end/just-mr/TARGETS | 43 | ||||
-rw-r--r-- | test/end-to-end/just-mr/create_test_archives.cpp (renamed from test/other_tools/just_mr/create_test_archives.cpp) | 0 | ||||
-rw-r--r-- | test/end-to-end/just-mr/just-mr.test.sh (renamed from test/other_tools/just_mr/just-mr.test.sh) | 6 | ||||
-rw-r--r-- | test/end-to-end/just-mr/verbosity.sh (renamed from test/other_tools/just_mr/verbosity.sh) | 2 | ||||
-rw-r--r-- | test/other_tools/TARGETS | 1 | ||||
-rw-r--r-- | test/other_tools/just_mr/TARGETS | 40 |
6 files changed, 44 insertions, 48 deletions
diff --git a/test/end-to-end/just-mr/TARGETS b/test/end-to-end/just-mr/TARGETS index 417aee2c..d0f21d47 100644 --- a/test/end-to-end/just-mr/TARGETS +++ b/test/end-to-end/just-mr/TARGETS @@ -19,9 +19,50 @@ , ["test/end-to-end", "tool-under-test"] ] } +, "create_test_archives": + { "type": ["@", "rules", "CC", "binary"] + , "tainted": ["test"] + , "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"] + ] + , "private-ldflags": ["-pthread"] + , "stage": ["src"] + } +, "just_mr_mp": + { "type": ["@", "rules", "shell/test", "script"] + , "name": ["just_mr_mp"] + , "test": ["just-mr.test.sh"] + , "deps": + [ "create_test_archives" + , ["test/utils", "test_utils_install"] + , ["test/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"]] + } , "TESTS": { "type": "install" , "tainted": ["test"] - , "deps": ["cas-independent", "fetch", "fetch-gc"] + , "arguments_config": ["TEST_BOOTSTRAP_JUST_MR"] + , "deps": + { "type": "++" + , "$1": + [ ["cas-independent", "fetch", "fetch-gc"] + , { "type": "if" + , "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"} + , "then": [] + , "else": ["just_mr_mp", "git-tree-verbosity"] + } + ] + } } } diff --git a/test/other_tools/just_mr/create_test_archives.cpp b/test/end-to-end/just-mr/create_test_archives.cpp index 2f4327b7..2f4327b7 100644 --- a/test/other_tools/just_mr/create_test_archives.cpp +++ b/test/end-to-end/just-mr/create_test_archives.cpp diff --git a/test/other_tools/just_mr/just-mr.test.sh b/test/end-to-end/just-mr/just-mr.test.sh index 3c1f669a..fa18477c 100644 --- a/test/other_tools/just_mr/just-mr.test.sh +++ b/test/end-to-end/just-mr/just-mr.test.sh @@ -27,11 +27,7 @@ server_cleanup() { readonly ROOT=`pwd` readonly WRKDIR="${TEST_TMPDIR}/wrkdir" -# set the just-mr versions to be run -# Python version won't be able to find wget, unzip, and tar - -# readonly JUST_MR_PY="${ROOT}/bin/just-mr.py" -readonly JUST_MR_CPP="${ROOT}/bin/just-mr-under-test" +readonly JUST_MR_CPP="${ROOT}/bin/mr-tool-under-test" # set paths readonly SERVER_ROOT="${TEST_TMPDIR}/server-root" diff --git a/test/other_tools/just_mr/verbosity.sh b/test/end-to-end/just-mr/verbosity.sh index 4aa0c600..7cc9bd52 100644 --- a/test/other_tools/just_mr/verbosity.sh +++ b/test/end-to-end/just-mr/verbosity.sh @@ -16,7 +16,7 @@ set -eu -readonly JUST_MR="${PWD}/bin/just-mr-under-test" +readonly JUST_MR="${PWD}/bin/mr-tool-under-test" readonly TOOLS_DIR="${TEST_TMPDIR}/tools" readonly COMPUTE_TREE_DIR="${TEST_TMPDIR}/generate-the-tree-id" readonly LBR="${TEST_TMPDIR}/local-build-root" diff --git a/test/other_tools/TARGETS b/test/other_tools/TARGETS index a5ad01be..8d2ec2e7 100644 --- a/test/other_tools/TARGETS +++ b/test/other_tools/TARGETS @@ -3,7 +3,6 @@ , "tainted": ["test"] , "dirs": [ [["./", "git_operations", "TESTS"], "git_operations"] - , [["./", "just_mr", "TESTS"], "just_mr"] , [["./", "utils", "TESTS"], "utils"] ] } diff --git a/test/other_tools/just_mr/TARGETS b/test/other_tools/just_mr/TARGETS deleted file mode 100644 index 699abed8..00000000 --- a/test/other_tools/just_mr/TARGETS +++ /dev/null @@ -1,40 +0,0 @@ -{ "just_mr_install": - { "type": "install" - , "files": {"bin/just-mr-under-test": ["src/other_tools/just_mr", "just-mr"]} - } -, "create_test_archives": - { "type": ["@", "rules", "CC", "binary"] - , "tainted": ["test"] - , "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"] - ] - , "private-ldflags": ["-pthread"] - , "stage": ["src"] - } -, "just_mr_mp": - { "type": ["@", "rules", "shell/test", "script"] - , "name": ["just_mr_mp"] - , "test": ["just-mr.test.sh"] - , "deps": - [ "create_test_archives" - , ["test/utils", "test_utils_install"] - , "just_mr_install" - ] - } -, "git-tree-verbosity": - { "type": ["@", "rules", "shell/test", "script"] - , "name": ["git-tree-verbosity"] - , "test": ["verbosity.sh"] - , "deps": ["just_mr_install"] - } -, "TESTS": - { "type": "install" - , "tainted": ["test"] - , "deps": ["just_mr_mp", "git-tree-verbosity"] - } -} |