Files
copyparty/scripts/run-tests.sh

48 lines
809 B
Bash
Raw Normal View History

2021-06-01 05:49:41 +02:00
#!/bin/bash
set -ex
2022-06-16 01:07:15 +02:00
rm -rf unt
mkdir -p unt/srv
cp -pR copyparty tests unt/
cd unt
2022-12-03 15:07:47 +00:00
# resolve symlinks
set +x
find -type l |
while IFS= read -r f1; do (
cd "${f1%/*}"
f1="./${f1##*/}"
f2="$(readlink "$f1")"
[ -e "$f2" ] || f2="../$f2"
[ -e "$f2" ] || {
echo could not resolve "$f1"
exit 1
}
rm "$f1"
cp -p "$f2" "$f1"
); done
set -x
2022-06-16 01:07:15 +02:00
python3 ../scripts/strip_hints/a.py
2021-06-01 05:49:41 +02:00
pids=()
for py in python{2,3}; do
[ ${1:0:6} = python ] && [ $1 != $py ] && continue
2022-06-16 01:07:15 +02:00
PYTHONPATH=
2022-12-03 15:07:47 +00:00
[ $py = python2 ] && PYTHONPATH=../scripts/py2:../sfx/py37
2022-06-16 01:07:15 +02:00
export PYTHONPATH
2021-06-12 01:39:14 +02:00
nice $py -m unittest discover -s tests >/dev/null &
2021-06-01 05:49:41 +02:00
pids+=($!)
done
2022-09-18 00:16:40 +02:00
[ "$1" ] || {
python3 ../scripts/test/smoketest.py &
pids+=($!)
}
2021-06-12 01:39:14 +02:00
2021-06-01 05:49:41 +02:00
for pid in ${pids[@]}; do
wait $pid
done