3 all_archs
="ppc ppc64 i386 x86_64"
7 echo " <sysattr name=\"$1\" value=\"$2\" />"
14 echo "<tests end_time=\"`date +%s`\" start_time=\"$start_time\" comment=\""$comment"\">"
17 sysattr cctools
"`as</dev/null -v 2>&1 |sed 's/.*cctools-//;s/,.*//'`"
18 sysattr hostname
"`hostname`"
19 sysattr os
"`uname -r`"
20 sysattr platform
"`uname -m`"
21 sysattr ld64
"`ld64 -v 2>&1|sed 's/.*PROJECT://;s/ .*//'`"
22 sysattr ld
"`ld_classic -v 2>&1|sed 's/.*cctools-//;s/ .*//'`"
23 sysattr gcc
"`gcc --version|head -1`"
24 sysattr processor
"`uname -p`"
26 sysattr LC_CTYPE
"$LC_CTYPE"
27 sysattr LC_MESSAGES
"$LC_MESSAGES"
28 sysattr LC_ALL
"$LC_ALL"
29 sysattr TMPDIR
"$TMPDIR"
30 sysattr GCC_EXEC_PREFIX
"$GCC_EXEC_PREFIX"
31 sysattr COMPILER_PATH
"$COMPILER_PATH"
32 sysattr LIBRARY_PATH
"$LIBRARY_PATH"
34 sysattr CPATH
"$CPATH"
35 sysattr C_INCLUDE_PATH
"$C_INCLUDE_PATH"
36 sysattr CPLUS_INCLUDE_PATH
"$CPLUS_INCLUDE_PATH"
37 sysattr OBJC_INCLUDE_PATH
"$OBJC_INCLUDE_PATH"
38 sysattr DEPENDENCIES_OUTPUT
"$DEPENDENCIES_OUTPUT"
39 sysattr SUNPRO_DEPENDENCIES
"$SUNPRO_DEPENDENCIES"
43 echo "<tool name=\"ld\">"
44 echo " <results incomplete=\"0\">"
47 echo " <testgroup name=\"$i\">"
60 find_path_to_test_dir
()
62 # FIND THE PATH TO THE TEST DIR
63 # SO THAT WE CAN ADD THE BIN DIR INTO
66 # remember the top level execution dir
67 chmod +x
"$0" # just in case
69 #add path to $0 into search
73 [ -d "$DIRNAME" ] && cd "$DIRNAME"
77 chmod +x
"$0" # just in case
79 DIRNAME
=`dirname "$EXECNAME"`
82 TEST_HOME_DIR
=`cd "$DIRNAME";pwd`
85 if [ -z "$TEST_HOME_DIR" ]
87 TEST_HOME_DIR
="$savedir" # Give up and assume current dir
93 PATH
="$PWD":"$TEST_HOME_DIR/bin":"$PATH"
101 # Execute from the location of the script; or if not found the current loc
102 [ -d $TEST_HOME_DIR/test-cases ] && cd $TEST_HOME_DIR/test-cases || cd test-cases
104 rm-stale-test-logs 3 >/dev
/null
&
106 make -C ..
/src
# make sure the binaries are available
108 DATEFORMAT
=`date +%F-%H%M | sed -e 's/ //'`
109 tmpdir
=/tmp
/proctor
$DATEFORMAT
111 if ! mkdir $tmpdir >/dev
/null
2>/dev
/null
119 if [ x
$1 = x
-comment ]
137 for j
in Makefile makefile
139 [ -f $1/$j ] && MF
=$j
144 for j
in Makefile.newtest makefile.newtest
146 [ -f $1/$j ] && MF
=$j
150 [ "$MF" ] && return 0
157 echo cmd
: $1 ARCH
="$arch"
158 make -f "$MF" -C $1 ARCH
="$arch" 2>$tmpdir/stderr
>$tmpdir/stdout
160 sed 's/^/stdout: /'<$tmpdir/stdout
161 sed 's/^/stderr: /'<$tmpdir/stderr
168 for arch
in $all_archs
175 #fi | tee -a $tmpdir/raw | ../bin/results-to-xml $linestart>>$tmpdir/$arch
176 linestart
=`expr $linestart + 10000`
177 done | tee -a $tmpdir/raw
| ..
/bin
/results
-to-xml $linestart>>$tmpdir/$arch
179 for arch
in $all_archs
188 done | tee -a $tmpdir/raw
| ..
/bin
/results
-to-xml $linestart>>$tmpdir/$arch
189 linestart
=`expr $linestart + 10000`
193 (cd $tmpdir; doresults
$all_archs)>$tmpdir/o.xml
194 ..
/bin
/xmlparser
$tmpdir/o.xml
>/dev
/null
197 if ! proctor localhost ld import
$tmpdir/o.xml
199 proctor database load failed
!
202 echo Test results not loaded
: internal xml error
!