Multiple platform support in Register

Support specifying multiple platforms with `--platform`. Useful as
not all operating systems identify identical hardware (platforms)
with the same name (example x86_64 and amd64).
This commit is contained in:
Brian Ginsbach 2020-04-14 10:49:40 -05:00
parent 8053165d2f
commit 89403f1494
1 changed files with 9 additions and 1 deletions

View File

@ -2670,7 +2670,15 @@
fi fi
# Check for correct hardware platform # Check for correct hardware platform
if [ ${SKIPTEST} -eq 0 -a -n "${TEST_NEED_PLATFORM}" -a ! "${HARDWARE}" = "${TEST_NEED_PLATFORM}" ]; then SKIPTEST=1; SKIPREASON="Incorrect hardware platform"; fi if [ ${SKIPTEST} -eq 0 -a -n "${TEST_NEED_PLATFORM}" ]; then
HASMATCH=0
for I in ${TEST_NEED_PLATFORM}; do
if [ "${I}" = "${HARDWARE}" ]; then HASMATCH=1; fi
done
if [ ${HASMATCH} -eq 0 ]; then
SKIPTEST=1; SKIPREASON="Incorrect hardware platform (${TEST_NEED_PLATFORM} only)"
fi
fi
# Check for required (and discovered) package manager # Check for required (and discovered) package manager
if [ ${SKIPTEST} -eq 0 -a ${TEST_NEED_PKG_MGR} -eq 1 -a ${HAS_PACKAGE_MANAGER} -eq 0 ]; then SKIPTEST=1; SKIPREASON="Requires a known package manager to test presence of a particular package"; fi if [ ${SKIPTEST} -eq 0 -a ${TEST_NEED_PKG_MGR} -eq 1 -a ${HAS_PACKAGE_MANAGER} -eq 0 ]; then SKIPTEST=1; SKIPREASON="Requires a known package manager to test presence of a particular package"; fi