X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/197008ea33f135c7c4f94a67a2f75a9df7b7771d..39a8cd101b922f08058746122efff58c14b57605:/unit-tests/test-cases/dlopen-LD_LIBRARY_PATH/Makefile?ds=sidebyside diff --git a/unit-tests/test-cases/dlopen-LD_LIBRARY_PATH/Makefile b/unit-tests/test-cases/dlopen-LD_LIBRARY_PATH/Makefile index 6a3e391..dddef71 100644 --- a/unit-tests/test-cases/dlopen-LD_LIBRARY_PATH/Makefile +++ b/unit-tests/test-cases/dlopen-LD_LIBRARY_PATH/Makefile @@ -23,6 +23,7 @@ TESTROOT = ../.. include ${TESTROOT}/include/common.makefile +PWD = $(shell pwd) # # tests combinations of dlopen() and LD_LIBRARY_PATH @@ -37,13 +38,15 @@ include ${TESTROOT}/include/common.makefile # 6) fullpath and LD_LIBRARY_PATH set to alt # -run: all +all-check: all check + +check: cd alt1 && ../main "libfoo.dylib" 1 "leafname found in cwd" ./main "./alt1/libfoo.dylib" 1 "relative path" - ./main "`pwd`/alt2/libfoo.dylib" 2 "fullpath" - export LD_LIBRARY_PATH="`pwd`/alt1" && ./main "libfoo.dylib" 1 "leafname and LD_LIBRARY_PATH overrides cwd" - export LD_LIBRARY_PATH="`pwd`/alt1" && cd alt3 && ../main "libfoo.dylib" 1 "leafname and alt LD_LIBRARY_PATH" - export LD_LIBRARY_PATH="`pwd`/alt1" && ./main "`pwd`/alt2/libfoo.dylib" 2 "fullpath and LD_LIBRARY_PATH" + ./main "${PWD}/alt2/libfoo.dylib" 2 "fullpath" + export LD_LIBRARY_PATH="${PWD}/alt1" && ./main "libfoo.dylib" 1 "leafname and LD_LIBRARY_PATH overrides cwd" + export LD_LIBRARY_PATH="${PWD}/alt1" && cd alt3 && ../main "libfoo.dylib" 1 "leafname and alt LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="${PWD}/alt1" && ./main "${PWD}/alt2/libfoo.dylib" 2 "fullpath and LD_LIBRARY_PATH" all: main alt1/libfoo.dylib alt2/libfoo.dylib alt3 @@ -53,14 +56,14 @@ main : main.c libfoo.dylib alt1/libfoo.dylib : foo.c mkdir -p alt1 - ${CC} ${CCFLAGS} -dynamiclib foo.c -o "`pwd`/alt1/libfoo.dylib" -DVALUE=1 + ${CC} ${CCFLAGS} -dynamiclib foo.c -o "${PWD}/alt1/libfoo.dylib" -DVALUE=1 alt2/libfoo.dylib : foo.c mkdir -p alt2 - ${CC} ${CCFLAGS} -dynamiclib foo.c -o "`pwd`/alt2/libfoo.dylib" -DVALUE=2 + ${CC} ${CCFLAGS} -dynamiclib foo.c -o "${PWD}/alt2/libfoo.dylib" -DVALUE=2 libfoo.dylib : foo.c - ${CC} ${CCFLAGS} -dynamiclib foo.c -o "`pwd`/libfoo.dylib" -DVALUE=0 + ${CC} ${CCFLAGS} -dynamiclib foo.c -o "${PWD}/libfoo.dylib" -DVALUE=0 alt3 : mkdir -p alt3