3 # Exercise --host-list, --archive-list, and --archive-folio options.
5 # Copyright (c) 2014 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
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
21 good
=$here/20071023-08-06-36.folio
30 -e "s,$good,FOLIO,g" \
31 -e "s,$tmpdir,TMPDIR,g" \
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
56 Archive: smash 20140624.10.52
57 Archive: verge 20140624.00.10
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
68 Archive: smash 20140624.10.52
70 $here/src
/getoptions
--archive-folio=$tmp.badmagic
2>&1 | filter_folios
72 echo '== Archive Folio (version2) =='
73 cat <<EOF > $tmp.version2
76 Archive: smash 20140624.10.52
78 $here/src
/getoptions
--archive-folio=$tmp.version2
2>&1 | filter_folios
80 echo '== Archive Folio (nohost) =='
81 cat <<EOF > $tmp.nohost
84 Archive: 20140624.10.52
86 $here/src
/getoptions
--archive-folio=$tmp.nohost
2>&1 | filter_folios
88 echo '== Archive Folio (empty) =='
89 cat <<EOF > $tmp.empty
93 $here/src
/getoptions
--archive-folio=$tmp.empty
2>&1 | filter_folios