2024-09-18 20:51:23 +00:00
|
|
|
#!/bin/bash
|
2024-10-01 19:50:10 +00:00
|
|
|
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1
|
|
|
|
|
2024-10-17 01:38:36 +00:00
|
|
|
box() {
|
|
|
|
len=${#1}
|
|
|
|
echo "┌─$(printf '─%.0s' $(seq 1 "$len"))─┐"
|
|
|
|
echo "│ $1 │"
|
|
|
|
echo "└─$(printf '─%.0s' $(seq 1 "$len"))─┘"
|
|
|
|
}
|
|
|
|
|
2024-10-01 19:50:10 +00:00
|
|
|
rebuild=true
|
|
|
|
|
2024-10-17 01:38:36 +00:00
|
|
|
cd runtime-pyside6/tests/plugins || exit 1
|
|
|
|
box "Testing pytest natural plugins..."
|
2024-10-17 01:44:35 +00:00
|
|
|
PYTHONPATH="$PYTHONPATH:." pytest --cov=natural --cov-report term-missing . || exit 1
|
2024-10-17 01:38:36 +00:00
|
|
|
cd ../../../
|
|
|
|
|
2024-10-01 19:50:10 +00:00
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case "$1" in
|
|
|
|
--no-rebuild)
|
|
|
|
rebuild=false
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
box "Error: Invalid argument."
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$rebuild" == "true" ]; then
|
|
|
|
rm -rf build
|
|
|
|
bash scripts/build.sh
|
|
|
|
fi
|
|
|
|
|
2024-09-18 20:51:23 +00:00
|
|
|
|
2024-09-29 23:27:30 +00:00
|
|
|
|
2024-09-18 20:51:23 +00:00
|
|
|
# Run python tests
|
2024-10-16 03:38:49 +00:00
|
|
|
rm -rf build/runtime-pyside6/tests
|
2024-09-29 23:27:30 +00:00
|
|
|
cp -r runtime-pyside6/tests build/runtime-pyside6
|
2024-09-29 23:35:24 +00:00
|
|
|
cp -r ci CHANGELOG.md build/runtime-pyside6
|
|
|
|
cd build/runtime-pyside6 || exit 1
|
2024-10-17 01:38:36 +00:00
|
|
|
box "Testing runtime-pyside6..."
|
2024-10-17 01:44:35 +00:00
|
|
|
PYTHONPATH="$PYTHONPATH:." pytest --cov=LogarithmPlotter --cov-report term-missing . || exit 1
|
2024-09-29 23:35:24 +00:00
|
|
|
cd ../../
|
|
|
|
|
|
|
|
# Run js tests
|
2024-10-01 19:50:10 +00:00
|
|
|
cd common || exit 1
|
2024-10-17 01:38:36 +00:00
|
|
|
box "Testing common..."
|
2024-10-17 01:44:35 +00:00
|
|
|
npm test || exit 1
|
2024-09-18 20:51:23 +00:00
|
|
|
|