~percona-toolkit-dev/percona-toolkit/fix-empty-table-bug-987393

« back to all changes in this revision

Viewing changes to t/pt-summary/parse_ip_s_link.sh

  • Committer: Daniel Nichter
  • Date: 2012-04-03 16:14:55 UTC
  • mfrom: (217.6.22 2.0.3)
  • Revision ID: daniel@percona.com-20120403161455-ntv33vju9o6njtqv
Merge summary-tools-2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
TESTS=2
4
 
TMPDIR=$TEST_TMPDIR
5
 
 
6
 
TEST_NAME="ip-s-link-001.txt"
7
 
cat <<EOF > $TMPDIR/expected
8
 
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
9
 
  ========= ========= ========== ========== ========== ========== ==========
10
 
  lo          3000000      25000          0    3000000      25000          0
11
 
  eth0      175000000   30000000          0  125000000     900000          0
12
 
  wlan0      50000000      80000          0   20000000      90000          0
13
 
  vboxnet0          0          0          0          0          0          0
14
 
EOF
15
 
parse_ip_s_link samples/ip-s-link-001.txt > $TMPDIR/got
16
 
no_diff $TMPDIR/got $TMPDIR/expected
17
 
 
18
 
TEST_NAME="ip-s-link-002.txt"
19
 
cat <<EOF > $TMPDIR/expected
20
 
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
21
 
  ========= ========= ========== ========== ========== ========== ==========
22
 
  lo       3500000000  350000000          0 3500000000  350000000          0
23
 
  eth0     1750000000 1250000000          0 3500000000  700000000          0
24
 
  eth1     1250000000   60000000          0  900000000   50000000          0
25
 
  sit0              0          0          0          0          0          0
26
 
EOF
27
 
parse_ip_s_link samples/ip-s-link-002.txt > $TMPDIR/got
28
 
no_diff $TMPDIR/got $TMPDIR/expected