Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 774
blob6dcc8d02683dfe74bb2b1af312164126bac84e55
1 #!/bin/sh
2 # PCP QA Test No. 995
3 # pmdumplog strangeness with actual filenames for the argument
5 # Copyright (c) 2015 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 # real QA test starts here
21 for ext in "" .0 .meta .index
23 echo
24 echo "using archives/ok-foo$ext ..."
25 pmdumplog -z -a archives/ok-foo$ext >$tmp.out 2>$tmp.err
26 if [ -z "$ext" ]
27 then
28 for t in out err
30 echo "--- std$t ---"
31 cat $tmp.$t
32 mv $tmp.$t $tmp.$t.baseline
33 done
34 else
35 for t in out err
37 echo "--- std$t ---"
38 if diff $tmp.$t.baseline $tmp.$t >$tmp.tmp
39 then
40 echo "No diffs."
41 else
42 cat $tmp.tmp
44 done
46 done
48 # success, all done
49 status=0
51 exit