test/testcases_fast.sh: stop hardcoding testing/ directory (!1899)

Take the change from pmaports that expands a glob for more flexibility.
This commit is contained in:
Minecrell 2020-03-31 15:09:19 +02:00 committed by Alexey Min
parent 37cc4454a4
commit b4c54636b3
No known key found for this signature in database
GPG Key ID: EBF5ECFFFEE34DED
1 changed files with 3 additions and 2 deletions

View File

@ -21,8 +21,9 @@ cd "$(dirname "$0")/.."
# Make sure we have a valid device (#1128)
device="$(./pmbootstrap.py config device)"
work="$(./pmbootstrap.py config work)"
deviceinfo="$work/cache_git/pmaports/device/testing/device-$device/deviceinfo"
if ! [ -e "$deviceinfo" ]; then
deviceinfo="$work/cache_git/pmaports/device/*/device-$device/deviceinfo"
# shellcheck disable=SC2086
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 exist?"