s4:auth: split out a samba_server_gensec_start_settings() helper function
[Samba.git] / script / tests / test_traffic_summary.sh
blob2dc7bed51fe8ebd960cc88aa1031c44ffbc21e6b
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: test_traffic_summary.sh
6 EOF
7 exit 1;
8 fi
10 PREFIX="$1"
11 shift 1
12 ARGS=$@
14 . `dirname $0`/../../testprogs/blackbox/subunit.sh
16 script_dir=`dirname $0`/..
17 input="$script_dir/testdata/traffic_summary.pdml"
18 expected="$script_dir/testdata/traffic_summary.expected"
19 output="$(mktemp $TMPDIR/traffic_summary.XXXXXXXXXXX)"
20 ts="$script_dir/traffic_summary.pl"
22 traffic_summary() {
24 $ts $input >$output
25 if [ "$?" != "0" ]; then
26 return 1
29 diff $output $expected
30 if [ "$?" != "0" ]; then
31 return 1
35 # Check the required perl modules for traffic_summary
36 # skip the tests if they are not installed
37 perl -MXML::Twig -e 1
38 if [ "$?" != "0" ]; then
39 subunit_start_test "traffic_summary"
40 subunit_skip_test "traffic_summary" <<EOF
41 perl module XML::Twig not installed
42 EOF
43 else
44 testit "traffic_summary" traffic_summary
47 exit $failed