Source-Changes-HG archive

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

[src/trunk]: src/tests/net/npf Try to make this test gracefully fail when npf...



details:   https://anonhg.NetBSD.org/src/rev/f5008a03d695
branches:  trunk
changeset: 781618:f5008a03d695
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Sep 18 08:28:15 2012 +0000

description:
Try to make this test gracefully fail when npftest is not available

diffstat:

 tests/net/npf/t_npf.sh |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 7e79b3643f8b -r f5008a03d695 tests/net/npf/t_npf.sh
--- a/tests/net/npf/t_npf.sh    Tue Sep 18 08:13:03 2012 +0000
+++ b/tests/net/npf/t_npf.sh    Tue Sep 18 08:28:15 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_npf.sh,v 1.1 2012/09/12 14:06:31 martin Exp $
+# $NetBSD: t_npf.sh,v 1.2 2012/09/18 08:28:15 martin Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,6 +41,7 @@
        atf_test_case "npf_${name}"
        eval "npf_${name}_head() { \
                        atf_set \"descr\" \"${desc}\"; \
+                       atf_set \"require.progs\" \"npfctl npftest\"; \
                }; \
            npf_${name}_body() { \
                        run_test \"${name}\"; \
@@ -53,7 +54,7 @@
        LIST=/tmp/t_npf.$$
        trap "rm -f $LIST" EXIT
 
-       npftest -L > $LIST
+       sh -ec 'npftest -L || printf "dummy\tnone\n"' > $LIST 2>/dev/null
 
        while read tag desc
        do



Home | Main Index | Thread Index | Old Index