summaryrefslogtreecommitdiff
path: root/test/end-to-end/git-import
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-21 10:38:32 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-21 11:30:15 +0200
commitbfeb5b0c39be7ebb27a18264221067c94ddb857e (patch)
tree3991998d380219df59475dbe495d5b731dba5a14 /test/end-to-end/git-import
parent50c4a0011da398f9b57cfab46f96a38e2b5b22ad (diff)
downloadjustbuild-bfeb5b0c39be7ebb27a18264221067c94ddb857e.tar.gz
tree_strcuture test: provide launcher also for just-mr
While there, remove tray cat whitesapce and redetermine the working directory instead of relying on the environment.
Diffstat (limited to 'test/end-to-end/git-import')
-rw-r--r--test/end-to-end/git-import/tree_structure.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/end-to-end/git-import/tree_structure.sh b/test/end-to-end/git-import/tree_structure.sh
index dc1a27e2..0b582740 100644
--- a/test/end-to-end/git-import/tree_structure.sh
+++ b/test/end-to-end/git-import/tree_structure.sh
@@ -15,7 +15,7 @@
set -e
-readonly ROOT="${PWD}"
+readonly ROOT="$(pwd)"
readonly DEDUPLICATE="${ROOT}/bin/deduplicate-tool-under-test"
readonly GIT_IMPORT="${ROOT}/bin/git-import-under-test"
readonly JUST="${ROOT}/bin/tool-under-test"
@@ -49,7 +49,6 @@ cat > TARGETS << 'EOF'
}
}
EOF
-cat
echo
echo "Creating repos.json at ${FOO_REPO}:"
@@ -133,13 +132,13 @@ cat TARGETS
echo
echo "Creating TARGETS.result at ${MAIN_ROOT}:"
cat > TARGETS.result << 'EOF'
-{ "rename_1":
+{ "rename_1":
{ "type": "generic"
, "cmds": ["mv out.txt foo.txt"]
, "outs": ["foo.txt"]
, "deps": [["@", "structure_1", "", ""]]
}
-, "rename_2":
+, "rename_2":
{ "type": "generic"
, "cmds": ["mv out.txt bar.txt"]
, "outs": ["bar.txt"]
@@ -205,8 +204,8 @@ cat repos-full.json
# Dump the graph before deduplication:
echo
"${JUST_MR}" -C repos-full.json --norc --just "${JUST}" \
- --local-build-root "${LBR}" --main "result" analyse \
- -L '["env", "PATH='"${PATH}"'"]' \
+ --local-build-root "${LBR}" --main "result" \
+ -L '["env", "PATH='"${PATH}"'"]' analyse \
--dump-plain-graph actions-full.json 2>&1
# Run deduplication:
@@ -217,8 +216,8 @@ echo
# Dump the graph after deduplication:
"${JUST_MR}" -C repos.json --norc --just "${JUST}" \
- --local-build-root "${LBR}" --main "result" analyse \
- -L '["env", "PATH='"${PATH}"'"]' \
+ --local-build-root "${LBR}" --main "result" \
+ -L '["env", "PATH='"${PATH}"'"]' analyse \
--dump-plain-graph actions.json 2>&1
# Verify that we reduced the number of repositories, but did
@@ -230,7 +229,7 @@ cmp actions-full.json actions.json
echo
"${JUST_MR}" -C repos.json --norc --just "${JUST}" \
--local-build-root "${LBR}" --main "result" \
- install -L '["env", "PATH='"${PATH}"'"]' \
+ -L '["env", "PATH='"${PATH}"'"]' install \
-o "${OUT}/result" 2>&1
echo OK