summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-05 12:00:21 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-10 16:07:46 +0200
commitce33e03626ccba3ddf24dbf3786649c2d5624157 (patch)
tree6aaefd5d258f58aba6f9481164f944e1930772d6
parent438a1fb7c1a6437298fed95ec440dec7cb96f815 (diff)
downloadjustbuild-ce33e03626ccba3ddf24dbf3786649c2d5624157.tar.gz
end-to-end tests: fix tool set up
For historic reasons (as quite some tests date back till before the public name of the build tools was decided), the end-to-end tests assume generic names for the tools. This used to be done by simple staging the artifacts. As soon as we started to support dynamic linking, we also have to allow the runtime dependnecies, as provided by our install-with-deps rule. ae2e515ab84ea3ab08764685f84441c0741f8039 attempted to add those dependencies by replacing the staging by a generic action doing a copy. This, however, made the "lib" dir containing the dependencies an opaque tree - defined by different actions, and, more importantly, - containing only the run-time dependencies of one of the tools. This causes staging conflicts between those two lib dirs (currently hidden by a bug in the computation of the disjoint union) and things only worked because in the canonical configuration used for testing both "lib" dirs are empty anyway. The correct way of adding dependencies while renaming the tool is still staging; fix this. (cherry picked from commit ddd2f5937a9016f5ff2f6bf659ba459129e49826)
-rw-r--r--CHANGELOG.md1
-rw-r--r--test/end-to-end/TARGETS41
2 files changed, 14 insertions, 28 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e9d1166..74a5450c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ Bug fixes on top of release `1.2.4`.
if not called `just`.
- Taintedness of "configure" targets is now propagated correctly.
- Missing atomic primitives added to the source code.
+- A staging conflict in the test setup was fixed.
## Release `1.2.4` (2023-12-19)
diff --git a/test/end-to-end/TARGETS b/test/end-to-end/TARGETS
index bfb14dfc..cd254cb7 100644
--- a/test/end-to-end/TARGETS
+++ b/test/end-to-end/TARGETS
@@ -1,39 +1,24 @@
{ "tool-under-test":
- { "type": "generic"
- , "cmds": ["mkdir -p bin lib", "mv bin/just bin/tool-under-test"]
- , "outs": ["bin/tool-under-test"]
- , "out_dirs": ["lib"]
- , "deps": [["@", "src", "", "installed just"]]
+ { "type": "install"
+ , "dirs": [[["@", "src", "", "installed just"], "."]]
+ , "files": {"bin/tool-under-test": ["@", "src", "", "just"]}
}
, "mr-tool-under-test":
- { "type": "generic"
+ { "type": "install"
, "arguments_config": ["TEST_BOOTSTRAP_JUST_MR"]
- , "cmds":
- [ "mkdir -p bin lib"
- , { "type": "join_cmd"
- , "$1":
- [ "mv"
- , { "type": "if"
- , "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"}
- , "then": "bin/just-mr.py"
- , "else": "bin/just-mr"
- }
- , "bin/mr-tool-under-test"
- ]
- }
- ]
- , "outs": ["bin/mr-tool-under-test"]
- , "out_dirs":
+ , "dirs":
{ "type": "if"
, "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"}
, "then": []
- , "else": ["lib"]
+ , "else": [[["@", "src", "", "installed just-mr"], "."]]
}
- , "deps":
- { "type": "if"
- , "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"}
- , "then": [["@", "src", "", "bin/just-mr.py"]]
- , "else": [["@", "src", "", "installed just-mr"]]
+ , "files":
+ { "bin/mr-tool-under-test":
+ { "type": "if"
+ , "cond": {"type": "var", "name": "TEST_BOOTSTRAP_JUST_MR"}
+ , "then": ["@", "src", "", "bin/just-mr.py"]
+ , "else": ["@", "src", "", "just-mr"]
+ }
}
}
, "git-import-under-test":