File: 1411

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (82 lines) | stat: -rwxr-xr-x 2,087 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh
# PCP QA Test No. 1411
# Exercise the ganglia2pcp utility
#
# PCP_ARCHIVE_VERSION V3 variant, see 926 for the V2 variant.
#
# Copyright (c) 2015 Martins Innus.  All Rights Reserved.
#
# The test archives are machine specific. If a set of 
# files for your architecture is not present, please: 
#
# cd  qa/ganglia && mk-gangliatest
#
# and submit the results.

seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

which ganglia2pcp >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "ganglia2pcp not installed"

perl -e "use Date::Parse" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "perl Date::Parse module not installed"

perl -e "use Date::Format" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "perl Date::Format module not installed"

perl -e "use RRDs" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "perl RRDs module not installed"

status=0        # success is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

# We used to use uname -m to pick the right ganglia file, but
# this does not work in CI where the container "architecture" and
# the base platform architecture may not be the same
# The sizeof(void *) seem safer, which is what src/sizeof reports.
#
uname -a >>$seq_full
src/sizeof int long ptr >>$seq_full

rm -f $seq.out
eval `src/sizeof ptr`
case "$ptr"
in
4)
    machine=32
    ;;
8)
    machine=64
    ;;
esac
[ -f $seq.out.$machine ] || \
	_notrun No qualified output for ptr=$ptr architecture. Please run mk-gangliatest and submit the new files.
ln $seq.out.$machine $seq.out || exit 1

# real QA test starts here
# only one dir for now, add more if we get more sample data
# rrdtool can't read data from different architectures

indir=./ganglia/gangliatest.$machine

echo
echo "=== $indir ==="
rm -f $tmp.0 $tmp.index $tmp.meta
outfile=`basename $tmp`
outdir=`dirname $tmp`
ganglia2pcp  -V3 -s "Feb 1 12:00:00 UTC 2015" -e "Feb 12 12:00:00 UTC 2015" -f $outfile -d $outdir -Z UTC $indir

if [ -f $tmp.0 ]
then
    pmdumplog -z -dilmst $tmp
fi

# success, all done
exit