[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnuplot 1dd661e 180/184: Fix testing in Github CI. Simplif
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnuplot 1dd661e 180/184: Fix testing in Github CI. Simplify compilation and testing process. |
Date: |
Sun, 29 Aug 2021 11:03:41 -0400 (EDT) |
branch: elpa/gnuplot
commit 1dd661eb40afc6d70167d24b6b5277ecf873d936
Author: mtreca <maxime.treca@gmail.com>
Commit: mtreca <maxime.treca@gmail.com>
Fix testing in Github CI. Simplify compilation and testing process.
Remove Cask and its dependencies for now, and simplify the
compilation/testing process. Make compile byte-compiles all files,
make test runs ERT tests. Fix various imports and warnings.
---
.github/workflows/test.yml | 7 +++++--
Cask | 7 -------
Makefile | 43 +++++++++++++------------------------------
dot.el | 8 --------
gnuplot-context.el | 35 ++++++++++++-----------------------
gnuplot-debug-context.el | 6 +++---
gnuplot-gui.el | 4 ++--
gnuplot-test-context.el | 2 +-
gnuplot-tests.el | 3 +--
gnuplot.el | 4 ++--
tests/gnuplot-test.el | 40 ----------------------------------------
11 files changed, 39 insertions(+), 120 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index c02ec5c..79bb4eb 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,10 +28,13 @@ jobs:
version: ${{ matrix.emacs_version }}
- uses: conao3/setup-cask@master
+ - name: Install Gnuplot
+ run: sudo apt update && sudo apt install gnuplot
+
- name: Run tests
if: matrix.allow_failure != true
- run: 'cask && cask build && cask exec buttercup -L .'
+ run: 'make && make test'
- name: Run tests (allow failure)
if: matrix.allow_failure == true
- run: 'cask && cask build && cask exec buttercup -L . || true'
+ run: 'make && make test || true'
diff --git a/Cask b/Cask
deleted file mode 100644
index aab2b91..0000000
--- a/Cask
+++ /dev/null
@@ -1,7 +0,0 @@
-(source gnu)
-(source melpa)
-
-(package-file "gnuplot.el")
-
-(development
- (depends-on "buttercup"))
diff --git a/Makefile b/Makefile
index f18d0b8..5e21cb2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,38 +1,21 @@
-# -*- mode: makefile -*-
-
EMACS ?= emacs
-## You will probably not need to change anything below this line
-
-BYTE = $(EMACS) -batch -q -no-site-file -l dot.el -f batch-byte-compile
-
-.PHONY: all default clean pdf ps
-
-default: gnuplot.elc gnuplot-gui.elc gnuplot-context.elc
-
-pdf: gpelcard.pdf
-
-ps: gpelcard.ps
-
-all: gnuplot.elc gnuplot-gui.elc gnuplot-context.elc gpelcard.pdf gpelcard.ps
-
-%.elc: %.el
- $(BYTE) "$<"
+LOAD = -l gnuplot \
+ -l gnuplot-context \
+ -l gnuplot-debug-context \
+ -l gnuplot-gui \
+ -l gnuplot-tests \
+ -l gnuplot-test-context
-test: gnuplot.elc gnuplot-context.elc gnuplot-tests.elc
gnuplot-test-context.elc
- $(EMACS) --batch -L . \
- --load=gnuplot-tests \
- --load=gnuplot-test-context \
- --eval='(ert-run-tests-batch "^gnuplot-")'
+.PHONY: all default clean
-gpelcard.ps: gpelcard.dvi
- dvips -o gpelcard.ps gpelcard.dvi
+default: compile
-gpelcard.pdf: gpelcard.tex
- pdflatex gpelcard.tex
+test:
+ $(EMACS) -batch -L . $(LOAD) -f ert-run-tests-batch-and-exit
-gpelcard.dvi: gpelcard.tex
- latex gpelcard.tex
+compile:
+ $(EMACS) -batch -L . -f batch-byte-compile *.el
clean:
- rm -f *.elc gpelcard.dvi gpelcard.log gpelcard.aux
+ rm -f *.elc
diff --git a/dot.el b/dot.el
deleted file mode 100644
index 1d6b88b..0000000
--- a/dot.el
+++ /dev/null
@@ -1,8 +0,0 @@
-;; These are some lines to help compilation of gnuplot-mode proceed
-;; with fewer warning messages
-(setq load-path (append (list ".") load-path)
- byte-compile-verbose nil
- byte-compile-warnings nil)
-
-(load "gnuplot")
-(load "gnuplot-context")
diff --git a/gnuplot-context.el b/gnuplot-context.el
index e688cff..8911003 100644
--- a/gnuplot-context.el
+++ b/gnuplot-context.el
@@ -230,22 +230,11 @@
;;; Code:
-
-;; Library dependencies
-(eval-when-compile
- (require 'cl-lib)
-
- ;; Prevent compiler warnings about undefined functions
- (require 'gnuplot))
-
-;; We need ElDoc support
+(require 'cl-lib)
+(require 'gnuplot)
(require 'eldoc)
-
-;; Compatibility for Emacs version < 23
-(eval-when-compile
- (when (not (fboundp 'string-match-p))
- (defmacro string-match-p (&rest args)
- `(save-match-data (string-match ,@args)))))
+(require 'info)
+(require 'info-look)
;;;; The tokenizer.
@@ -498,7 +487,7 @@ name; otherwise continues tokenizing up to the token at
point. FIXME."
(t ; two patterns
(let* ((pat1 (cadr pat))
- (pat2 (caddr pat))
+ (pat2 (cl-caddr pat))
(pat1-c (gnuplot-compile-pattern pat1))
(pat2-c (gnuplot-compile-pattern pat2))
(pat1-l (length pat1-c))
@@ -536,7 +525,7 @@ name; otherwise continues tokenizing up to the token at
point. FIXME."
;; Syntactic sugar for delimited lists
((delimited-list)
(let* ((item (cadr pat))
- (sep (caddr pat)))
+ (sep (cl-caddr pat)))
(gnuplot-compile-pattern
`(sequence ,item (many (sequence ,sep ,item))))))
@@ -1827,7 +1816,7 @@ there."
;; (literal LITERAL NO-COMPLETE)
((literal)
(let ((expect (cadr inst))
- (no-complete (caddr inst)))
+ (no-complete (cl-caddr inst)))
(cond (end-of-tokens
(unless no-complete
(gnuplot-trace "\tpushing \"%s\" to completions\n"
expect)
@@ -1852,7 +1841,7 @@ there."
;; regexp-matches REGEXP, use NAME for completions
((keyword)
(let ((regexp (cadr inst))
- (name (caddr inst)))
+ (name (cl-caddr inst)))
(cond (end-of-tokens
(gnuplot-trace "\tpushing \"%s\" to completions\n"
name)
(push name gnuplot-completions)
@@ -1929,7 +1918,7 @@ there."
;; onto the stack
((push)
(let* ((type (cadr inst))
- (value (caddr inst)))
+ (value (cl-caddr inst)))
(push `(,type ,value ,tokens) stack)))
;; (pop TYPE): pop something off the stack
@@ -1953,7 +1942,7 @@ there."
(record (assoc name gnuplot-captures)))
(if (not record)
(error "Gnuplot-match-tokens: no open capture group named
%s" name)
- (setf (caddr record) tokens)
+ (setf (cl-caddr record) tokens)
(gnuplot-debug (gnuplot-dump-captures)))))
;; (check-progress): make sure not stuck in an infinite loop
@@ -2003,7 +1992,7 @@ there."
(not (and gnuplot-info-at-point gnuplot-eldoc)))
(let* ((item (car stack))
(type (car item))
- (position (caddr item))) ; must progress by at least one token
+ (position (cl-caddr item))) ; must progress by at least one token
(if (and (memq type '(info eldoc no-scan))
(not (eq position tokens)))
(cl-case type
@@ -2041,7 +2030,7 @@ there."
(let ((record (assoc name gnuplot-captures)))
(if (not record) nil
(let ((begin (cadr record))
- (end (caddr record))
+ (end (cl-caddr record))
(accum '()))
(while (and begin (not (eq begin end)))
(push (pop begin) accum))
diff --git a/gnuplot-debug-context.el b/gnuplot-debug-context.el
index 8bca418..8ac2dbd 100644
--- a/gnuplot-debug-context.el
+++ b/gnuplot-debug-context.el
@@ -2,7 +2,7 @@
;; debugging utilities for the gnuplot-mode context matcher
;;
-(require 'gnuplot-test-context) ; for gnuplot-simplify-tokens
+(require 'gnuplot-test-context) ; for gnuplot-simplify-tokens
(defun gnuplot-unload ()
(interactive)
@@ -65,7 +65,7 @@
(if (eq (car x) 'return)
x
(list (car x) (cadr x)
- (gnuplot-simplify-tokens (caddr x)))))))
+ (gnuplot-simplify-tokens (cl-caddr x)))))))
(insert "-- end backtrace --\n"))))
(defun gnuplot-dump-backtrack (backtrack)
@@ -73,7 +73,7 @@
(with-gnuplot-trace-buffer
(insert "\n-- * backtrack records: * --\n")
(dolist (x backtrack)
- (insert (format "%s\t%s\n" (caddr x) (gnuplot-simplify-tokens (cadr
x)))))
+ (insert (format "%s\t%s\n" (cl-caddr x) (gnuplot-simplify-tokens
(cadr x)))))
(insert "-- end backtrack records --\n\n"))))
(defun gnuplot-dump-progress (progress)
diff --git a/gnuplot-gui.el b/gnuplot-gui.el
index 7a6ca67..8194cc6 100644
--- a/gnuplot-gui.el
+++ b/gnuplot-gui.el
@@ -1110,8 +1110,8 @@ arguments."
(if (and (string= prefix (car temp-list))
(string-match "^[-0-9.]+$" (cadr temp-list)))
(let ((this-car (cadr temp-list))
- (this-cdr (if (string-match "^[-0-9.]+$" (caddr
temp-list))
- (caddr temp-list) "")))
+ (this-cdr (if (string-match "^[-0-9.]+$" (cl-caddr
temp-list))
+ (cl-caddr temp-list) "")))
(setq this-cons (cons tag (cons this-car this-cdr))
temp-list nil))
(setq temp-list (cdr temp-list))))
diff --git a/gnuplot-test-context.el b/gnuplot-test-context.el
index 2efe7c1..baa0eef 100644
--- a/gnuplot-test-context.el
+++ b/gnuplot-test-context.el
@@ -32,7 +32,7 @@
(defun gnuplot-simplify-tokens (tokens)
(mapcar
(lambda (token)
- (case (gnuplot-token-type token)
+ (cl-case (gnuplot-token-type token)
(number
(string-to-number (gnuplot-token-id token)))
diff --git a/gnuplot-tests.el b/gnuplot-tests.el
index 46b5962..858000b 100644
--- a/gnuplot-tests.el
+++ b/gnuplot-tests.el
@@ -3,9 +3,8 @@
;;; Currently these attempt to cover the correct identification of
;;; string and comment syntax.
-(require 'gnuplot)
(require 'ert)
-(eval-when-compile (require 'cl-lib))
+(require 'cl-lib)
;; Hide an annoying interactive message during batch testing
(when (require 'nadvice nil t)
diff --git a/gnuplot.el b/gnuplot.el
index be18573..6ffa1a8 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -1777,7 +1777,7 @@ updates Gnuplot with the appropriate 'set output'
command."
(when (and size (> size 0))
(gnuplot-send-hiding-output "set output\n") ; Flush output file
(sit-for 0.1) ; Hack: wait for Gnuplot IO to finish
- (ecase gnuplot-inline-image-mode
+ (cl-ecase gnuplot-inline-image-mode
(nil nil)
(inline
(ignore-errors
@@ -2324,7 +2324,7 @@ the height of the frame.
The *info* buffer should already exist when this function is
called."
- (case gnuplot-info-display
+ (cl-case gnuplot-info-display
(window
(switch-to-buffer-other-window "*info*")
;; Adjust window height only if the frame is split
diff --git a/tests/gnuplot-test.el b/tests/gnuplot-test.el
deleted file mode 100644
index e08de85..0000000
--- a/tests/gnuplot-test.el
+++ /dev/null
@@ -1,40 +0,0 @@
-;;; gnuplot-test.el --- -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2020 Naoya Yamashita
-
-;; Author: Naoya Yamashita <conao3@gmail.com>
-
-;; This program is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;;
-
-
-;;; Code:
-
-(require 'buttercup)
-(require 'gnuplot)
-
-(describe "A suite"
- (it "contains a spec with an expectation"
- (expect t :to-be t)))
-
-;; (provide 'gnuplot-test)
-
-;; Local Variables:
-;; indent-tabs-mode: nil
-;; End:
-
-;;; gnuplot-test.el ends here
- [nongnu] elpa/gnuplot da11bfa 128/184: New customize option `gnuplot-use-context-sensitive-completion', (continued)
- [nongnu] elpa/gnuplot da11bfa 128/184: New customize option `gnuplot-use-context-sensitive-completion', ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f274ad7 138/184: Recommend to use GitHub bug tracker instead of E-mail, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 54fd3eb 141/184: do toolbar-make-button-list after check the function exists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 14584a0 143/184: clean Elisp format, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot a080f79 149/184: Merge pull request #45 from conao3/fix-trivial, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot b96c5d8 144/184: Merge pull request #43 from conao3/fix-format, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 3f0e094 154/184: Merge pull request #48 from conao3/feature, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 706e810 161/184: Merge pull request #54 from vxid/delete-xemacs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot c1e6018 158/184: Add GitHub Actions CI configure files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 8d5b7f5 157/184: Merge pull request #51 from vxid/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 1dd661e 180/184: Fix testing in Github CI. Simplify compilation and testing process.,
ELPA Syncer <=
- [nongnu] elpa/gnuplot 2c1e7cb 177/184: Rewrite README.org, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot fbb15b6 168/184: Merge pull request #60 from conao3/fix-ci, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 24dd2d0 170/184: Merge pull request #64 from mtreca/info-update, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 1f8f051 166/184: use actions/setup-python@v2 instead of v1.1.1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 90bfd6d 179/184: Simplify Makefile situation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot f0001c3 163/184: Merge pull request #55 from emacsorphanage/revert-54-delete-xemacs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 07a8027 183/184: Do not add lines to kill-ring when trimming the gnuplot buffer (#72), ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 7138b13 184/184: Fixup parens in gnuplot-trim-gnuplot-buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot 10f0d54 004/184: updated README.org, ELPA Syncer, 2021/08/29
- [nongnu] elpa/gnuplot b51d4a9 001/184: initial commit, ELPA Syncer, 2021/08/29