Skip to content

Commit

Permalink
consistent validation with one script
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@185 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Aug 19, 2008
1 parent 267a260 commit 784f4bd
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 32 deletions.
1 change: 1 addition & 0 deletions topics/extraction/dcg2bgf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build:
test:
make clean-tests
../../../shared/tools/dcg2bgf ${source} ${target}.bgf
../../../shared/tools/checkxml bgf ${target}.bgf
../../../shared/tools/showbgf ${target}.bgf > ${target}.out
diff ${target}.out ${target}.baseline

Expand Down
1 change: 1 addition & 0 deletions topics/extraction/java2bgf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build:
test:
make clean-tests
../../../shared/tools/java2bgf ${basedir} ${package} ${target}.bgf
../../../shared/tools/checkxml bgf ${target}.bgf
../../../shared/tools/showbgf ${target}.bgf > ${target}.out
diff ${target}.out ${target}.baseline

Expand Down
8 changes: 2 additions & 6 deletions topics/extraction/ldf2bgf/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
ldf2bgf = ../../../shared/tools/ldf2bgf
validator = ../../../download/msv/msv.jar
bgfxsd = ../../../shared/xsd/bgf.xsd

all:
make clean
make test

build:

test:
find ../../.. -name "*.ldf" | xargs -n1 ${ldf2bgf}
ls -1 *.bgf | xargs java -jar ${validator} ${bgfxsd}
find ../../.. -name "*.ldf" | xargs -n1 ../../../shared/tools/ldf2bgf
ls -1 *.bgf | xargs -n1 ../../../shared/tools/checkxml bgf

clean:
rm -f *.bgf
3 changes: 1 addition & 2 deletions topics/extraction/sdf2bgf/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
metaenv = `which asfe | xargs dirname`/..
sdfl = ${metaenv}/share/sdf-library/library
asfl = ${metaenv}/share/asf-library/library
schemata = ../../../shared/xsd
flsdf = ../../fl/asfsdf/syntax/FL.sdf

all: build test
Expand Down Expand Up @@ -44,7 +43,7 @@ test:
@cat ${flsdf} >> FL.trm
@echo ")" >>FL.trm
cat FL.trm | sglr -p Main.tbl | asfe -e Main.eqs | unparsePT > fl.bgf
xmllint --noout --schema ${schemata}/bgf.xsd fl.bgf
../../../shared/tools/checkxml bgf fl.bgf

clean:
rm -f reduct.out
Expand Down
4 changes: 2 additions & 2 deletions topics/extraction/xml2btf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bgf = ../../../shared/xsd/bgf.xsd
xbgf = ../../../shared/xsd/xbgf.xsd
btf = ../../../shared/xsd/btf.xsd
apps = ../../transformation/xbgf/apps
validator = ../../../download/msv/msv.jar
validator = ../../../shared/tools/checkxml
xml2btf = ../../../shared/tools/xml2btf

build:
Expand All @@ -17,7 +17,7 @@ test:
make check

check:
ls tests/*.btf | xargs java -jar ${validator} ${btf}
ls -1 tests/*.btf | xargs -n1 ${validator} btf

clean:
make clean-tests
Expand Down
18 changes: 12 additions & 6 deletions topics/extraction/xsd2bgf/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
fl = ../../fl/xsd/fl.xsd
bgf = ../../../shared/xsd/bgf.xsd
xbgf = ../../../shared/xsd/xbgf.xsd
xsd2bgf = ../../../shared/tools/xsd2bgf
showbgf = ../../../shared/tools/showbgf
validate = ../../../shared/tools/checkxml

build:

test:
make clean-tests
# Test fl sample
../../../shared/tools/xsd2bgf ${fl} tests/fl.bgf
../../../shared/tools/showbgf tests/fl.bgf > tests/fl.out
${xsd2bgf} ${fl} tests/fl.bgf
${validate} bgf tests/fl.bgf
${showbgf} tests/fl.bgf > tests/fl.out
diff tests/fl.out tests/fl.baseline
# Test bgf
../../../shared/tools/xsd2bgf ${bgf} tests/bgf.bgf
../../../shared/tools/showbgf tests/bgf.bgf > tests/bgf.out
${xsd2bgf} ${bgf} tests/bgf.bgf
${validate} bgf tests/bgf.bgf
${showbgf} tests/bgf.bgf > tests/bgf.out
diff tests/bgf.out tests/bgf.baseline
# Test xbgf
../../../shared/tools/xsd2bgf ${xbgf} tests/xbgf.bgf
../../../shared/tools/showbgf tests/xbgf.bgf > tests/xbgf.out
${xsd2bgf} ${xbgf} tests/xbgf.bgf
${validate} bgf tests/xbgf.bgf
${showbgf} tests/xbgf.bgf > tests/xbgf.out
diff tests/xbgf.out tests/xbgf.baseline

clean:
Expand Down
26 changes: 10 additions & 16 deletions topics/extraction/xsd2ldf/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
input = ../../../shared/xsd/xbgf.xsd
extracted = tests/xbgf.bgf
outputldf = tests/xbgf.ldf
outputpdf = tests/xbgf.pdf
outputhtm = tests/xbgf.html
templfd = tests/ldf.temp
validator = ../../../download/msv/msv.jar
output = tests/xbgf

build:

all: extract
sh ../../../shared/tools/ldf2html ${outputldf} ${outputhtm}
sh ../../../shared/tools/ldf2pdf ${outputldf} ${outputpdf} 2> /dev/null
../../../shared/tools/ldf2html ${output}.ldf ${output}.html
../../../shared/tools/ldf2pdf ${output}.ldf ${output}.pdf 2> /dev/null

extract:
sh ../../../shared/tools/xsd2bgf ${input} ${extracted}
python ldfgen.py ${input} ${extracted} ${outputldf}
xsltproc ../../../shared/xsl/ldf2ldf_tail.xslt ${outputldf} > ${templfd}
xsltproc ../../../shared/xsl/ldf2ldf_lift.xslt ${templfd} > ${outputldf}
@rm -f ${templfd}
../../../shared/tools/xsd2bgf ${input} ${output}.bgf
python ldfgen.py ${input} ${output}.bgf ${output}.1.ldf
xsltproc ../../../shared/xsl/ldf2ldf_tail.xslt ${output}.1.ldf > ${output}.2.ldf
xsltproc ../../../shared/xsl/ldf2ldf_lift.xslt ${output}.2.ldf > ${output}.ldf

test: extract
sh ../../../shared/tools/showbgf ${extracted}
java -jar ${validator} ../../../shared/xsd/bgf.xsd ${extracted}
java -jar ${validator} ../../../shared/xsd/ldf.xsd ${outputldf}
../../../shared/tools/showbgf ${output}.bgf > ${output}.out
../../../shared/tools/checkxml bgf ${output}.bgf
../../../shared/tools/checkxml ldf ${output}.ldf

clean:
rm -f tests/*

0 comments on commit 784f4bd

Please sign in to comment.