Quote:
Originally Posted by Luridis
It seems to do a whole hell of a lot of it for someone not to have noticed. But, I'll do some research.
|
Frankly, a little research before posting might have been better. You might have asked "How to use Vim's test suite?", instead of why it is crap.
Unless you are simply determined to rant, maybe this will help you understand how it works.
First of all, note that the
make check build target is exactly that - a build target for make. As such, it works by invoking shell commands and in general writing the output of those commands to the shell, or as redirected by the make rules.
It is
NOT an interactive test suite application. So whether or not you think the output is garbage depends a lot on what your expectations were. What were you expecting it to do?
Looking at the makefile rules, it automates various operations with Vim by invoking a suite of scripts found in
.../src/testdir/testxx.in, and writes the results to similarly named
testxx.out files. You see the individual test results by looking into those
out files. Some of the tests include use of non-ascii characters (it is a test...) and some are intended to produce an error - that is the object of the test. Consequently it may indeed write garbage out! This from the
.../src/Makefile:
Code:
# Execute the test scripts. Run these after compiling Vim, before installing.
# This doesn't depend on $(VIMTARGET), because that won't work when configure
# wasn't run yet. Restart make to build it instead.
#
# This will produce a lot of garbage on your screen, including a few error
# messages. Don't worry about that.
# If there is a real error, there will be a difference between "testXX.out" and
# a "testXX.ok" file.
# If everything is alright, the final message will be "ALL DONE". If not you
# get "TEST FAILURE".
#
test check:
$(MAKE) -f Makefile $(VIMTARGET)
if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \
fi
-if test $(VIMTARGET) != vim -a ! -r vim; then \
ln -s $(VIMTARGET) vim; \
fi
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG)
$(MAKE) -f Makefile unittest
unittesttargets:
$(MAKE) -f Makefile $(UNITTEST_TARGETS)
unittest unittests: $(UNITTEST_TARGETS)
@for t in $(UNITTEST_TARGETS); do \
./$$t || exit 1; echo $$t passed; \
done
# Run individual test, assuming that Vim was already compiled.
test1 test2 test3 test4 test5 test6 test7 test8 test9 \
test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
So, please understand that the
check (aka
test) make targets produce their output as files, and what is written to the shell from which it is run is largely a by-product of the tests.
If this produces side effects that mangle your shell environment, entirely likely, simply run it inside a throw-away terminal window, or redirect the output to a file that you can browse after the fact...
Code:
make check 2>&1 >mycheckfile
In fairness, I quickly looked online for some extra guidance for using the make check target and did not find anything obviously useful. On the other hand, as said, it is a make target, so it should depend only on the user's knowledge of make in order to be used. If you are building it, there is the implicit assumption that you know how to read the target comments. That would be more useful than concluding that it is all just crap and obsolete, simply because you do not know how to use it.
Otherwise you might be better using your distro's Vim package and let them run the tests, or skipping the tests if they don't mean anything to you.