qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 899
blobc1483fac72835b988ab3b5cb2624ce54ea9c4523
1 #!/bin/sh
2 # PCP QA Test No. 899
3 # Exercise --host-list, --archive-list, and --archive-folio options.
5 # Copyright (c) 2014 Red Hat.
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 tmpdir=`dirname $tmp`
21 good=$here/20071023-08-06-36.folio
22 bad=/bin/sh
24 filter_folios()
26 sed \
27 -e "s,$tmp,TMP,g" \
28 -e "s,$bad,BAD,g" \
29 -e "s,$here,HERE,g" \
30 -e "s,$good,FOLIO,g" \
31 -e "s,$tmpdir,TMPDIR,g" \
32 # end
36 # real QA test starts here
37 export PM_OPTFLAG_MULTI=true
39 echo '== Host list (multi) =='
40 $here/src/getoptions --host-list=www.acme.com,foo.bar.org,oss.sgi.com
41 echo '== Host list (single) =='
42 $here/src/getoptions --host-list=www.acme.com
44 echo '== Archive list (multi) =='
45 $here/src/getoptions --archive-list=log1,log2,log3
46 echo '== Archive list (single) =='
47 $here/src/getoptions --archive-list=log1
49 echo '== Archive Folio (single) =='
50 $here/src/getoptions --archive-folio=$good 2>&1 | filter_folios
52 echo '== Archive Folio (multi) =='
53 cat << EOF > $tmp.multi
54 PCPFolio
55 Version: 1
56 Archive: smash 20140624.10.52
57 Archive: verge 20140624.00.10
58 EOF
59 $here/src/getoptions --archive-folio=$tmp.multi 2>&1 | filter_folios
61 echo '== Archive Folio (binary) =='
62 $here/src/getoptions --archive-folio=$bad 2>&1 | filter_folios
64 echo '== Archive Folio (badmagic) =='
65 cat <<EOF > $tmp.badmagic
66 PPCFolio
67 Version: 1
68 Archive: smash 20140624.10.52
69 EOF
70 $here/src/getoptions --archive-folio=$tmp.badmagic 2>&1 | filter_folios
72 echo '== Archive Folio (version2) =='
73 cat <<EOF > $tmp.version2
74 PCPFolio
75 Version: 2
76 Archive: smash 20140624.10.52
77 EOF
78 $here/src/getoptions --archive-folio=$tmp.version2 2>&1 | filter_folios
80 echo '== Archive Folio (nohost) =='
81 cat <<EOF > $tmp.nohost
82 PCPFolio
83 Version: 1
84 Archive: 20140624.10.52
85 EOF
86 $here/src/getoptions --archive-folio=$tmp.nohost 2>&1 | filter_folios
88 echo '== Archive Folio (empty) =='
89 cat <<EOF > $tmp.empty
90 PCPFolio
91 Version: 1
92 EOF
93 $here/src/getoptions --archive-folio=$tmp.empty 2>&1 | filter_folios
95 # success, all done
96 status=0
97 exit