File: 278

package info (click to toggle)
pcp 3.9.10
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 81,836 kB
  • ctags: 26,423
  • sloc: ansic: 178,791; sh: 79,349; cpp: 61,042; xml: 28,842; perl: 12,963; yacc: 5,351; python: 4,578; lex: 1,894; makefile: 1,665; fortran: 60; java: 22; awk: 20
file content (151 lines) | stat: -rwxr-xr-x 3,307 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#! /bin/sh
# PCP QA Test No. 278
# validate newhelp
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

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

# get standard filters
. ./common.product
. ./common.filter
. ./common.check

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

_bogus()
{
    cat >>$2 <<End-of-File
@ $1 one line for $1
start of entry for $1
This is random boring text that pretends to describe
what on earth the metric $1 is used for.

There is no point to the words, just treat it as a boring diatribe.
There is no point to the words, just treat it as a boring diatribe.
There is no point to the words, just treat it as a boring diatribe.
There is no point to the words, just treat it as a boring diatribe.
There is no point to the words, just treat it as a boring diatribe.

AUDIT TAG $1

end of entry for $1
End-of-File
}

# real QA test starts here

for m in sample.long.one sample.long.ten sample.long.hundred sample.long.million sample.long.write_me
do
    _bogus $m $tmp.1
done

for m in sample.longlong.one sample.longlong.ten sample.longlong.hundred sample.longlong.million sample.longlong.write_me
do
    _bogus $m $tmp.2
done

for m in sample.float.one sample.float.ten sample.float.hundred sample.float.million sample.float.write_me
do
    _bogus $m $tmp.3
done

for m in sample.double.one sample.double.ten sample.double.hundred sample.double.million sample.double.write_me
do
    _bogus $m $tmp.4
done

for m in sample.string.null sample.string.hullo sample.string.write_me
do
    _bogus $m $tmp.5
done

for m in sample.aggregate.null sample.aggregate.hullo sample.aggregate.write_me
do
    _bogus $m $tmp.6
done

echo >$tmp.7

bytes=`cat $tmp.? | wc -c | sed -e 's/ //g'`

if [ $PCP_PLATFORM = irix ]
then
    . ./localconfig
    # V1 support deprecated in PCP 2.3 and/or IRIX 6.5.19
    #
    if [ $PCP_VER -ge 2300 -o $PCP_EOE_VER -ge 6519 ]
    then
	vlist="2"
	rm -f $seq.out && ln $seq.linux $seq.out
    else
	vlist="1 2"
	rm -f $seq.out && ln $seq.irix $seq.out
    fi
elif [ $PCP_PLATFORM = linux -o $PCP_PLATFORM = darwin -o $PCP_PLATFORM = solaris -o $PCP_PLATFORM = freebsd ]
then
    # same output for Linux and Mac OS X and Solaris and FreeBSD
    #
    vlist="2"
    rm -f $seq.out && ln $seq.linux $seq.out
else
    echo bozo!
    exit
fi

for version in $vlist
do
    for pass in 1 2
    do

	echo
	echo "=== newhelp -v $version and pass $pass ==="

	if newhelp -v $version -V -o $tmp $tmp.?
	then
	    :
	else
	    echo "Error: newhelp failed!"
	    exit
	fi

	size=`wc -c <$tmp.pag | sed -e 's/ //g'`
	if [ "$size" -lt "$bytes" ]
	then
	    echo "Error: .pag file too small ($size < $bytes)"
	    ls -l $tmp.?
	    echo
	    ls -l $tmp.pag $tmp.dir
	    exit
	fi

	echo "=== check text, expect no diff output ==="
	for m in sample.long.hundred sample.longlong.million sample.float.one \
	    sample.double.ten sample.string.hullo sample.aggregate.null
	do
	    echo $m:
	    echo >$tmp.check
	    _bogus $m $tmp.check
	    if chkhelp -v $version -HO $tmp $m >$tmp.out 2>&1
	    then
		sed <$tmp.out \
		-e '/^PMID/{
s/PMID [^ ]* /@ /
s/://
}' \
		| diff - $tmp.check
	    else
		cat $tmp.out
		echo "Error: chkhelp failed!"
		exit
	    fi
	done
    done
done

# success, all done
status=0
exit