[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c209a0f 2/2: Fix problem of image-tests.el on emba
From: |
Michael Albinus |
Subject: |
master c209a0f 2/2: Fix problem of image-tests.el on emba |
Date: |
Tue, 16 Mar 2021 13:40:36 -0400 (EDT) |
branch: master
commit c209a0f82825dacd7edeef34b31f458499307eef
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Fix problem of image-tests.el on emba
* test/README: Mention $EMACS_TEST_DIRECTORY.
* test/lisp/image-tests.el (image-tests--emacs-images-directory):
Use `data-directory', for runs w/o of make.
(image-type/from-filename): Check for `image-load-path'.
---
test/README | 6 +++++-
test/lisp/image-tests.el | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/test/README b/test/README
index 1e0e43a..a348074 100644
--- a/test/README
+++ b/test/README
@@ -22,7 +22,10 @@ following tags are recognized:
* :unstable
The test is under development. It shall run on demand only.
-The Makefile in this directory supports the following targets:
+The Makefile sets the environment variable $EMACS_TEST_DIRECTORY,
+which points to this directory. This environment variable does not
+exist when the tests are run outside make. The Makefile supports the
+following targets:
* make check
Run all tests as defined in the directory. Expensive and unstable
@@ -113,6 +116,7 @@ Some optional tests require packages from GNU ELPA. By
default
out somewhere else, use
make GNU_ELPA_DIRECTORY=/path/to/elpa ...
+
There are also continuous integration tests on
<https://hydra.nixos.org/jobset/gnu/emacs-trunk> (see
diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el
index bb42ffa..2f7afa2 100644
--- a/test/lisp/image-tests.el
+++ b/test/lisp/image-tests.el
@@ -25,7 +25,7 @@
(require 'cl-lib))
(defconst image-tests--emacs-images-directory
- (expand-file-name "../etc/images" (getenv "EMACS_TEST_DIRECTORY"))
+ (expand-file-name "images" data-directory)
"Directory containing Emacs images.")
(ert-deftest image--set-property ()
@@ -57,6 +57,8 @@
(should (eq (image-type-from-file-name "foo.png") 'png)))
(ert-deftest image-type/from-filename ()
+ ;; On emba, `image-load-path' does not exist.
+ (skip-unless (bound-and-true-p image-load-path))
(should (eq (image-type "foo.jpg") 'jpeg)))
(ert-deftest image-type-from-file-header-test ()