run-tests.sh 666 Bytes
Newer Older
Kevin Morris's avatar
Kevin Morris committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
set -eou pipefail
dir=$(dirname $0)

# Clean up coverage and stuff.
make -C test clean

# Run sharness tests.
bash $dir/run-sharness.sh

# Run Python tests with MariaDB database.
# Pass --silence to avoid reporting coverage. We will do that below.
bash $dir/run-pytests.sh --no-coverage

make -C test coverage

17
# /data is mounted as a volume. Copy coverage into it.
Kevin Morris's avatar
Kevin Morris committed
18
# Users can then sanitize the coverage locally in their
19
20
21
22
# aurweb root directory: ./util/fix-coverage ./data/.coverage
rm -f /data/.coverage
cp -v .coverage /data/.coverage
chmod 666 /data/.coverage
Kevin Morris's avatar
Kevin Morris committed
23

24
# Run pre-commit checks
Kevin Morris's avatar
Kevin Morris committed
25
for dir in aurweb test migrations; do
26
    pre-commit run -a
Kevin Morris's avatar
Kevin Morris committed
27
done