File: 217

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 (110 lines) | stat: -rwxr-xr-x 2,388 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
#! /bin/sh
# PCP QA Test No. 217
# check mkaf and pmafm, after file(1) not used
#
# 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

LIST="archives/951127.23.01_v2.0 archives/960624.08.17_v2.0 archives/ace_v2.0 tmparch/bar.0 archives/bigace_v2.0 tmparch/bigbin.0 archives/bug_v2.0 tmparch/dodgey-all.0 tmparch/dodgey-mixed.0 tmparch/dodgey-some.0 tmparch/foo.0 tmparch/interp.0 archives/mirage.0 tmparch/mv-bar.0 tmparch/mv-bigbin.0 tmparch/mv-foo.0 tmparch/mv-interp.0 tmparch/truncbin.0"


status=0
trap "rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15

_filter()
{
    host=`hostname`
    tee -a $seq_full \
    | sed \
	-e '/^Created:/{
s/'"$host"'/HOSTNAME/
s/ at .*/ at DATE/
}' \
	-e "s;`pwd`;<initial-path>/qa;" \
	-e '/^Creator:/{
s/mkaf/MKAF_OR_CHART/
s/kmchart/MKAF_OR_CHART/
s/pmchart/MKAF_OR_CHART/
}' \
| $PCP_AWK_PROG '
$1 == "Archive:"	{ if ($3 ~ /bar$/ || $3 ~ /bigbin$/ ||
			      $3 ~ /dodgey/ || $3 ~ /foo$/ ||
			      $3 ~ /interp$/ || $3 ~ /truncbin$/)
				$2 = "HOSTNAME"
#               Host                    Basename

			  printf "%-16s%-24s%s\n",$1,$2,$3
			  next
			}
			{ print }'

}

# fake out the old pcp/qa/src directory structure
#
mkdir -p $tmp/src
for arch in $LIST
do
    pat=`echo $arch | sed -e 's/0$/*/'`
    cp $pat $tmp/src
done
cd $tmp
echo "tmp=$tmp" >>$seq_full
echo "pwd: `pwd`" >>$seq_full
( echo "src dir ..."; ls src ) >>$seq_full

HERE=`pwd`
ABSLIST=""
RELLIST=""
for i in $LIST
do
    ABSLIST="$ABSLIST $HERE/$i"
    RELLIST="$RELLIST $i"
done


# real QA test starts here
echo "=== relative names ==="
cd src
echo $LIST | sed -e 's/ /\
/g' | sed -e 's;^.*/;;' >$tmp.tmp
mkaf `cat $tmp.tmp` >tmp.af
_filter <tmp.af
rm -f $tmp.tmp
echo
pmafm tmp.af check
rm -f tmp.af
cd ..

echo
echo "=== absolute pathnames ==="
echo $ABSLIST | sed -e 's/ /\
/g' | sed -e 's;/archives/;/src/;' -e 's;/tmparch/;/src/;' >$tmp.tmp
mkaf `cat $tmp.tmp` >tmp.af
rm -f $tmp.tmp
_filter <tmp.af
echo
pmafm tmp.af check 2>&1 | sed -e "s;`pwd`;<initial-path>/qa;"
rm -f tmp.af

echo
echo "=== relative names, down one dir ==="
echo $RELLIST | sed -e 's/ /\
/g' | sed -e 's;^.*/;src/;' >$tmp.tmp
mkaf `cat $tmp.tmp` >tmp.af
rm -f $tmp.tmp
_filter <tmp.af
echo
pmafm tmp.af check
rm -f tmp.af

# all done
exit