diff --git a/docker/scripts/install-deps.sh b/docker/scripts/install-deps.sh index f8881d05..fc068b06 100755 --- a/docker/scripts/install-deps.sh +++ b/docker/scripts/install-deps.sh @@ -8,7 +8,7 @@ pacman -Syu --noconfirm --noprogressbar \ --cachedir .pkg-cache git gpgme nginx redis openssh \ mariadb mariadb-libs cgit uwsgi uwsgi-plugin-cgi \ php php-fpm memcached php-memcached python-pip pyalpm \ - python-srcinfo curl + python-srcinfo curl libeatmydata # https://python-poetry.org/docs/ Installation section. curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - diff --git a/docker/scripts/run-pytests.sh b/docker/scripts/run-pytests.sh index c6baa939..ef8a2318 100755 --- a/docker/scripts/run-pytests.sh +++ b/docker/scripts/run-pytests.sh @@ -27,7 +27,7 @@ python -m aurweb.initdb 2>/dev/null || \ (echo "Error: aurweb.initdb failed; already initialized?" && /bin/true) # Run pytest with optional targets in front of it. -make -C test "${PARAMS[@]}" pytest +eatmydata -- make -C test "${PARAMS[@]}" pytest # By default, report coverage and move it into cache. if [ $COVERAGE -eq 1 ]; then diff --git a/docker/scripts/run-sharness.sh b/docker/scripts/run-sharness.sh index 8e928b3f..fe16751c 100755 --- a/docker/scripts/run-sharness.sh +++ b/docker/scripts/run-sharness.sh @@ -4,4 +4,4 @@ set -eou pipefail # Initialize the new database; ignore errors. python -m aurweb.initdb 2>/dev/null || /bin/true -make -C test sh +eatmydata -- make -C test sh diff --git a/test/README.md b/test/README.md index ef8a08f4..13fb0a0c 100644 --- a/test/README.md +++ b/test/README.md @@ -31,6 +31,10 @@ For all the test to run, the following Arch packages should be installed: - postfix - openssh +Optional (faster testing) + +- libeatmydata + Test Configuration ------------------ @@ -115,6 +119,12 @@ To run `pytest` Python test suites: $ make -C test pytest +**Note:** For SQLite tests, users may want to use `eatmydata` +to improve speed: + + $ eatmydata -- make -C test sh + $ eatmydata -- make -C test pytest + To produce coverage reports related to Python when running tests manually, use the following method: