Make stuff regarding debug names much less complex.
[sbcl.git] / tests / relocation.test.sh
blob48b0d55d6a0458d7cf922dd2b0703c99e89f3f42
1 #!/bin/sh
3 . ./subr.sh
5 # The relocation test binary can only be built on linux.
6 # FIXME: This test _should_ work on any architecture, but it doesn't,
7 # so there must have been a regression in the heap relocator.
8 data=`run_sbcl --eval '(progn #+linux(progn(princ "fakemap") #+64-bit(princ "_64")))' \
9 --quit`
10 if [ -z "$data" ]
11 then
12 # shell tests don't have a way of exiting as "not applicable"
13 exit $EXIT_TEST_WIN
16 test_sbcl=../src/runtime/heap-reloc-test
18 rm -f $test_sbcl
20 set -e
21 (cd ../src/runtime ; make heap-reloc-test)
23 # Exercise all the lines of 'fakemap' by starting up N times in a row.
24 # KLUDGE: assume N = 6
25 # FIXME: don't assume that N = 6
27 export SBCL_FAKE_MMAP_INSTRUCTION_FILE=`pwd`/heap-reloc/$data
28 i=1
29 while [ $i -le 6 ]
31 export SBCL_FAKE_MMAP_INSTRUCTION_LINE=$i
32 $test_sbcl --lose-on-corruption --disable-ldb --noinform --core ../output/sbcl.core \
33 --no-sysinit --no-userinit --noprint --disable-debugger \
34 --eval '(gc :full t)' \
35 --eval '(defun fib (n) (if (<= n 1) 1 (+ (fib (- n 1)) (fib (- n 2)))))' \
36 --eval "(compile 'fib)" -quit
37 i=`expr $i + 1`
38 done
40 rm -f $test_sbcl
42 exit $EXIT_TEST_WIN