Debian Codegraph @

src/testdir/Makefile

raw
1 #
2 # Makefile to run all tests for Fim (Vim-styled!)
3 #
4
5 BASE=../../
6 FIMPROG = $(BASE)/src/fim
7
8 # Uncomment this line for using valgrind.
9 # The output goes into a file "valgrind.$PID" (sorry, no test number).
10 # VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=valgrind.log
11
12 SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out test7.out test8.out test9.out test10.out test11.out test12.out test13.out test14.out test15.out test16.out test17.out test18.out test19.out test20.out test21.out test22.out
13
14 .SUFFIXES: .in .out
15
16 nongui: nolog $(SCRIPTS)
17 @echo
18 @cat test.log
19 @! grep FAILED test.log
20 @echo "[*] ALL DONE"
21
22
23 $(SCRIPTS): $(FIMPROG)
24
25 clean:
26 -rm -rf *.out *.failed *.rej *.orig test.log tiny.fim small.fim mbyte.fim test.ok X* valgrind.pid* fiminfo
27
28 .in.out:
29 -rm -rf $*.failed test.ok test.out X* fiminfo
30 cp $*.ok test.ok
31 # Sleep a moment to avoid that the xterm title is messed up
32 @-sleep .2
33 -$(VALGRIND) $(FIMPROG) -o dumb -c "quit;" -X -N --no-etc-fimrc-file --no-history -E $*.in $(BASE)/media/*jpg $(BASE)/media/fim.png $(BASE)/media/image.png > test.out
34 # -$(VALGRIND) $(FIMPROG) -u unix.fim -U NONE --noplugin -s dotest.in $*.in
35 @/bin/sh -c "if test -f test.out; then\
36 if diff $*.ok test.out; \
37 then mv -f test.out $*.out; \
38 else echo $* FAILED >>test.log; head -n 1 $*.in >>test.log; mv -f test.out $*.failed; \
39 fi \
40 else echo $* NO OUTPUT >>test.log; \
41 fi"
42 -rm -rf X* test.ok fiminfo
43
44 nolog:
45 -echo Test results: >test.log
46