X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/3d7c199aafa39e7104b5fbbab43e55e739196afe..412ebb8e3cc35d457058c31310d89ef96b7c416d:/unit-tests/test-cases/suid-environ/Makefile diff --git a/unit-tests/test-cases/suid-environ/Makefile b/unit-tests/test-cases/suid-environ/Makefile index 07dcdef..7797d2e 100644 --- a/unit-tests/test-cases/suid-environ/Makefile +++ b/unit-tests/test-cases/suid-environ/Makefile @@ -1,5 +1,5 @@ ## -# Copyright (c) 2006 Apple Computer, Inc. All rights reserved. +# Copyright (c) 2006-2009 Apple Inc. All rights reserved. # # @APPLE_LICENSE_HEADER_START@ # @@ -23,16 +23,31 @@ TESTROOT = ../.. include ${TESTROOT}/include/common.makefile -run: all - export DYLD_INSERT_LIBRARIES=/ && export DYLD_PRINT_LIBRARIES=/ && export DYLD_PREBIND_DEBUG=/ && ./main +ifeq "$(OS_NAME)" "iPhoneOS" + RUN_AS_USER = login -f -l mobile +else + RUN_AS_USER = +endif + +PWD = `pwd` + +all-check: all check + +check: + ${RUN_AS_USER} $(PWD)/main-with-env all: main main: main.c - ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c + ${CC} ${CCFLAGS} -w -I${TESTROOT}/include -o main main.c sudo chown root main sudo chmod 4755 main - + echo "#!/bin/sh" > main-with-env + echo "export DYLD_INSERT_LIBRARIES=/" >> main-with-env + echo "export DYLD_PRINT_LIBRARIES=/" >> main-with-env + echo "$(PWD)/main" >> main-with-env + chmod +x main-with-env + clean: - ${RM} ${RMFLAGS} *~ main + ${RM} ${RMFLAGS} *~ main main-with-env