aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-12-02 17:18:37 +0100
committerGitHub <noreply@github.com>2019-12-02 17:18:37 +0100
commit0b7a7b23cce8c9eeeaac1a38190fd49e1033625c (patch)
treedc5383dc3ebc9d10f493eda7effac935a6f86ff5 /src
parent7d66a02b888e4055c62e6f477bc36b6ce760336b (diff)
downloadrneovim-0b7a7b23cce8c9eeeaac1a38190fd49e1033625c.tar.gz
rneovim-0b7a7b23cce8c9eeeaac1a38190fd49e1033625c.tar.bz2
rneovim-0b7a7b23cce8c9eeeaac1a38190fd49e1033625c.zip
oldtest: support for running by filename (#11473)
Follow-up to 8969efca8 (Vim patch 8.1.0723) NOTE: This changes the main entrypoint for running single oldtest files to not use/require the ".res" extension anymore. But it is handled for B/C. Adds a phony rule to run oldtest by filename. Not going through "$(MAKE)" avoids GNUmakefile being used then (which I use for WIP things), and it seems like SINGLE_MAKE should be used anyway probably.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index 1e9031e098..6bf070a7e2 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -34,22 +34,23 @@ SCRIPTS ?= $(SCRIPTS_DEFAULT)
# Tests using runtest.vim.
NEW_TESTS_ALOT := test_alot_utf8 test_alot
-NEW_TESTS_IN_ALOT := $(shell sed '/^source/ s/^source //;s/\.vim$$//' test_alot*.vim)
+NEW_TESTS_IN_ALOT := $(shell sed -n '/^source/ s/^source //; s/\.vim$$//p' $(addsuffix .vim,$(NEW_TESTS_ALOT)))
+NEW_TESTS_IN_ALOT_LATIN := $(shell sed -n '/^source/ s/^source //; s/\.vim$$//p' test_alot_latin.vim)
# Ignored tests.
# test_alot_latin: Nvim does not allow setting encoding.
# test_autochdir: ported to Lua, but kept for easier merging.
# test_eval_func: used as include in old-style test (test_eval.in).
# test_listlbr: Nvim does not allow setting encoding.
# test_largefile: uses too much resources to run on CI.
-NEW_TESTS_IGNORE := $(NEW_TESTS_IN_ALOT) $(NEW_TESTS_ALOT) \
- test_alot_latin \
+NEW_TESTS_IGNORE := \
+ test_alot_latin $(NEW_TESTS_IN_ALOT_LATIN) \
test_autochdir \
test_eval_func \
test_listlbr \
test_largefile \
-NEW_TESTS ?= $(sort $(filter-out $(NEW_TESTS_IGNORE),$(basename $(notdir $(wildcard test_*.vim))))) $(NEW_TESTS_ALOT)
-NEW_TESTS_RES ?= $(addsuffix .res,$(NEW_TESTS))
+NEW_TESTS := $(sort $(basename $(notdir $(wildcard test_*.vim))))
+NEW_TESTS_RES := $(addsuffix .res,$(filter-out $(NEW_TESTS_ALOT) $(NEW_TESTS_IN_ALOT) $(NEW_TESTS_IGNORE),$(NEW_TESTS)) $(NEW_TESTS_ALOT))
ifdef VALGRIND_GDB
@@ -114,7 +115,7 @@ fixff:
dotest.in
# Execute an individual new style test, e.g.:
-# make test_largefile
+# make test_largefile
$(NEW_TESTS):
rm -f $@.res test.log messages
@MAKEFLAGS=--no-print-directory $(MAKE) -f Makefile $@.res