3 # Exercise various python mechanisms for setting sources
4 # (hosts, archives) via the pmOptions class interfaces.
6 # Copyright (c) 2015-2016 Red Hat. All Rights Reserved.
10 echo "QA output created by $seq"
14 status
=1 # failure is the default!
15 $sudo rm -rf $tmp $tmp.
* $seq.full
16 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
23 cat $tmp.stderr
>>$here/$seq.full
30 # real QA test starts here
31 script="$python $here/src/test_set_source.python"
33 echo && echo == Host
, expect pass
:
34 TEST_SET_HOST
=localhost
$script 2>$tmp.stderr
36 echo && echo == Host list
, expect pass
:
37 TEST_SET_HOSTLIST
=localhost
$script 2>$tmp.stderr
39 echo && echo == Host list
, expect fail
:
40 TEST_SET_HOSTLIST
=localhost
,unix
: $script 2>$tmp.stderr
42 echo && echo == Host list
, expect pass
:
43 TEST_SET_MULTI
=1 TEST_SET_HOSTLIST
=unix
:,local:,localhost
$script 2>$tmp.stderr
46 echo && echo == Container
, expect pass
:
47 TEST_SET_CONTAINER
=abc012345
$script 2>$tmp.stderr
50 echo && echo == Local PMDA
, expect pass
:
51 TEST_SET_LOCALPMDA
=true TEST_SET_SPECLOCAL
=clear $script 2>$tmp.stderr
54 echo && echo == Local PMDA
, expect fail
:
55 TEST_SET_LOCALPMDA
=true TEST_SET_SPECLOCAL
=add
, $script 2>$tmp.stderr
58 echo && echo == Archive list
, expect pass
:
59 TEST_SET_ARCHIVELIST
=archives
/pcp-atop
$script 2>$tmp.stderr
61 echo && echo == Archive list
, expect pass
:
62 TEST_SET_ARCHIVELIST
=archives
/pcp-free
,archives
/pcp-uptime
$script 2>$tmp.stderr
66 echo && echo == Folio
, expect pass
:
67 TEST_SET_ARCHIVEFOLIO
=pcp-atop.folio
$script 2>$tmp.stderr