mirror of
https://github.com/neovim/neovim
synced 2025-07-18 02:01:46 +00:00
vim-patch:8.1.0723: cannot easily run specific test when in src/testdir
Problem: Cannot run specific test when in src/testdir the same was as in
the src directory.
Solution: Move build rule to src/testdir/Makefile.
ec50401e1e
Developer can omit '.res' suffix now.
TEST_FILE=test_syntax make oldtest
or
make -C src/nvim/testdir test_syntax
This commit is contained in:
2
Makefile
2
Makefile
@ -119,7 +119,7 @@ oldtest: | nvim build/runtime/doc/tags
|
|||||||
ifeq ($(strip $(TEST_FILE)),)
|
ifeq ($(strip $(TEST_FILE)),)
|
||||||
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES)
|
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES)
|
||||||
else
|
else
|
||||||
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" NEW_TESTS=$(TEST_FILE) SCRIPTS= $(MAKEOVERRIDES)
|
+$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" SCRIPTS= $(MAKEOVERRIDES) $(TEST_FILE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build/runtime/doc/tags helptags: | nvim
|
build/runtime/doc/tags helptags: | nvim
|
||||||
|
@ -48,7 +48,8 @@ NEW_TESTS_IGNORE := $(NEW_TESTS_IN_ALOT) $(NEW_TESTS_ALOT) \
|
|||||||
test_listlbr \
|
test_listlbr \
|
||||||
test_largefile \
|
test_largefile \
|
||||||
|
|
||||||
NEW_TESTS ?= $(addsuffix .res,$(sort $(filter-out $(NEW_TESTS_IGNORE),$(basename $(notdir $(wildcard test_*.vim))))) $(NEW_TESTS_ALOT))
|
NEW_TESTS ?= $(sort $(filter-out $(NEW_TESTS_IGNORE),$(basename $(notdir $(wildcard test_*.vim))))) $(NEW_TESTS_ALOT)
|
||||||
|
NEW_TESTS_RES ?= $(addsuffix .res,$(NEW_TESTS))
|
||||||
|
|
||||||
|
|
||||||
ifdef VALGRIND_GDB
|
ifdef VALGRIND_GDB
|
||||||
@ -112,6 +113,16 @@ fixff:
|
|||||||
-$(NVIM_PRG) $(NO_INITS) -u unix.vim "+argdo set ff=dos|upd" +q \
|
-$(NVIM_PRG) $(NO_INITS) -u unix.vim "+argdo set ff=dos|upd" +q \
|
||||||
dotest.in
|
dotest.in
|
||||||
|
|
||||||
|
# Execute an individual new style test, e.g.:
|
||||||
|
# make test_largefile
|
||||||
|
$(NEW_TESTS):
|
||||||
|
rm -f $@.res test.log messages
|
||||||
|
$(MAKE) -f Makefile $@.res
|
||||||
|
@if test -f test.log; then \
|
||||||
|
cat test.log; \
|
||||||
|
fi
|
||||||
|
cat messages
|
||||||
|
|
||||||
RM_ON_RUN := test.out X* viminfo
|
RM_ON_RUN := test.out X* viminfo
|
||||||
RM_ON_START := test.ok
|
RM_ON_START := test.ok
|
||||||
RUN_VIM := $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin -s dotest.in
|
RUN_VIM := $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin -s dotest.in
|
||||||
@ -172,7 +183,7 @@ newtests: newtestssilent
|
|||||||
cat messages && cat test.log; \
|
cat messages && cat test.log; \
|
||||||
fi"
|
fi"
|
||||||
|
|
||||||
newtestssilent: $(NEW_TESTS)
|
newtestssilent: $(NEW_TESTS_RES)
|
||||||
|
|
||||||
%.res: %.vim .gdbinit
|
%.res: %.vim .gdbinit
|
||||||
@echo "[OLDTEST] Running" $*
|
@echo "[OLDTEST] Running" $*
|
||||||
|
Reference in New Issue
Block a user