diff --git a/csc.scm b/csc.scm
index a39c3f5..885ea39 100644
a
|
b
|
EOF |
966 | 966 | TARGET_RUN_LIB_HOME))) |
967 | 967 | |
968 | 968 | (define (target-lib-path) |
| 969 | (or (get-environment-variable "TARGET_LIB_PATH") |
969 | 970 | (let ((tdir TARGET_LIB_HOME)) |
970 | 971 | (if (and (not (string=? tdir "")) |
971 | 972 | cross-chicken |
972 | 973 | (not host-mode)) |
973 | 974 | tdir |
974 | | (lib-path)))) |
| 975 | (lib-path))))) |
975 | 976 | |
976 | 977 | (define (copy-libraries targetdir) |
977 | 978 | (let ((lib (make-pathname |
diff --git a/tests/runtests.sh b/tests/runtests.sh
index 7065564..b4a5f93 100755
a
|
b
|
CHICKEN_INSTALL=${TEST_DIR}/../chicken-install |
42 | 42 | CHICKEN_UNINSTALL=${TEST_DIR}/../chicken-uninstall |
43 | 43 | ASMFLAGS= |
44 | 44 | FAST_OPTIONS="-O5 -d0 -b -disable-interrupts" |
| 45 | COMPILE_OPTIONS="-compiler ${TEST_DIR}/../chicken -v -I${TEST_DIR}/.. -L${TEST_DIR}/.. -include-path ${TEST_DIR}/.." |
| 46 | SETUP_PREFIX="-e (use setup-api)" |
| 47 | SETUP_PREFIX="${SETUP_PREFIX} -e (register-program \"csc\" \"${TEST_DIR}/../csc\")" |
| 48 | SETUP_PREFIX="${SETUP_PREFIX} -e (register-program \"chicken\" \"${TEST_DIR}/../chicken\")" |
| 49 | SETUP_PREFIX="${SETUP_PREFIX} -e (register-program \"csi\" \"${TEST_DIR}/../csi\")" |
45 | 50 | |
46 | 51 | TYPESDB=../types.db |
47 | 52 | cp $TYPESDB test-repository/types.db |
… |
… |
if test -f ../cygchicken-0.dll; then |
61 | 66 | mv ../cygchicken-0.dll ../cygchicken-0.dll_ |
62 | 67 | fi |
63 | 68 | |
64 | | compile="../csc -compiler $CHICKEN -v -I.. -L.. -include-path .. -o a.out" |
| 69 | compile="../csc -types ${TYPESDB} -ignore-repository ${COMPILE_OPTIONS} -o a.out" |
65 | 70 | compile2="../csc -compiler $CHICKEN -v -I.. -L.. -include-path .." |
66 | | compile_s="../csc -s -compiler $CHICKEN -v -I.. -L.. -include-path .." |
| 71 | compile_s="../csc -s -types ${TYPESDB} -ignore-repository ${COMPILE_OPTIONS} -v -I.. -L.. -include-path .." |
67 | 72 | interpret="../csi -n -include-path .." |
68 | 73 | |
69 | 74 | rm -f *.exe *.so *.o *.import.* a.out ../foo.import.* |
… |
… |
$compile inlining-tests.scm -optimize-level 3 |
80 | 85 | echo "======================================== scrutiny tests ..." |
81 | 86 | $compile typematch-tests.scm -specialize -w |
82 | 87 | ./a.out |
83 | | $compile scrutiny-tests.scm -A -scrutinize -ignore-repository -types $TYPESDB 2>scrutiny.out -verbose |
| 88 | $compile scrutiny-tests.scm -A -scrutinize 2>scrutiny.out -verbose |
84 | 89 | |
85 | 90 | # this is sensitive to gensym-names, so make it optional |
86 | 91 | if test \! -f scrutiny.expected; then |
… |
… |
fi |
89 | 94 | |
90 | 95 | diff $DIFF_OPTS scrutiny.expected scrutiny.out |
91 | 96 | |
92 | | $compile scrutiny-tests-2.scm -A -scrutinize -analyze-only -ignore-repository -types $TYPESDB 2>scrutiny-2.out -verbose |
| 97 | $compile scrutiny-tests-2.scm -A -scrutinize -analyze-only 2>scrutiny-2.out -verbose |
93 | 98 | |
94 | 99 | # this is sensitive to gensym-names, so make it optional |
95 | 100 | if test \! -f scrutiny-2.expected; then |
… |
… |
fi |
98 | 103 | |
99 | 104 | diff $DIFF_OPTS scrutiny-2.expected scrutiny-2.out |
100 | 105 | |
101 | | $compile scrutiny-tests-3.scm -specialize -block -ignore-repository -types $TYPESDB |
| 106 | $compile scrutiny-tests-3.scm -specialize -block |
102 | 107 | ./a.out |
103 | 108 | |
104 | | $compile scrutiny-tests-strict.scm -strict-types -specialize -ignore-repository -types $TYPESDB |
| 109 | $compile scrutiny-tests-strict.scm -strict-types -specialize |
105 | 110 | ./a.out |
106 | 111 | |
107 | 112 | echo "======================================== specialization tests ..." |
… |
… |
$interpret -bnq test-glob.scm |
354 | 359 | echo "======================================== compiler/nursery stress test ..." |
355 | 360 | for s in 100000 120000 200000 250000 300000 350000 400000 450000 500000; do |
356 | 361 | echo " $s" |
357 | | ../chicken ../utils.scm -:s$s -output-file tmp.c -include-path .. |
| 362 | ../chicken -ignore-repository ../utils.scm -:s$s -output-file tmp.c -include-path .. |
358 | 363 | done |
359 | 364 | |
360 | 365 | echo "======================================== symbol-GC tests ..." |
… |
… |
rm -fr rev-app rev-app-2 reverser/*.import.* reverser/*.so |
400 | 405 | |
401 | 406 | echo "======================================== reinstall tests" |
402 | 407 | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $CHICKEN_UNINSTALL -force reverser |
403 | | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $CHICKEN_INSTALL -t local -l $TEST_DIR reverser:1.0 \ |
404 | | -csi ${TEST_DIR}/../csi |
| 408 | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY CSC_OPTIONS=$COMPILE_OPTIONS \ |
| 409 | CSI_OPTIONS=$SETUP_PREFIX $CHICKEN_INSTALL -t local -l $TEST_DIR \ |
| 410 | -csi ${TEST_DIR}/../csi reverser:1.0 |
405 | 411 | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $interpret -bnq rev-app.scm 1.0 |
406 | | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $CHICKEN_INSTALL -t local -l $TEST_DIR -reinstall -force \ |
407 | | -csi ${TEST_DIR}/../csi |
| 412 | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY CSC_OPTIONS=$COMPILE_OPTIONS \ |
| 413 | CSI_OPTIONS=$SETUP_PREFIX $CHICKEN_INSTALL -t local -l $TEST_DIR \ |
| 414 | -reinstall -force -csi ${TEST_DIR}/../csi |
408 | 415 | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $interpret -bnq rev-app.scm 1.0 |
409 | 416 | |
410 | 417 | if test $OS_NAME != AIX -a $OS_NAME != SunOS -a $OS_NAME != GNU; then |
411 | 418 | echo "======================================== deployment tests" |
412 | 419 | mkdir rev-app |
413 | | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $CHICKEN_INSTALL -t local -l $TEST_DIR reverser |
414 | | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $compile2 -deploy rev-app.scm |
415 | | CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY $CHICKEN_INSTALL -deploy -prefix rev-app -t local -l $TEST_DIR reverser |
| 420 | TARGET_LIB_PATH=${TEST_DIR}/.. CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY CSC_OPTIONS=$COMPILE_OPTIONS \ |
| 421 | CSI_OPTIONS=$SETUP_PREFIX $CHICKEN_INSTALL -csi ${TEST_DIR}/../csi -t local -l $TEST_DIR reverser |
| 422 | TARGET_LIB_PATH=${TEST_DIR}/.. CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY CSC_OPTIONS=$COMPILE_OPTIONS \ |
| 423 | CSI_OPTIONS=$SETUP_PREFIX $compile2 -deploy rev-app.scm |
| 424 | TARGET_LIB_PATH=${TEST_DIR}/.. CHICKEN_REPOSITORY=$CHICKEN_REPOSITORY CSC_OPTIONS=$COMPILE_OPTIONS \ |
| 425 | CSI_OPTIONS=$SETUP_PREFIX $CHICKEN_INSTALL -csi ${TEST_DIR}/../csi -deploy -prefix rev-app -t local -l $TEST_DIR reverser |
416 | 426 | unset LD_LIBRARY_PATH DYLD_LIBRARY_PATH CHICKEN_REPOSITORY |
417 | 427 | # An absolute path is required on NetBSD with $ORIGIN, hence `pwd` |
418 | 428 | `pwd`/rev-app/rev-app 1.1 |