Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/mixerctl Limit previous to the i386 qemu kerne...



details:   https://anonhg.NetBSD.org/src/rev/f2d772281658
branches:  trunk
changeset: 821952:f2d772281658
user:      kre <kre%NetBSD.org@localhost>
date:      Thu Feb 23 02:28:10 2017 +0000

description:
Limit previous to the i386 qemu kernels, the tests work on amd64 and sparc
(which have some audio configured.)

diffstat:

 tests/usr.bin/mixerctl/t_mixerctl.sh |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r e837540dae38 -r f2d772281658 tests/usr.bin/mixerctl/t_mixerctl.sh
--- a/tests/usr.bin/mixerctl/t_mixerctl.sh      Thu Feb 23 02:09:24 2017 +0000
+++ b/tests/usr.bin/mixerctl/t_mixerctl.sh      Thu Feb 23 02:28:10 2017 +0000
@@ -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 @@
        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 @@
        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)"
 



Home | Main Index | Thread Index | Old Index