emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql b84102f111 4/8: Show more warnings about skipped c


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql b84102f111 4/8: Show more warnings about skipped connector tests
Date: Fri, 15 Nov 2024 15:59:38 -0500 (EST)

branch: elpa/emacsql
commit b84102f111d9d18d61b0779722c508944a15794c
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Show more warnings about skipped connector tests
---
 tests/emacsql-external-tests.el | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/tests/emacsql-external-tests.el b/tests/emacsql-external-tests.el
index 0ec46bb13d..b443a7b703 100644
--- a/tests/emacsql-external-tests.el
+++ b/tests/emacsql-external-tests.el
@@ -59,23 +59,29 @@
                  (boundp 'module-file-suffix)
                  module-file-suffix)
         (reg "sqlite-module" 'emacsql-sqlite-module nil))
-      (when (and mysql-database mysql-user mysql-host mysql-password 
mysql-port)
-        (reg "mysql" #'emacsql-mysql mysql-database
-             :user mysql-user
-             :host mysql-host
-             :password mysql-password
-             :port mysql-port))
-      (when (and psql-database psql-user psql-host psql-port)
-        (reg "psql" #'emacsql-psql psql-database
-             :username psql-user
-             :hostname psql-host
-             :port psql-port))
-      (when (and pg-database pg-user pg-password pg-host pg-port
-                 (fboundp 'emacsql-pg))
-        (reg "pg" #'emacsql-pg pg-database pg-user
-             :host pg-host
-             :password pg-password
-             :port pg-port)))
+      (if (and mysql-database mysql-user mysql-host mysql-password mysql-port)
+          (reg "mysql" #'emacsql-mysql mysql-database
+               :user mysql-user
+               :host mysql-host
+               :password mysql-password
+               :port mysql-port)
+        (message "WARNING: Forgo testing `%s' because %s" 'emacsql-mysql
+                 "not all required environment variables are set"))
+      (if (and psql-database psql-user psql-host psql-port)
+          (reg "psql" #'emacsql-psql psql-database
+               :username psql-user
+               :hostname psql-host
+               :port psql-port)
+        (message "WARNING: Forgo testing `%s' because %s" 'emacsql-psql
+                 "not all required environment variables are set"))
+      (if (and pg-database pg-user pg-password pg-host pg-port
+               (fboundp 'emacsql-pg))
+          (reg "pg" #'emacsql-pg pg-database pg-user
+               :host pg-host
+               :password pg-password
+               :port pg-port)
+        (message "WARNING: Forgo testing `%s' because %s" 'emacsql-pg
+                 "not all required environment variables are set")))
     (nreverse factories))
   "List of connection factories to use in unit tests.")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]