[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 9c2e067 2/3: drop run_rust_emacs_tests.sh and us
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 9c2e067 2/3: drop run_rust_emacs_tests.sh and use make test in ci |
Date: |
Sat, 16 Oct 2021 13:57:59 -0400 (EDT) |
branch: elpa/rust-mode
commit 9c2e06756d3678cdcaaa57ec01591083c5f1d2c4
Author: brotzeit <brotzeitmacher@gmail.com>
Commit: brotzeit <brotzeitmacher@gmail.com>
drop run_rust_emacs_tests.sh and use make test in ci
---
.github/workflows/test.yml | 4 +++-
README.md | 11 +++++-----
run_rust_emacs_tests.sh | 52 ----------------------------------------------
3 files changed, 9 insertions(+), 58 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 758a861..1c78413 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -28,5 +28,7 @@ jobs:
version: ${{ matrix.emacs_version }}
- uses: actions/checkout@v1
+
- name: Run tests
- run: './run_rust_emacs_tests.sh'
+ run: |
+ make test
diff --git a/README.md b/README.md
index e2b3a6c..5cdb229 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,7 @@ mode for integration with Cargo, Rust's package manager.
[cargo-mode](https://github.com/ayrat555/cargo-mode) is an Emacs minor mode
which allows to dynamically select a Cargo command. The reasons behind this
package can be found in [the
post](https://www.badykov.com/emacs/2021/05/29/emacs-cargo-mode/).
## Rustic
-[rustic](https://github.com/brotzeit/rustic) is a fork of rust-mode,
+[rustic](https://github.com/brotzeit/rustic) is based on rust-mode,
extending it with other features such as integration with LSP and with
flycheck.
@@ -157,7 +157,8 @@ extending it with other features such as integration with
LSP and with flycheck.
## Tests
-The file `rust-mode-tests.el` contains tests that can be run via
-[ERT](http://www.gnu.org/software/emacs/manual/html_node/ert/index.html).
-You can use `run_rust_emacs_tests.sh` to run them in batch mode, if
-you set the environment variable EMACS to a program that runs emacs.
+Run elisp tests:
+
+``` bash
+make test
+```
diff --git a/run_rust_emacs_tests.sh b/run_rust_emacs_tests.sh
deleted file mode 100755
index 600ad4d..0000000
--- a/run_rust_emacs_tests.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-#
-# This runs the test for emacs rust-mode.
-# Either $EMACS must be set, or it must be possible to find emacs via PATH.
-
-if [ -z "$EMACS" ]; then
- EMACS=emacs
-fi
-
-$EMACS --batch || {
- echo "You must set EMACS to a program that runs emacs."
- exit 1
-}
-
-$( $EMACS -batch > /dev/null 2>&1 ) || {
- echo "Your emacs command ($EMACS) does not run properly."
- exit 2
-};
-
-$( $EMACS -batch --eval "(require 'ert)" > /dev/null 2>&1 ) || {
- echo 'You must install the `ert` dependency; see README.md'
- exit 3
-};
-
-warnings="$( $EMACS -Q -batch -f batch-byte-compile rust-mode.el 2>&1 | grep
-v '^Wrote ' )"
-if [ -n "$warnings" ]; then
- echo "Byte-compilation failed:"
- echo "$warnings"
- exit 4
-else
- echo "Byte-compilation passed."
-fi
-
-warnings="$( $EMACS -Q -batch -l rust-mode.el -f batch-byte-compile
rust-mode-tests.el 2>&1 | grep -v '^Wrote ' )"
-if [ -n "$warnings" ]; then
- echo "Byte-compilation failed:"
- echo "$warnings"
- exit 4
-else
- echo "Byte-compilation of test file passed."
-fi
-
-$EMACS -batch -l rust-mode.el -l rust-mode-tests.el -f
ert-run-tests-batch-and-exit