]> git.saurik.com Git - apple/objc4.git/blob - runtests.sh
objc4-532.2.tar.gz
[apple/objc4.git] / runtests.sh
1 #!/bin/sh
2 # Simple script to run the libclosure tests
3 # Note: to build the testing root, the makefile will ask to authenticate with sudo
4 # Use the RootsDirectory environment variable to direct the build to somewhere other than /tmp/
5
6 RootsDirectory=${RootsDirectory:-/tmp/}
7 StartingDir="$PWD"
8 ObjcDir="`dirname $0`"
9 TestsDir="test/"
10 cd "$ObjcDir"
11 # <rdar://problem/6456031> ER: option to not require extra privileges (-nosudo or somesuch)
12 Buildit="/Network/Servers/xs1/release/bin/buildit -rootsDirectory ${RootsDirectory} -arch i386 -arch x86_64 -project objc4 ."
13 echo Sudoing for buildit:
14 sudo $Buildit
15 XIT=$?
16 if [[ $XIT == 0 ]]; then
17 cd "$TestsDir"
18 #ObjcRootPath="$RootsDirectory/objc4.roots/objc4~dst/usr/lib/libobjc.A.dylib"
19 #ObjcRootHeaders="$RootsDirectory/objc4.roots/objc4~dst/usr/include/"
20 #make HALT=YES OBJC_LIB="$ObjcRootPath" OTHER_CFLAGS="-isystem $ObjcRootHeaders"
21 perl test.pl ARCHS=x86_64 OBJC_ROOT="$RootsDirectory/objc4.roots/"
22 XIT=`expr $XIT \| $?`
23 perl test.pl ARCHS=i386 OBJC_ROOT="$RootsDirectory/objc4.roots/"
24 XIT=`expr $XIT \| $?`
25 perl test.pl ARCHS=x86_64 GUARDMALLOC=YES OBJC_ROOT="$RootsDirectory/objc4.roots/"
26 XIT=`expr $XIT \| $?`
27 perl test.pl ARCHS=i386 GUARDMALLOC=YES OBJC_ROOT="$RootsDirectory/objc4.roots/"
28 XIT=`expr $XIT \| $?`
29 perl test.pl clean
30 fi
31 cd "$StartingDir"
32 exit $XIT