2 # simple exerciser for sheet2pcp - XL variant
4 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
8 echo "QA output created by $seq"
10 # get standard environment, filters and checks
15 which sheet2pcp
>/dev
/null
2>&1
16 [ $?
-eq 0 ] || _notrun
"sheet2pcp not installed"
17 perl
-e "use XML::TokeParser" >/dev
/null
2>&1
18 [ $?
-eq 0 ] || _notrun
"perl XML::TokeParser module not installed"
19 perl
-e "use Spreadsheet::ParseExcel" >/dev
/null
2>&1
20 [ $?
-eq 0 ] || _notrun
"perl Spreadsheet::ParseExcel module not installed"
22 status
=0 # success is the default!
23 $sudo rm -rf $tmp.
* $seq.full
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # real QA test starts here
28 cat <<'End-of-File' >$tmp.mapfile
29 <?xml version="1.0" encoding="UTF-8"?>
30 <!-- For PCP QA 372 -->
31 <sheet heading="1" hostname="time.greenwich.com" datefmt="DMY">
32 <metric sem="PM_SEM_COUNTER">metric.a</metric>
33 <metric sem="PM_SEM_COUNTER">metric.b</metric>
34 <metric>metric.c</metric>
35 <metric type="PM_TYPE_32">metric.d</metric>
36 <metric type="PM_TYPE_STRING">metric.e</metric>
47 rm -f $tmp.0 $tmp.index
$tmp.meta
48 sheet2pcp src
/simple.xls
$tmp.mapfile
$tmp 2>&1
49 [ -f $tmp.0 ] && pmdumplog
-az $tmp