X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fforeign.test.sh;h=593412a68728ddc5a5b6693b320d0d51e1b3cd1f;hb=095564c28a259002c7e34fd1d861f5bbd0a959b6;hp=69702f68606250b333c020d789467966fb5d08f4;hpb=e5f24ebc38e38c986df830fd1e4035d16bea4e5c;p=sbcl.git diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index 69702f6..593412a 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -1,6 +1,7 @@ #!/bin/sh -# tests related to foreign function interface and LOAD-FOREIGN +# tests related to foreign function interface and loading of shared +# libraries # This software is part of the SBCL system. See the README file for # more information. @@ -13,28 +14,83 @@ # absolutely no warranty. See the COPYING and CREDITS files for # more information. -testfilestem=$TMPDIR/sbcl-foreign-test-$$ +echo //entering foreign.test.sh +# simple way to make sure we're not punting by accident: +# setting PUNT to anything other than 104 will make non-dlopen +# and non-linkage-table platforms fail this +PUNT=104 + +testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$ + +# Make a little shared object file to test with. echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c -make $testfilestem.o +echo 'int numberish = 42;' >> $testfilestem.c +echo 'int nummish(int x) { return numberish + x; }' >> $testfilestem.c +cc -c $testfilestem.c -o $testfilestem.o ld -shared -o $testfilestem.so $testfilestem.o -sbcl --noinform --noprint --sysinit /dev/null --userinit /dev/null < $testfilestem.deflisp < $testfilestem.testlisp <