4
if [ "$TEST_VERBOSE" -ge 3 ]; then
8
. "$(dirname "$0")/../$ARCH.sh"
23
echo "warning: $*" >&2
26
for KERNEL_MAJOR in $MAJORS; do
27
WANT_FLAVOUR="$FLAVOUR"
30
WANT_KERNELS="$KERNEL_26"
33
WANT_KERNELS="$KERNEL_7"
36
WANT_KERNELS="$KERNEL_8"
39
WANT_KERNELS="$(echo "$WANT_KERNELS" | tr '\n' ' ' | tr -s ' ' | sed 's/ *$//')"
40
WANT_KERNEL_STEM="${WANT_KERNELS%% *}"
41
WANT_KERNEL_STEM="${WANT_KERNEL_STEM#kernel-image-}"
42
WANT_KERNEL_STEM="${WANT_KERNEL_STEM#linux-image-}"
44
export KERNEL_VERSION="$(echo "$WANT_KERNEL_STEM" | cut -d - -f 1)"
46
# Is the correct kernel flavour selected?
48
testname="arch_get_kernel_flavour $KERNEL_MAJOR exit code"
49
if GOT_FLAVOUR="$(arch_get_kernel_flavour)" && [ "$GOT_FLAVOUR" ] ; then
53
continue # nothing else will work
56
testname="arch_get_kernel_flavour want $WANT_FLAVOUR, got $GOT_FLAVOUR"
57
if [ "$WANT_FLAVOUR" = "$GOT_FLAVOUR" ]; then
63
# Are the correct kernels treated as usable?
65
for kernel in $USABLE; do
66
testname="arch_check_usable_kernel $KERNEL_MAJOR $kernel should be usable"
67
if arch_check_usable_kernel "$kernel" "$GOT_FLAVOUR"; then
74
# By default any postfix should be allowed
75
for kernel in $USABLE; do
76
testname="arch_check_usable_kernel $KERNEL_MAJOR ${kernel}-<postfix> should be usable"
77
if arch_check_usable_kernel "${kernel}-postfix" "$GOT_FLAVOUR"; then
84
for kernel in $UNUSABLE; do
85
testname="arch_check_usable_kernel $KERNEL_MAJOR $kernel should be unusable"
86
if arch_check_usable_kernel "$kernel" "$GOT_FLAVOUR"; then
93
# Is the correct preference order of default kernels selected?
95
testname="arch_get_kernel $KERNEL_MAJOR exit code"
96
if GOT_KERNELS="$(arch_get_kernel "$GOT_FLAVOUR" | tr '\n' ' ' | sed 's/ *$//')"; then
100
continue # the rest won't work
103
testname="arch_get_kernel want '$WANT_KERNELS', got '$GOT_KERNELS'"
104
if [ "$WANT_KERNELS" = "$GOT_KERNELS" ]; then