projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.pre7.81:
[sbcl.git]
/
tests
/
foreign.test.sh
diff --git
a/tests/foreign.test.sh
b/tests/foreign.test.sh
index
ae735b2
..
6b5a7cd
100644
(file)
--- a/
tests/foreign.test.sh
+++ b/
tests/foreign.test.sh
@@
-13,15
+13,15
@@
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
-sbcl="$1"
-
-testfilestem=$TMPDIR/sbcl-foreign-test-$$
+testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$
echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c
make $testfilestem.o
ld -shared -o $testfilestem.so $testfilestem.o
echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c
make $testfilestem.o
ld -shared -o $testfilestem.so $testfilestem.o
-$sbcl <<EOF
+${SBCL:-sbcl} <<EOF
+ (unless (fboundp 'load-foreign) ; not necessarily supported on all OSes..
+ (sb-ext:quit :unix-status 52)) ; successfully unsupported:-|
(load-foreign '("$testfilestem.so"))
(def-alien-routine summish int (x int) (y int))
(assert (= (summish 10 20) 31))
(load-foreign '("$testfilestem.so"))
(def-alien-routine summish int (x int) (y int))
(assert (= (summish 10 20) 31))
@@
-38,5
+38,7
@@
fi
# rolling over in his grave.:-) It would be good to make a test case
# for it..
# rolling over in his grave.:-) It would be good to make a test case
# for it..
+rm $testfilestem.*
+
# success convention for script
exit 104
# success convention for script
exit 104