3 # Error handling below pmLoadDerivedConfig.
5 # Copyright (c) 2016 Ken McDonell. All Rights Reserved.
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 $tmp.
* $seq.full
18 trap "cd $here; rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15
27 # for dir args, file order and hence derived metric order is not
34 -e 's/metric\[[0-9][0-9]*]/metric[N]/' \
35 | LC_COLLATE
=POSIX
sort
39 echo "x = no-such-metric" >$tmp/a
40 echo "y = sample.lights" >>$tmp/a
41 echo "z = hinv.ncpu + hinv.ndisk" >>$tmp/a
43 echo "a = sample.lights" >$tmp/b
44 echo "b = bozo!" >>$tmp/b
45 echo "c=sample.bin*hinv.ncpu" >>$tmp/b
48 # real QA test starts here
50 # Don't load any global derived metric configs by default
51 export PCP_DERIVED_CONFIG
=""
53 for debug
in -Dderive ""
55 echo "+++ debug=$debug +++"
56 src
/loadderived
$debug no-such-file
58 src
/loadderived
$debug $tmp/a
2>&1 | _filter
60 src
/loadderived
$debug $tmp/b
2>&1 | _filter
62 src
/loadderived
$debug $tmp/a
:$tmp/b
2>&1 | _filter
64 src
/loadderived
$debug $tmp 2>&1 | _filter2
66 src
/loadderived
$debug $tmp/a
:no-such-file
:$tmp/b
2>&1 | _filter
69 src
/loadderived
$debug $tmp 2>&1 | _filter2
73 src
/loadderived
$debug $tmp/a
:$tmp/b
:$tmp/c
2>&1 | _filter