diff src/testdir/Makefile @ 15430:d94901eeb762 v8.1.0723

patch 8.1.0723: cannot easily run specific test when in src/testdir commit https://github.com/vim/vim/commit/ec50401e1e1357a1340b3c92109fd4860e38a8ac Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 11 17:30:16 2019 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Jan 2019 17:45:05 +0100
parents ba1f0c06b4be
children b10ce9e77128
line wrap: on
line diff
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -23,7 +23,8 @@ REDIR_TEST_TO_NULL = --cmd 'au SwapExist
 default: nongui
 
 # The list of tests is common to all systems.
-# This defines NEW_TESTS, SCRIPTS_ALL, SCRIPTS_MORE* and SCRIPTS_GUI.
+# This defines NEW_TESTS, NEW_TESTS_RES, SCRIPTS_ALL, SCRIPTS_MORE* and
+# SCRIPTS_GUI.
 include Make_all.mak
 
 
@@ -50,10 +51,21 @@ report:
 		else echo ALL DONE; \
 		fi"
 
-$(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(VIMPROG)
+$(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(VIMPROG)
 
 # Must run test1 first to create small.vim.
-$(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(SCRIPTS_FIRST)
+$(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS_RES): $(SCRIPTS_FIRST)
+
+
+# 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_START = tiny.vim small.vim mbyte.vim mzscheme.vim test.ok benchmark.out
@@ -128,7 +140,7 @@ RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE)
 newtests: newtestssilent
 	@/bin/sh -c "if test -f messages && grep -q 'SKIPPED\|FAILED' messages; then cat messages; fi"
 
-newtestssilent: $(NEW_TESTS)
+newtestssilent: $(NEW_TESTS_RES)
 
 
 .vim.res: writevimcmd