1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
guile/test-suite/tests
Michael Gran 7b41294049 Improve DLL search strategy for load-foreign-library
The new non-libltdl foreign library loading algorithm from 3.0.6
fails to cover common cases regarding how libtool names and installs
DLL files.  Notably, it fails to recognize when libtool has added the
major version number into the filename itself, such as libfoo-1.dll
Also, it does not search in binary directories and the PATH for DLL
files, where libtool is likely to install DLLs.

This adds the option to search for dlls with major version numbers
in the filename, and modifies the search strategy for DLL-using
OSs to check bindir and PATH.

For MSYS, libraries are installed with the 'msys-' prefix. So this
modifies load-foreign-library to handle that prefix as well.
It changes the #:rename-on-cygwin? option to #:host-type-rename? to
better reflect that is works on both Cygwin and MSYS.

Partially based on a patch by Hannes Müller.

* NEWS: updated
* doc/ref/api-foreign.texi: document updates to load-foreign-library
  and system-dll-path
* module/system/foreign-library.scm (is-integer-string?): new utility function
  (dll-name-match?): new utility function
  (find-best-dll-from-matches): new utility function
  (dll-exists-with-version): new function that implements new dll search logic
  (file-exists-with-extension): add flag argument to allow new dll search
  (file-exists-in-path-with-extension): add flag argument to all new dll search
  (system-dll-path): new parameter
  (lib->msys): new helper function
  (load-foreign-library): add new optarg flag #:allow-dll-version-suffix?
    Pass new flag to library search functions.
    Implement new search strategy for #:search-system-paths? on DLL systems'
    replace #:rename-on-cygwin? with #:host-type-rename?
        Use that option to rename both MSYS and Cygwin libraries.
  (guile-system-extensions-path): prefer bindir to libdir on DLL systems
* test-suite/tests/foreign.test ("dll-name-match?"): new test category
  ("find-best-dll-from-matches"): new test category
  ("lib->msys"): new unit tests
2025-03-22 07:05:31 -07:00
..
00-initial-env.test
00-repl-server.test Use mkdtemp to simplify repl server test 2021-01-21 10:41:10 -08:00
00-socket.test Cygwin/MSYS: 00-socket.test: abstract sockets are unsupported 2025-03-22 06:42:21 -07:00
alist.test Resolve unresolved alist test cases 2017-03-14 16:04:14 +01:00
and-let-star.test Update and-let-star.test 2016-06-21 13:40:02 +02:00
array-map.test Support non-zero lower bounds in array-slice-for-each 2017-10-31 13:23:17 +01:00
arrays.test Remove the 'simple vector' concept 2021-08-16 15:39:21 +02:00
asyncs.test More robust asyncs.test 2023-09-18 15:24:37 +02:00
atomic.test Compiler support for atomics 2016-09-06 12:18:35 +02:00
bit-operations.test
bitvectors.test New function bitvector-copy (scm_bitvector_copy) 2022-01-04 12:28:41 +01:00
brainfuck.test move (test-suite lib) to lower dir; cleans up uninstalled paths. 2012-04-23 21:46:06 +02:00
bytevectors.test Add 'bytevector-slice'. 2023-01-14 16:14:17 +01:00
c-api.test Modifies command line quoting in c-api.test 2022-10-02 07:30:48 -07:00
chars.test Read-in-scheme replaces boot "read" definition 2021-03-03 17:08:55 +01:00
coding.test Make temporary file in coding.test work on MS-Windows. 2014-08-13 18:41:15 +03:00
common-list.test
compiler.test Add test: writes to specific fields clobber reads of whole objects 2024-03-20 11:50:53 +01:00
continuations.test
control.test Nonlocal prompt returns cause all effects 2017-03-13 22:20:16 +01:00
copy-tree.test Move copy-tree to (ice-9 copy-tree); deprecate main binding 2020-09-10 21:57:21 +02:00
coverage.test Fix coverage test for top-level binding optimization 2019-08-18 22:27:12 +02:00
cross-compilation.test Allow empty vendor string in GNU target triplets. 2022-06-16 09:42:05 +02:00
curried-definitions.test In curried definitions, move docstrings to outermost lambda 2022-08-29 11:45:39 +02:00
dwarf.test Read Scheme via read-syntax 2021-02-25 16:07:47 +01:00
ecmascript.test Fix tree-il code generation for ECMAscript `new' expression. 2016-10-25 23:39:30 +02:00
elisp-compiler.test Fix test suite for constant literals change 2017-04-19 09:26:11 +02:00
elisp-reader.test
elisp.test Move copy-tree to (ice-9 copy-tree); deprecate main binding 2020-09-10 21:57:21 +02:00
encoding-escapes.test
encoding-iso88591.test Improve handling of locales in the test suite. 2014-02-07 21:49:35 -05:00
encoding-iso88597.test Improve handling of locales in the test suite. 2014-02-07 21:49:35 -05:00
encoding-utf8.test Improve handling of locales in the test suite. 2014-02-07 21:49:35 -05:00
error-handling.test call-with-values builtin doesn't leave garbage on the stack 2023-05-07 09:50:14 +02:00
eval-string.test eval-string.test: check source properties 2024-04-05 17:51:48 -05:00
eval.test Fix typos throughout codebase. 2024-05-06 11:51:53 +02:00
exceptions.test Fix exn dispatch for exns within pre-unwind handlers 2023-06-08 10:26:16 +02:00
fdes-finalizers.test Add file descriptor finalizers 2016-08-30 23:35:10 +02:00
filesys.test filesys.test: skip copy-file EACCES test when root 2025-03-20 13:21:56 -05:00
fluids.test Fix typos throughout codebase. 2024-05-06 11:51:53 +02:00
foreign.test Improve DLL search strategy for load-foreign-library 2025-03-22 07:05:31 -07:00
format.test (ice-9 format): Fix scaling floats with leading zeros 2021-10-19 02:52:15 +02:00
fractions.test Fix incorrect rationalize tests. 2013-07-21 08:09:46 -04:00
ftw.test in ftw test, skip EACCESS test on MinGW 2022-09-20 19:50:14 -07:00
future.test futures: Limit the number of nested futures on the same stack. 2013-03-27 18:09:49 +01:00
gc.test Fix one remaining use of make-record-type with string type name 2019-10-23 14:45:36 +02:00
getopt-long.test
goops.test goops.test: Add tests for define-method* 2024-12-11 22:43:17 +01:00
guardians.test Deprecate vector-ref, vector-length, vector-set! on weak vectors 2014-02-07 12:42:44 +01:00
hash.test Add 'hash' test for keywords. 2020-03-06 17:17:41 +01:00
hooks.test
i18n.test Fix recent i18n tests 2021-03-16 21:55:22 +01:00
iconv.test U+FFFD is the input substitution character 2016-05-16 10:48:35 +02:00
import.test
interp.test interp.test: add missing (test-suite lib) dependency 2024-04-14 16:15:10 -05:00
keywords.test
linker.test linker: Do not store entire ELF in memory when writing to a file. 2023-01-17 17:49:05 +01:00
list.test Improve error reporting in 'append!' 2012-10-06 06:04:29 -04:00
load.test primitive-load returns the value(s) of the last expression 2012-01-09 16:15:00 +01:00
match.test Hotfix to unify (x ...) patterns in match 2021-09-30 15:47:41 +02:00
match.test.upstream Hotfix to unify (x ...) patterns in match 2021-09-30 15:47:41 +02:00
modules.test Fix deprecated 1-arg `make-module' in tests 2019-10-22 14:00:12 +02:00
multilingual.nottest
net-db.test tests: Have `getaddrinfo' test work for Darwin 8. 2012-02-03 10:30:52 +01:00
numbers.test Add missing branch in scm_is_less_than() 2024-03-19 16:03:09 +01:00
optargs.test Warning and optimization levels always small integers 2020-05-08 16:35:04 +02:00
options.test
pairs.test
parameters.test current-input-port et al are srfi-39 parameters 2011-12-10 21:37:19 +01:00
peg.bench PEG Renames 2013-01-16 10:11:49 +01:00
peg.test PEG: string-peg: Add HTML5 grammar test. 2024-12-22 22:17:39 +01:00
peval.test peval: Enable inlining for functions with kwargs 2024-03-13 20:19:59 +01:00
poe.test
popen-child.scm
popen.test disable popen 'no duplicates' test for MinGW 2021-03-10 01:59:59 -08:00
ports.test ports.test: catch pipe errors 2025-03-22 06:27:51 -07:00
posix.test Do not depend on tmpnam in posix.test. 2024-10-20 21:22:23 +02:00
print.test Fix pretty-print with a per-line prefix 2023-11-15 09:35:23 +01:00
procprop.test remove @apply memoizer 2013-06-27 22:02:35 +02:00
procs.test
q.test
r4rs.test Fix docstring for symbol->string, string->symbol 2023-09-18 16:03:41 +02:00
r5rs_pitfall.test Rewrite boot-9 map to be recursive and pure 2014-05-01 21:17:28 +02:00
r6rs-arithmetic-bitwise.test Optimize R6RS bitwise operators. 2013-07-21 10:00:48 -04:00
r6rs-arithmetic-fixnums.test Fix fixnum-range changes in R6RS fixnum bitops 2016-06-21 09:32:30 +02:00
r6rs-arithmetic-flonums.test Fix numerator and denominator handling of signed zeroes and infinities. 2013-08-09 06:09:56 -04:00
r6rs-base.test R6RS `string-for-each' should accept multiple string arguments 2012-11-22 22:26:16 +01:00
r6rs-conditions.test
r6rs-control.test
r6rs-enums.test
r6rs-eval.test
r6rs-exceptions.test Convert guile exceptions to R6RS conditions in R6RS exception handlers. 2013-11-18 00:35:42 -05:00
r6rs-files.test Add mkstemp; undocument mkstemp! 2021-03-10 20:40:10 +01:00
r6rs-hashtables.test (rnrs hashtables): Hash functions of eq? and eqv? hashtables 2016-06-21 09:48:36 +02:00
r6rs-lists.test Fix R6RS `fold-left' so the accumulator is the first argument. 2011-11-01 01:11:46 +01:00
r6rs-ports.test r6rs-ports.test: don't race with gc close in custom port tests 2025-03-02 14:44:53 -06:00
r6rs-records-inspection.test
r6rs-records-procedural.test Rebase R6RS records on top of core records 2019-10-29 11:35:16 +01:00
r6rs-records-syntactic.test
r6rs-unicode.test r6rs-unicode.test: add emacs scheme mode marker 2024-04-14 13:24:23 -05:00
r7rs.test Add test for r7rs string-for-each 2023-09-29 16:51:27 +02:00
random.test Support general arrays in random:hollow-sphere! 2017-10-31 13:30:01 +01:00
rdelim.test New line or field iteration procedures in (ice-9 rdelim) 2024-12-19 22:36:38 +01:00
reader.test tests: Add read-syntax + syntax-source test. 2022-03-07 10:52:16 +01:00
receive.test
records.test Add support for immutable fields in core records 2019-10-28 16:59:58 +01:00
regexp.test Merge commit '0ce224594a' 2014-02-08 14:48:56 +01:00
rnrs-libraries.test Fix R6RS imports of interfaces that use interfaces 2016-04-14 12:35:55 +02:00
rnrs-test-a.scm move (test-suite lib) to lower dir; cleans up uninstalled paths. 2012-04-23 21:46:06 +02:00
rtl-compilation.test Rename "RTL" to "bytecode" 2013-12-02 21:31:47 +01:00
rtl.test Fix RTL tests for recent arity change 2019-06-07 17:10:32 +02:00
sandbox.test Add sandboxed evaluation facility 2017-04-18 21:27:45 +02:00
session.test Fix procedure-arguments on RTL programs, and tweak session.test 2013-11-08 13:29:03 +01:00
signals.test Disable test for current value of setitimer on Cygwin 2019-05-23 17:32:17 +02:00
sort.test Fix sort, sort! for arrays with nonzero lower bound 2017-10-31 13:23:17 +01:00
srcprop.test Add tests to verify that 'read' sets source properties when appropriate 2012-02-15 12:23:12 -05:00
srfi-1.test srfi-1 lset-difference!: move from C to Scheme 2024-07-30 19:28:37 -05:00
srfi-2.test Add SRFI-2 (and-let*) test suite. 2016-06-21 13:40:01 +02:00
srfi-4.test New function srfi-4-vector-type-size in (srfi srfi-4 gnu) 2021-12-06 14:00:03 +01:00
srfi-6.test Make SRFI-6 string ports Unicode-capable. 2012-06-20 15:50:27 +02:00
srfi-9.test Adapt srfi-9.test to error reporting improvements; update copyright dates. 2013-09-12 18:14:54 -04:00
srfi-10.test srfi-10.test: add missing (test-suite lib) dependency 2024-04-14 16:15:10 -05:00
srfi-11.test srfi-11: Do not expose variables to later clauses 2020-01-12 22:18:41 +01:00
srfi-13.test Fix 'string-copy!' to work properly with overlapping src/dest. 2014-01-08 21:42:24 -05:00
srfi-14.test Improve handling of locales in the test suite. 2014-02-07 21:49:35 -05:00
srfi-17.test
srfi-18.test Fix typos throughout codebase. 2023-07-16 22:09:01 +02:00
srfi-19.test srfi-19: Fix ~V converter in date->string. 2025-02-28 10:28:06 +01:00
srfi-26.test
srfi-27.test
srfi-31.test Rewrite SRFI-31 in terms of `syntax-rules'. 2012-09-11 23:39:32 +02:00
srfi-34.test
srfi-35.test srfi-35: Fix expansion of 'condition' for compound conditions. 2022-10-01 18:04:16 +02:00
srfi-37.test SRFI-37: Fix infinite loop when processing short option with no required arg. 2013-03-25 23:25:57 +01:00
srfi-38.test
srfi-39.test
srfi-41.test Add SRFI-41. 2013-03-27 13:37:45 -04:00
srfi-42.test Remove stale test file. 2012-01-30 20:57:42 +01:00
srfi-43.test Implement SRFI-43 Vector Library. 2014-02-01 01:19:49 -05:00
srfi-45.test SRFI-45: add promise? predicate. 2013-03-26 21:22:11 -04:00
srfi-60.test SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable. 2014-03-11 21:39:26 -04:00
srfi-64-test.scm Replace SRFI-64 with a new implementation. 2024-10-20 19:11:42 +02:00
srfi-64.test Fix srfi-64.test for #:select borkage. The irony... 2016-06-21 22:46:03 +02:00
srfi-67.test Placate a number of `syntax-check' verifications. 2012-01-05 23:38:10 +01:00
srfi-69.test
srfi-71.test tests: Add SRFI-71 test. 2018-08-07 12:09:06 +02:00
srfi-88.test
srfi-98.test
srfi-105.test Relax srfi-105 source expectations 2021-03-03 17:08:55 +01:00
srfi-111.test Fix bug in srfi-111 box printer 2025-01-16 15:47:03 +01:00
srfi-119.test Add language/wisp, Wisp tests, and SRFI-119 documentation 2024-06-01 11:50:16 +02:00
srfi-171.test Add SRFI-171 to guile 2020-03-25 22:44:27 +01:00
statprof.test Check for working profiling and virtual itimers 2017-03-06 23:06:12 -08:00
streams.test
strings.test Add test for 'string-ref' with a negative index at -O2. 2023-01-17 17:49:05 +01:00
structs.test Replace "pr" struct fields with "pw" fields 2017-09-23 15:33:02 +02:00
suspendable-ports.test Update port documentation, rename sports to suspendable ports 2016-06-09 10:50:32 +02:00
sxml-match-tests.ss
sxml.fold.test
sxml.match.test move (test-suite lib) to lower dir; cleans up uninstalled paths. 2012-04-23 21:46:06 +02:00
sxml.simple.test add #:doctype-handler to xml->sxml 2013-01-30 15:29:18 +01:00
sxml.ssax.test
sxml.transform.test
sxml.xpath.test
symbols.test
syncase.test Fix infinite loop in expander 2015-02-13 16:43:01 +01:00
syntax.test Macro-introduced top-level vars scope to their module even if unbound 2024-02-20 14:15:12 +01:00
texinfo.docbook.test
texinfo.html.test Fix texinfo->html for @acronym, @itemize 2016-06-24 17:09:39 +02:00
texinfo.plain-text.test texinfo: Properly render @acronym in plain text. 2020-01-29 15:19:37 +01:00
texinfo.serialize.test Texinfo serialization: add braces when needed 2016-10-11 22:08:03 +02:00
texinfo.string-utils.test texinfo: Add whitespace after periods. 2013-03-22 22:05:23 +01:00
texinfo.test texinfo: Add basic support for @w{...}. 2020-06-18 00:30:30 +02:00
threads.test Fix asymetric mutex locking when joining thread. 2024-01-25 23:12:53 +01:00
time.test strptime test shouldn't presume that initial whitespace is ignored 2021-01-23 12:35:01 -08:00
tree-il.test Add -Wunused-module. 2023-02-24 16:49:00 +01:00
types.test types: Recognize 'scm_t_port_type' and decode port type name. 2018-08-07 12:13:45 +02:00
unicode.test Add (ice-9 unicode) module 2014-09-29 21:54:14 -04:00
vectors.test Remove the 'simple vector' concept 2021-08-16 15:39:21 +02:00
version.test version.test: incorrect test logic 2025-03-22 05:57:27 -07:00
vlist.test Merge remote-tracking branch 'origin/stable-2.0' 2013-03-28 05:09:53 -04:00
vm.test 'load-thunk-from-memory' reports the correct error. 2018-08-07 11:34:35 +02:00
weaks.test Merge commit '9b5da400dd' 2014-02-07 15:36:06 +01:00
web-client.test Generic port facility provides buffering uniformly 2016-04-06 19:21:44 +02:00
web-http.test web: Don't hide missing data in the chunked input port. 2022-07-04 11:22:13 +02:00
web-request.test web: add support for URI-reference 2017-05-21 13:42:29 +02:00
web-response.test web: Fix 'close' method of delimited input ports. 2016-05-22 19:48:47 +02:00
web-server.test tests: Skip web server tests when thread support is missing. 2023-07-16 21:47:44 +02:00
web-uri.test Allow trailing "." in urls 2025-03-02 21:18:19 +01:00