File: 710

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 (64 lines) | stat: -rwxr-xr-x 1,444 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
#!/bin/sh
# PCP QA Test No. 710
# Exercise python PMI layer using a real script
#
# Copyright (c) 2012,2022 Red Hat.
#

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

. ./common.python

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

$python -c 'from pcp import pmi' 2>/dev/null
test $? -eq 0 || _notrun 'Python pcp pmi module is not installed'

filter_dump()
{
    _filter_pmdumplog | \
	sed -e 's/value 0\.[0-9][0-9]*$/value DOUBLE/g'
}

# real QA test starts here
echo && echo "=== Check import v2"
$python $here/src/check_import.py $tmp.pcplog >$tmp.out 2>&1
if [ $? -eq 0 ]
then
    echo "=== logcheck ==="
    pmlogcheck $tmp.pcplog

    echo
    echo "=== dumplog ==="
    pmdumplog -dilmst $tmp.pcplog 2>&1 | filter_dump

    cat $tmp.out >>$seq_full
    echo "---" >>$seq_full
    pmdumplog -Dlog -a $tmp.pcplog >>$seq_full 2>&1
else
    cat $tmp.out
    echo "check_import python script gave non-zero result"
fi

# same again but for version 3 archive format
echo && echo "=== Check import v3"
$python $here/src/check_import.py $tmp.pcplog3 3 >$tmp.out 2>&1
if [ $? -eq 0 ]
then
    echo "=== logcheck ==="
    pmlogcheck $tmp.pcplog3

    echo
    echo "=== dumplog ==="
    pmdumplog -dilmst $tmp.pcplog3 2>&1 | filter_dump
    pmdumplog -a $tmp.pcplog3 >>$seq_full
else
    cat $tmp.out
    echo "check_import python script gave non-zero result for v3"
fi

# success, all done
status=$?
exit