File: run-full-tests

package info (click to toggle)
borgmatic 2.0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,752 kB
  • sloc: python: 58,506; sh: 150; makefile: 8; javascript: 5
file content (29 lines) | stat: -rwxr-xr-x 1,178 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

# This script installs test dependencies and runs all tests, including end-to-end tests. It
# is designed to run inside a test container, and presumes that other test infrastructure like
# databases are already running. Therefore, on a developer machine, you should not run this script
# directly. Instead, run scripts/run-end-to-end-tests
#
# For more information, see:
# https://torsion.org/borgmatic/how-to/develop-on-borgmatic/

set -e

if [ -z "$TEST_CONTAINER" ]; then
    echo "This script is designed to work inside a test container and is not intended to"
    echo "be run manually. If you're trying to run borgmatic's end-to-end tests, execute"
    echo "scripts/run-end-to-end-dev-tests instead."
    exit 1
fi

apk add --no-cache python3 py3-pip borgbackup postgresql17-client mariadb-client mongodb-tools \
    py3-mongo py3-regex py3-ruamel.yaml py3-ruamel.yaml.clib py3-tox py3-yaml ruff sqlite uv bash \
    fish
export SHELL=/bin/bash
export PATH="/root/.local/bin:$PATH"
uv tool install tox --with tox-uv
export COVERAGE_FILE=/tmp/.coverage

tox --workdir /tmp/.tox -e py311,py314 --sitepackages
tox --workdir /tmp/.tox --sitepackages -e end-to-end