]> git.saurik.com Git - apple/objc4.git/blob - runtests.sh
objc4-437.3.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 ppc -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 make HALT=YES OBJC_LIB="$ObjcRootPath"
20 XIT=$?
21 make clean
22 fi
23 cd "$StartingDir"
24 exit $XIT