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

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

[elpa] externals/csharp-mode 77cbcf4 030/459: Add byte-compilation, unit


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode 77cbcf4 030/459: Add byte-compilation, unit-test running to makefile.
Date: Sun, 22 Aug 2021 13:58:49 -0400 (EDT)

branch: externals/csharp-mode
commit 77cbcf4497dcff83a6b2906b607ca5b36bd84731
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Add byte-compilation, unit-test running to makefile.
    Add runner-script for travis.
    
    Addresses both
    https://github.com/josteink/csharp-mode/issues/6
    and
    https://github.com/josteink/csharp-mode/issues/7
---
 csharp-mode-tests.el |  4 ++++
 makefile             | 14 ++++++++++++++
 run-travis-ci.sh     | 14 ++++++++++++++
 3 files changed, 32 insertions(+)

diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
new file mode 100644
index 0000000..8f85e09
--- /dev/null
+++ b/csharp-mode-tests.el
@@ -0,0 +1,4 @@
+
+(require 'ert)
+
+;; TODO: add tests (and deftest macro)
diff --git a/makefile b/makefile
index f2bf437..cd06de7 100644
--- a/makefile
+++ b/makefile
@@ -3,6 +3,10 @@ PACKAGE_SHORTNAME=csharp-mode
 PACKAGE_NAME:=$(PACKAGE_SHORTNAME)-$(VERSION)
 PACKAGE_DIR:=/tmp/$(PACKAGE_NAME)
 
+EMACS=$(shell which emacs) -Q -batch -L .
+ELS = csharp-mode.el csharp-mode-tests.el
+ELCS = $(ELS:.el=.elc)
+
 package: $(PACKAGE_DIR)
        tar cvf ../$(PACKAGE_NAME).tar --exclude="*#" --exclude="*~" -C 
$(PACKAGE_DIR)/.. $(PACKAGE_NAME)
 
@@ -11,8 +15,18 @@ $(PACKAGE_DIR):
        cp -r ../$(PACKAGE_SHORTNAME)/* $@
        sed -re "s/VERSION/$(VERSION)/" $@/$(PACKAGE_NAME)-package-template.el 
> $@/$(PACKAGE_NAME)-pkg.el
 
+test:
+       + $(EMACS) -l csharp-mode-tests.el -f ert-run-tests-batch-and-exit
+
+%.elc: %.el
+       $(EMACS) -f batch-byte-compile $<
+
+#all: $(ELCS) test package
+all: test package
+
 clean:
        rm -f ../$(PACKAGE_NAME).tar
        rm -rf $(PACKAGE_DIR)
+       rm -rf $ELCS
 
 # end
diff --git a/run-travis-ci.sh b/run-travis-ci.sh
new file mode 100755
index 0000000..f73d79d
--- /dev/null
+++ b/run-travis-ci.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+cd "$(dirname "$0")"
+
+ECUKES_EMACS=${EMACS:-$(which emacs)}
+export ECUKES_EMACS
+
+echo "*** Emacs version ***"
+echo "ECUKES_EMACS = $ECUKES_EMACS"
+"$ECUKES_EMACS" --version
+echo
+
+# bytecompile, tests, package
+make all 



reply via email to

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