Artifact 6abba00d2f89fe2fe9f6246831922ccd28753e5085b28317d67d54bd30833706:
- File
test/make_project_fixture.sh
— part of check-in
[d74c54957c]
at
2026-11-13 05:53:44
on branch trunk
— Phase 4b-1: suit finds your projects and gives each its key
suit roots names the folders to look in. suit projects scan walks them and lists each project with its key: the remote address reduced to host and path. suit project set gives a key by hand.
git: the key is read from the project's own config file, and a linked worktree gets its project's key. Fossil: read from the checkout's database through SQLite. zit: no key from a scan; one is set by hand. The scan runs no other program, follows no symlink, and does not look inside a project for more projects.
A user name or password in a remote address never reaches suit's files or output; a test checks it.
Nothing is placed in a project yet. That is the next piece.
993 unit checks, 227 shell cases, 146 store cases, 612 placement cases and 118 project cases, under clang and under gcc 16. 100% coverage in all 18 source files. A fourth fuzz target covers the new file formats, with 297 inputs checked in. (user: dmestas, size: 1091) [annotate] [blame] [check-ins using]
#!/bin/sh # Rebuilds the Fossil project fixture in test/fixtures/fossil-project/ with # stock fossil and the sqlite3 shell: ckout.db is a checkout's .fslckout (the # test copies it to a folder as .fslckout; a file of that name is not kept in a # Fossil repository) and repo.fossil is the repository it names, as # "../repo.fossil", with a last-sync-url that has a user name, an upper-case # host and a trailing slash. Checked in, so the project tests run on machines # without fossil; this script only exists to remake them. set -eu out=$(cd "${1:-test/fixtures/fossil-project}" && pwd) work=$(mktemp -d "${TMPDIR:-/tmp}/suit-fixture.XXXXXX") trap 'rm -rf "$work"' EXIT INT TERM fossil new --admin-user fixture "$work/repo.fossil" >/dev/null mkdir "$work/co" && cd "$work/co" fossil open ../repo.fossil >/dev/null sqlite3 "$work/repo.fossil" "INSERT OR REPLACE INTO config(name, value, mtime) VALUES ('last-sync-url', 'https://[email protected]/r/owner/wardrobe/', 0)" sqlite3 "$work/repo.fossil" "VACUUM" cp "$work/repo.fossil" "$out/repo.fossil" cp "$work/co/.fslckout" "$out/ckout.db"