From 5700e20a3c8321b70270a21579fcc15f5bbc1db2 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 21 Jan 2025 09:53:13 +0100 Subject: Test: Compute an absent tree structure of a local root --- .../tree-structure/absent_tree_structure.sh | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'test') diff --git a/test/end-to-end/tree-structure/absent_tree_structure.sh b/test/end-to-end/tree-structure/absent_tree_structure.sh index c7ab70e9..24e9498d 100644 --- a/test/end-to-end/tree-structure/absent_tree_structure.sh +++ b/test/end-to-end/tree-structure/absent_tree_structure.sh @@ -28,6 +28,13 @@ if [ "${COMPATIBLE:-}" = "YES" ]; then COMPAT="--compatible" fi +readonly LOCAL_REPO="${ROOT}/local" +mkdir -p "${LOCAL_REPO}/src/foo/nested_foo" +echo foo > "${LOCAL_REPO}/src/foo/nested_foo/file.txt" + +mkdir -p "${LOCAL_REPO}/src/bar/nested_bar" +echo bar > "${LOCAL_REPO}/src/bar/nested_bar/file.txt" + readonly MAIN_REPO="${ROOT}/main" mkdir -p "${MAIN_REPO}" cd "${MAIN_REPO}" @@ -91,6 +98,23 @@ cat > repo-config.json < absent.json <<'EOF' +["structure_local"] +EOF + +echo +echo "Absent tree structure root of a local root." +echo "Expected to be computed locally and uploaded to serve:" +("${JUST_MR}" --rc "${RCFILE}" \ + --local-build-root "${LBRDIR}/absent_local" -C repo-config.json \ + -r "${REMOTE_EXECUTION_ADDRESS}" -R "${SERVE}" ${COMPAT} \ + --main result_local -L '["env", "PATH='"${PATH}"'"]' --log-limit 4 \ + --just "${JUST}" install -o "${OUT}/absent_local" 2>&1) \ + > "${OUT}/log_absent_local" + +echo +cat "${OUT}/log_absent_local" + +grep 'Root \["tree structure", "local", {"absent": true}\] was computed locally and uploaded to serve' \ + "${OUT}/log_absent_local" + +echo +cat "${OUT}/absent_local/result.txt" + echo OK -- cgit v1.2.3