equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 set -e |
|
4 set -x |
|
5 |
|
6 ### Setup tests |
|
7 |
|
8 find cubicweb -type d -name 'test' | while read dir; do |
|
9 mkdir -p "$AUTOPKGTEST_TMP"/$(dirname "$dir") |
|
10 cp -r "$dir" "$AUTOPKGTEST_TMP/$dir" |
|
11 done |
|
12 chown -R nobody:nogroup "$AUTOPKGTEST_TMP" |
|
13 |
|
14 ### Find PostgreSQL binaries |
|
15 |
|
16 POSTGRESQL_BINDIR=$(find /usr/lib/postgresql -type f -name 'initdb' -printf "%h\n" | head -n 1) |
|
17 test "$POSTGRESQL_BINDIR" || { echo "Unable to find 'initdb'" >&2; exit 1; } |
|
18 |
|
19 ### Run tests |
|
20 |
|
21 for py in $(py3versions -r 2>/dev/null); do |
|
22 cd "$AUTOPKGTEST_TMP" |
|
23 echo "Testing with $py:" |
|
24 su nobody --shell /bin/sh \ |
|
25 -c "env PATH='$PATH:$POSTGRESQL_BINDIR' $py -m pytest -v" |
|
26 done |