~ chicken-core (chicken-5) 43b89bf60a3fbfa30eb0e09f2b068e0e986bda58
commit 43b89bf60a3fbfa30eb0e09f2b068e0e986bda58 Author: Evan Hanson <evhan@foldling.org> AuthorDate: Tue Jun 20 21:51:55 2017 +1200 Commit: Peter Bex <peter@more-magic.net> CommitDate: Sun Jun 25 12:16:12 2017 +0200 Export CHICKEN_REPOSITORY_PATH for functor and linking tests This is one half of 934eecc re-applied to fix a problem when running `make check` without first running `make install`: when compiling and executing use-square-functor.scm in the functor tests, the import library for the "chicken" module wouldn't be found since it wasn't present in the target install directory. To fix this, we export the CHICKEN_REPOSITORY_PATH and CHICKEN_INSTALL_REPOSITORY variables so that the test executable looks there rather than in the install directory. Signed-off-by: Peter Bex <peter@more-magic.net> diff --git a/tests/runtests.bat b/tests/runtests.bat index e3e016db..8eb5fea8 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -7,8 +7,8 @@ set TEST_DIR=%cd% set CHICKEN=..\chicken set CHICKEN_PROFILE=..\chicken-profile -set CHICKEN_INSTALL_REPOSITORY= -set CHICKEN_REPOSITORY_PATH= +set CHICKEN_INSTALL_REPOSITORY=%TEST_DIR%\test-repository +set CHICKEN_REPOSITORY_PATH=%TEST_DIR%\..;%CHICKEN_INSTALL_REPOSITORY% set PATH=%cd%\..;%PATH% set TYPESDB=..\types.db @@ -574,8 +574,6 @@ if errorlevel 1 exit /b 1 if errorlevel 1 exit /b 1 linking-tests if errorlevel 1 exit /b 1 -set CHICKEN_INSTALL_REPOSITORY=test-repository -set CHICKEN_REPOSITORY_PATH=test-repository mkdir %CHICKEN_INSTALL_REPOSITORY% move reverser.o %CHICKEN_INSTALL_REPOSITORY% move reverser.import.scm %CHICKEN_INSTALL_REPOSITORY% diff --git a/tests/runtests.sh b/tests/runtests.sh index af45d52f..7c7507d5 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -21,6 +21,7 @@ LIBRARY_PATH=${TEST_DIR}/..:${LIBRARY_PATH} # the binary are read by the OS itself, which uses $PATH (mingw too) # Oddly, prefixing .. with ${TEST_DIR}/ does _not_ work on mingw! PATH=..:${PATH} + export DYLD_LIBRARY_PATH LD_LIBRARY_PATH LIBRARY_PATH PATH case `uname` in @@ -30,13 +31,15 @@ case `uname` in DIFF_OPTS=-bu ;; esac -CHICKEN_INSTALL_REPOSITORY=${TEST_DIR}/test-repository -CHICKEN_REPOSITORY_PATH=${TEST_DIR}/..:$CHICKEN_INSTALL_REPOSITORY CHICKEN=${TEST_DIR}/../chicken CHICKEN_PROFILE=${TEST_DIR}/../chicken-profile CHICKEN_INSTALL=${TEST_DIR}/../chicken-install CHICKEN_UNINSTALL=${TEST_DIR}/../chicken-uninstall -COMPILE_OPTIONS="-compiler ${TEST_DIR}/../chicken -v -I${TEST_DIR}/.. -L${TEST_DIR}/.. -rpath ${TEST_DIR}/.. -include-path ${TEST_DIR}/.." +CHICKEN_INSTALL_REPOSITORY=${TEST_DIR}/test-repository +CHICKEN_REPOSITORY_PATH=${TEST_DIR}/..:$CHICKEN_INSTALL_REPOSITORY +COMPILE_OPTIONS="-compiler ${CHICKEN} -v -I${TEST_DIR}/.. -L${TEST_DIR}/.. -rpath ${TEST_DIR}/.. -include-path ${TEST_DIR}/.." + +export CHICKEN_INSTALL_REPOSITORY CHICKEN_REPOSITORY_PATH TYPESDB=../types.db @@ -442,9 +445,9 @@ $compile2 -link reverser linking-tests.scm $compile2 -link reverser linking-tests.scm -static ./linking-tests cp reverser.o reverser.import.scm "$CHICKEN_INSTALL_REPOSITORY" -CHICKEN_INSTALL_REPOSITORY=$CHICKEN_INSTALL_REPOSITORY CHICKEN_REPOSITORY_PATH=$CHICKEN_REPOSITORY_PATH $compile2 -link reverser linking-tests.scm +$compile2 -link reverser linking-tests.scm ./linking-tests -CHICKEN_INSTALL_REPOSITORY=$CHICKEN_INSTALL_REPOSITORY CHICKEN_REPOSITORY_PATH=$CHICKEN_REPOSITORY_PATH $compile2 -link reverser linking-tests.scm -static +$compile2 -link reverser linking-tests.scm -static ./linking-tests echo "======================================== private repository test ..."Trap