summaryrefslogtreecommitdiff
path: root/test/end-to-end
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-02-17 10:05:15 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-02-20 15:33:53 +0100
commite749a97621d445de5e0dec89ab840dd61839d872 (patch)
tree87f5290818f07def99b0a76e6e088614c5664a91 /test/end-to-end
parent377b216dea73254f8d8e37868484be69a746678a (diff)
downloadjustbuild-e749a97621d445de5e0dec89ab840dd61839d872.tar.gz
just-lock: Improve handling of pragmas in 'repos' import description
In particular, any transitive 'file'-type repository will inherit any given '{to_git: true}' pragma in the import description objects. Note that this technically can only happen for transitive 'file' repositories imported from a 'file' source, so in all other cases such a pragma would not have any effect. Document change and extend the import from 'file' source test to check this feature.
Diffstat (limited to 'test/end-to-end')
-rw-r--r--test/end-to-end/just-lock/file-imports.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/end-to-end/just-lock/file-imports.sh b/test/end-to-end/just-lock/file-imports.sh
index 71dc5edc..e61ac834 100644
--- a/test/end-to-end/just-lock/file-imports.sh
+++ b/test/end-to-end/just-lock/file-imports.sh
@@ -77,7 +77,7 @@ cat > repos.in.json <<EOF
}
, "imports":
[ { "source": "file"
- , "repos": [{"alias": "foo"}]
+ , "repos": [{"alias": "foo", "pragma": {"to_git": true}}]
, "path": "${REPO_DIRS}/foo"
}
, { "source": "file"
@@ -94,6 +94,10 @@ echo
"${JUST_LOCK}" -C repos.in.json -o repos.json --local-build-root "${LBR}" 2>&1
cat repos.json
echo
+# Check pragmas for repo "foo" are correctly set
+[ $(jq -r '.repositories.foo.repository.pragma.special' repos.json) = "resolve-completely" ]
+[ $(jq -r '.repositories.foo.repository.pragma.to_git' repos.json) = true ]
+# Check the symlink gets resolved as expected
"${JUST_MR}" -L '["env", "PATH='"${PATH}"'"]' --norc --just "${JUST}" --local-build-root "${LBR}" install -o "${OUT}" 2>&1
echo
cat "${OUT}/out.txt"