4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
18 export STF_SUITE
=/opt
/libc-tests
20 # First we set $dir to dirname $0, using efficient ksh builtins.
32 cfg
=symbols
/${prog%.ksh}.cfg
34 if [[ ! -f ${cfg} && $cfg == symbols
/setup.cfg
]]
50 # We look for architecture specific versions of the program,
51 # searching in several candidate directories. We run each one as
53 for f
in $
(/usr
/bin
/isainfo
)
56 [[ -n $debug ]] && print
"Checking for arch $f:"
59 ${dir}/${f}/${prog}.${f} \
62 [[ -n $found ]] && continue
63 [[ -n $debug ]] && print
-n " $p"
65 [[ -n $debug ]] && print
" FOUND"
66 [[ -n $debug ]] && print
"Executing $p $* ${cfg}"
68 $p $
* ${cfg} ||
exit 1
70 [[ -n $debug ]] && print
73 [[ -z $found ]] && [[ -n $debug ]] && print
"NOT PRESENT"