3 # Copyright (c) 2024 Mark Jamsek <mark@jamsek.dev>
4 # Copyright (c) 2022 Stefan Sperling <stsp@openbsd.org>
6 # Permission to use, copy, modify, and distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 .
${GOTWEBD_TEST_DATA_DIR}/common.sh
24 local repo_path
="${chroot}/got/public/repo.git"
26 if [ -e "${chroot}/got" ]; then
27 rm -rf "${chroot}/got"
30 mkdir
-p "${chroot}/got/public"
32 echo "failed to make gotweb public repositories tree"
36 gotadmin init
-A "$GOT_TEST_ALGO" "${repo_path}"
38 if [ -n "$no_tree" ]; then
42 test_tree
=$
(mktemp
-d "${chroot}/gotwebd-test-tree-XXXXXXXXXX")
43 make_test_tree
"$test_tree"
45 got import
-m "import the test tree" -r "${repo_path}" "$test_tree" \
48 echo "failed to import test tree"
52 rm -r "$test_tree" # TODO: trap