1#!/bin/sh 2 3# 4# Copyright (c) 2009 Apple Inc. All rights reserved. 5# 6# @APPLE_APACHE_LICENSE_HEADER_START@ 7# 8# Licensed under the Apache License, Version 2.0 (the "License"); 9# you may not use this file except in compliance with the License. 10# You may obtain a copy of the License at 11# 12# http://www.apache.org/licenses/LICENSE-2.0 13# 14# Unless required by applicable law or agreed to in writing, software 15# distributed under the License is distributed on an "AS IS" BASIS, 16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17# See the License for the specific language governing permissions and 18# limitations under the License. 19# 20# @APPLE_APACHE_LICENSE_HEADER_END@ 21# 22 23# Simple script to run the libclosure tests 24# Note: to build the testing root, the makefile will ask to authenticate with sudo 25# Use the RootsDirectory environment variable to direct the build to somewhere other than /tmp/ 26 27RootsDirectory=${RootsDirectory:-/tmp/} 28StartingDir="$PWD" 29AutoDir="`dirname $0`" 30TestsDir="tests/" 31cd "$AutoDir" 32# <rdar://problem/6456031> ER: option to not require extra privileges (-nosudo or somesuch) 33Buildit="/Network/Servers/xs1/release//bin/buildit -rootsDirectory ${RootsDirectory} -arch i386 -arch ppc -arch x86_64 -project libauto ." 34#Buildit=~rc/bin/buildit -rootsDirectory "${RootsDirectory}" -arch i386 -arch ppc -arch x86_64 -project libauto 35echo Sudoing for buildit: 36sudo $Buildit 37XIT=$? 38if [[ $XIT == 0 ]]; then 39 cd "$TestsDir" 40 AutoRootPath="$RootsDirectory/libauto.roots/libauto~dst/usr/lib/" 41 DYLD_LIBRARY_PATH="$AutoRootPath" make 42 XIT=$? 43 make clean 44fi 45cd "$StartingDir" 46exit $XIT 47