]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/restrict-environ/Makefile
dyld-851.27.tar.gz
[apple/dyld.git] / unit-tests / test-cases / restrict-environ / Makefile
index 8aa6bea413796277bf79a76cefeeea50061c6015..0d2aa80c8fd95da3c3055f44c53e8a18d40d82ff 100644 (file)
@@ -1,5 +1,5 @@
 ##
 ##
-# Copyright (c) 2009 Apple Inc. All rights reserved.
+# Copyright (c) 2009-2013 Apple Inc. All rights reserved.
 #
 # @APPLE_LICENSE_HEADER_START@
 # 
 #
 # @APPLE_LICENSE_HEADER_START@
 # 
 TESTROOT = ../..
 include ${TESTROOT}/include/common.makefile
 
 TESTROOT = ../..
 include ${TESTROOT}/include/common.makefile
 
+SHELL = bash # use bash shell so we can redirect just stderr
+
 ifeq "$(OS_NAME)" "iPhoneOS"
        RUN_AS_USER = login -f -l mobile
 ifeq "$(OS_NAME)" "iPhoneOS"
        RUN_AS_USER = login -f -l mobile
+       RUN_AS_ROOT =
 else
        RUN_AS_USER = 
 else
        RUN_AS_USER = 
+       RUN_AS_ROOT = sudo
 endif
 
 PWD = `pwd`
 endif
 
 PWD = `pwd`
@@ -34,7 +38,8 @@ PWD = `pwd`
 all-check: all check
 
 check:
 all-check: all check
 
 check:
-       ${RUN_AS_USER} $(PWD)/main-with-env
+       ${RUN_AS_USER} $(PWD)/main-with-env 2>/dev/null
+       ${RUN_AS_ROOT} $(PWD)/main-with-env 2>/dev/null
 
 all: main
 
 
 all: main