Skip to content

Commit

Permalink
make view works again; annotated makefile
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@994 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Apr 4, 2011
1 parent b6af07e commit 18c8579
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
27 changes: 24 additions & 3 deletions topics/testing/gbtf/tests/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,27 +1,48 @@
build:

test:
# generate all test cases for all grammars
make $(patsubst %.bgf,%.test,$(wildcard *.bgf))

%.test:
# generate all test cases for one grammar
gbtf $*.bgf

show:
# pretty-print all generated test cases on the screen
make $(patsubst %.btf,%.show,$(wildcard *.btf))

%.show:
# pretty-print one test case on the screen
showt $*.btf

check:
ls -1 *.btf | xargs -n1 ../../../../../shared/tools/validate btf
# validate all generated test cases
xmllint --noout --schema ../../../../../shared/xsd/btf.xsd *.btf

view:
ls -1 *.bgf | xargs -n1 ./setview
# view statistics for all test sets
ls -1 *.bgf | xargs -n1 ../setview

ignore:
svn propedit svn:ignore .

convert:
# convert all generated test cases from tree form (BTF) to source code
make $(patsubst %.btf,%.convert,$(wildcard *.btf))

%.convert:
# convert one test case from tree form (BTF) to source code
../../../../../shared/tools/btf2src $*.btf $*.src

execute:
# run all test sets for which there is a wrapper
make $(patsubst %.run,%.execute,$(wildcard *.run))

%.execute:
# run all test cases in one test set with an existing wrapper
ls -1 $*.bgf.*.src | xargs -n1 ./$*.run

clean:
rm -f *~
rm -f *.btf

2 changes: 1 addition & 1 deletion topics/testing/gbtf/tests/setview
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

/bin/echo -n Test cases for `basename $1 .bgf`:
ls -1 $1.*.btf 2> /dev/null | wc -l
ls -1 $1-*.btf 2> /dev/null | wc -l

0 comments on commit 18c8579

Please sign in to comment.