forked from Mirror/pmbootstrap
CI started failing with: /builds/ollieparanoid/pmbootstrap/venv/bin/python3: No module named pytest I've briefly tried to fix this with the existing scripts. However, instead of investing more time into that, do the long overdue refactoring of the scripts that involve dropping the venv logic and support for a custon gitlab-ci-runner using some python docker image as base. This configuration hasn't been used for a long time and is probably broken anyway. Refactor the logic to skip the qemu test case in gitlab CI by using pytest markers. The new script is now similar to bpo's .ci/pytest.py.
24 lines
826 B
Bash
Executable file
24 lines
826 B
Bash
Executable file
#!/bin/sh -e
|
|
topdir="$(realpath "$(dirname "$0")/..")"
|
|
cd "$topdir"
|
|
|
|
# Make sure that the work folder format is up to date, and that there are no
|
|
# mounts from aborted test cases (#1595)
|
|
./pmbootstrap.py work_migrate
|
|
./pmbootstrap.py -q shutdown
|
|
|
|
# Make sure we have a valid device (#1128)
|
|
device="$(./pmbootstrap.py config device)"
|
|
pmaports="$(./pmbootstrap.py config aports)"
|
|
deviceinfo="$(ls -1 "$pmaports"/device/*/device-"$device"/deviceinfo)"
|
|
if ! [ -e "$deviceinfo" ]; then
|
|
echo "ERROR: Could not find deviceinfo file for selected device:" \
|
|
"$device"
|
|
echo "Expected path: $deviceinfo"
|
|
echo "Maybe you have switched to a branch where your device does not"
|
|
echo "exist? Use 'pmbootstrap config device qemu-amd64' to switch to"
|
|
echo "a valid device."
|
|
exit 1
|
|
fi
|
|
|
|
pytest -vv -x --cov=pmb test -m "not skip_ci" "$@"
|