3 # checks contents of trace stub library
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 if [ $PCP_PLATFORM = irix
]
20 DSO_VERSION
=$DSO_SUFFIX.
$libmajor
21 elif [ $PCP_PLATFORM = linux
-o $PCP_PLATFORM = solaris
]
23 # same options for Linux and OpenSolaris
26 DSO_VERSION
=$DSO_SUFFIX.
$libmajor
27 elif [ $PCP_PLATFORM = darwin
]
31 DSO_VERSION
=$libmajor.
$DSO_SUFFIX
33 echo "Arrgh ... need configuration for $PCP_PLATFORM"
37 [ -f $PCP_LIB_DIR/libpcp_trace.
$DSO_VERSION ] || _notrun
"No trace shared library available"
39 status
=1 # failure is the default!
40 trap "$sudo rm -f $tmp.*; exit \$status" 0 1 2 3 15
42 # real QA test starts here
45 # gets all code symbols, prints the name, & strips internal names
46 nm
$NM_ARG $1 |
grep " T " |
$PCP_AWK_PROG '{print $3}' |
grep -v "_" |
grep -v "^.MIPS."
49 # real QA test starts here
50 cd $PCP_DEMOS_DIR/trace
51 unset ROOT TOOLROOT MAKEFLAGS
52 $sudo make -f Makefile.stub clobber
2>&1 >/dev
/null
53 $sudo make -f Makefile.stub lib
/libpcp_trace.
$DSO_VERSION 2>&1 >$tmp.
make
56 echo Stub library
make failed. Heres the
make output ...
62 get_syms
$PCP_LIB_DIR/libpcp_trace.
$DSO_VERSION > $tmp.actual
63 get_syms
$PCP_DEMOS_DIR/trace
/lib
/libpcp_trace.
$DSO_VERSION > $tmp.stub
65 diff $tmp.actual
$tmp.stub
>/dev
/null
68 $PCP_ECHO_PROG $PCP_ECHO_N "checking for actual/stub lib symbol differences ... ""$PCP_ECHO_C"
71 $PCP_ECHO_PROG files differ.
72 echo "--- Symbols from /usr/lib/libpcp_trace.... ---"
75 echo "--- Symbols from demos libpcp_trace.... ---"
78 $PCP_ECHO_PROG none found.