Limit previous to the i386 qemu kernels, the tests work on amd64 and sparc
(which have some audio configured.)
This commit is contained in:
parent
e4eeed67d9
commit
700ea9d267
|
@ -1,15 +1,16 @@
|
|||
# $NetBSD: t_mixerctl.sh,v 1.2 2017/02/23 02:09:24 kre Exp $
|
||||
# $NetBSD: t_mixerctl.sh,v 1.3 2017/02/23 02:28:10 kre Exp $
|
||||
|
||||
atf_test_case noargs_usage
|
||||
noargs_usage_head() {
|
||||
atf_set "descr" "Ensure mixerctl(1) with no args prints a usage message"
|
||||
}
|
||||
noargs_usage_body() {
|
||||
if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
|
||||
if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 &&
|
||||
test $(uname -m) = i386
|
||||
then
|
||||
# better would be for mixerctl to not open the device...
|
||||
# but for now, it does.
|
||||
atf_skip "ATF qemu kernel has no audio"
|
||||
atf_skip "i386 ATF qemu kernel has no audio"
|
||||
fi
|
||||
atf_check -s exit:0 -o not-empty -e ignore \
|
||||
mixerctl
|
||||
|
@ -20,9 +21,10 @@ showvalue_head() {
|
|||
atf_set "descr" "Ensure mixerctl(1) can print the value for all variables"
|
||||
}
|
||||
showvalue_body() {
|
||||
if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
|
||||
if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 &&
|
||||
test $(uname -m) = i386
|
||||
then
|
||||
atf_skip "ATF qemu kernel has no audio"
|
||||
atf_skip "i386 ATF qemu kernel has no audio"
|
||||
fi
|
||||
for var in $(mixerctl -a | awk -F= '{print $1}'); do
|
||||
atf_check -s exit:0 -e ignore -o match:"^${var}=" \
|
||||
|
@ -35,9 +37,10 @@ nflag_head() {
|
|||
atf_set "descr" "Ensure 'mixerctl -n' actually suppresses some output"
|
||||
}
|
||||
nflag_body() {
|
||||
if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1
|
||||
if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 &&
|
||||
test $(uname -m) = i386
|
||||
then
|
||||
atf_skip "ATF qemu kernel has no audio"
|
||||
atf_skip "i386 ATF qemu kernel has no audio"
|
||||
fi
|
||||
varname="$(mixerctl -a | sed -e 's/=.*//' -e q)"
|
||||
|
||||
|
|
Loading…
Reference in New Issue