[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: guile-test: ignore *.test dotfiles by default
From: |
Rob Browning |
Subject: |
[Guile-commits] 01/02: guile-test: ignore *.test dotfiles by default |
Date: |
Sun, 14 Apr 2024 17:07:23 -0400 (EDT) |
rlb pushed a commit to branch main
in repository guile.
commit 6bb6c89f891aaae078ca19a58b79b327ff182d02
Author: Rob Browning <rlb@defaultvalue.org>
AuthorDate: Sat Aug 19 18:19:36 2023 -0500
guile-test: ignore *.test dotfiles by default
Adjust guile-test to ignore any test files with names beginning with a
dot.
If nothing else, this avoids make check and ./check-guile failures when
Emacs has unsaved changes to a test file. In that case Emacs creates a
symlink to nowhere until the content is saved or reverted.
* test-suite/guile-test: ignore test files whose names begin with a dot.
---
test-suite/guile-test | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/test-suite/guile-test b/test-suite/guile-test
index 552cef97e..6f1bba7cd 100755
--- a/test-suite/guile-test
+++ b/test-suite/guile-test
@@ -32,9 +32,10 @@
;;;; fail or pass unexpectedly.
;;;;
;;;; Normally, guile-test scans the test directory, and executes all
-;;;; files whose names end in `.test'. (It assumes they contain
-;;;; Scheme code.) However, you can have it execute specific tests by
-;;;; listing their filenames on the command line.
+;;;; files whose names end in `.test' and don't begin with `.'. (It
+;;;; assumes they contain Scheme code.) However, you can have it
+;;;; execute specific tests by listing their filenames on the command
+;;;; line.
;;;;
;;;; The option `--test-suite' can be given to specify the test
;;;; directory. If no such option is given, the test directory is
@@ -158,10 +159,10 @@
(let ((root-len (+ 1 (string-length test-dir)))
(tests '()))
(for-each-file (lambda (file)
- (if (string-suffix? ".test" file)
- (let ((short-name
- (substring file root-len)))
- (set! tests (cons short-name tests))))
+ (when (string-suffix? ".test" file)
+ (let ((short-name (substring file root-len)))
+ (unless (eqv? #\. (string-ref short-name 0))
+ (set! tests (cons short-name tests)))))
#t)
test-dir)