qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 985
blobea368f03cea41500ba3acab2ab3cb8cabf4ec012
1 #!/bin/sh
2 # simple exerciser for sheet2pcp - XL variant
4 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
7 seq=`basename $0`
8 echo "QA output created by $seq"
10 # get standard environment, filters and checks
11 . ./common.product
12 . ./common.filter
13 . ./common.check
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>
37 <datetime></datetime>
38 <data>metric.a</data>
39 <data>metric.b</data>
40 <data>metric.c</data>
41 <data>metric.d</data>
42 <data>metric.e</data>
43 </sheet>
44 End-of-File
46 echo "=== XLS ==="
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
51 # success, all done
52 exit