mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
test-bad-identifiers: ignore *.[hc] dotfiles
When generating the list of test files, ignore any whose names begin with a dot. If nothing else, this avoids crashing on the symlinks that Emacs creates for files with pending changes. In that case it creates a symlink to nowhere until the content is saved or reverted, and those symlinks produce test failures like this: Backtrace: 3 (primitive-load "/home/rlb/src/guile/utf8-debug/test-su?") In ice-9/eval.scm: 619:8 2 (_ #(#(#(#<directory (guile-user) 7f0239b32c80> #) #) #)) In ice-9/ports.scm: 450:11 1 (call-with-input-file "../../libguile/.#strings.c" #<p?> ?) In unknown file: 0 (open-file "../../libguile/.#strings.c" "r" #:encoding # ?) ERROR: In procedure open-file: In procedure open-file: No such file or directory: "../../libguile/.#strings.c" FAIL: test-bad-identifiers * test-suite/standalone/test-bad-identifiers: ignore files with names beginning with a dot.
This commit is contained in:
parent
6bb6c89f89
commit
3ff8836e64
1 changed files with 5 additions and 8 deletions
|
@ -44,14 +44,11 @@ exec guile -q -s "$0" "$@"
|
|||
acc
|
||||
(cons (in-vicinity dir new) acc)))))))
|
||||
|
||||
(define (directory-files-matching dir pattern)
|
||||
(let ((file-name-regexp (make-regexp pattern)))
|
||||
(filter (lambda (fn)
|
||||
(regexp-exec file-name-regexp fn))
|
||||
(directory-files dir))))
|
||||
|
||||
(let loop ((file-names (directory-files-matching "../../libguile"
|
||||
"\\.[ch]$")))
|
||||
(let loop ((file-names (filter (lambda (fn)
|
||||
(and (or (string-suffix? ".h" fn)
|
||||
(string-suffix? ".c" fn))
|
||||
(not (string-prefix? "." (basename fn)))))
|
||||
(directory-files "../../libguile"))))
|
||||
(or (null? file-names)
|
||||
(begin
|
||||
(with-input-from-file (car file-names)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue