diff --git a/shared/tools/checkbtf b/shared/tools/checkbtf deleted file mode 100755 index 9e1d4e40..00000000 --- a/shared/tools/checkbtf +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh - -# Get our hands on basedir -LOCAL1=${PWD} -cd `dirname $0` -cd .. -LOCAL2=${PWD} -cd ${LOCAL1} - -if [ $# -ne 1 ]; then - echo "Usage: checkbtf " - exit 1 -elif [ ! -r $1 ]; then - echo "Oops: $1 not found or not readable." - exit 1 -else - ${LOCAL2}/tools/checkxml btf $1 - swipl -q -f ${LOCAL2}/prolog/cli/checkbtf.pro -- $1 -fi diff --git a/shared/tools/checkxml b/shared/tools/checkxml deleted file mode 100755 index 7f9b5072..00000000 --- a/shared/tools/checkxml +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Get our hands on basedir -LOCAL1=${PWD} -cd `dirname $0` -cd ../.. -SLPS=${PWD} -cd ${LOCAL1} - -if [ $# -ne 2 ]; then - echo "Usage: checkxml " - exit 1 -elif [ ! -r $2 ]; then - echo "Oops: $2 not found or not readable." - exit 1 -elif [ ! -r ${SLPS}/shared/xsd/$1.xsd ]; then - echo "Oops: schema for $1 not found or not readable." - exit 1 -else - /usr/local/bin/xmllint --noout --schema ${SLPS}/shared/xsd/$1.xsd $2 -fi diff --git a/topics/comparison/Makefile b/topics/comparison/Makefile index e12f4f4e..a1b37944 100644 --- a/topics/comparison/Makefile +++ b/topics/comparison/Makefile @@ -1,5 +1,5 @@ test: - ls -1 tests/*.bgf | xargs -n1 ../../shared/tools/checkxml bgf + ls -1 tests/*.bgf | xargs -n1 ../../shared/tools/validate bgf ../../shared/tools/gdt tests/foobar.pretty.bgf tests/foobar.ugly.bgf ! ../../shared/tools/gdt tests/foobar.pretty.bgf tests/foobar.term.bgf ../../shared/tools/gdt tests/foo.b.a.r.bgf tests/foo.b.r.a.bgf diff --git a/topics/convergence/mbgf/tests/m1 b/topics/convergence/mbgf/tests/m1 index 6d57b9f1..d1300100 100755 --- a/topics/convergence/mbgf/tests/m1 +++ b/topics/convergence/mbgf/tests/m1 @@ -3,7 +3,7 @@ # m1 file.mbgf one two # $0 $1 $2 $3 rm -f tmp.xbgf tmp1.bgf -../../tri/mbgf2xbgf.py $1 $2 $3 tmp.xbgf +../mbgf2xbgf.py $1 $2 $3 tmp.xbgf xbgf tmp.xbgf `xpath $1 'mbgf:sequence/sources/src[@name="'$2'"]/text()' 2> /dev/null` tmp1.bgf gdt tmp1.bgf `xpath $1 'mbgf:sequence/sources/src[@name="'$3'"]/text()' 2> /dev/null` || exit -1 rm -f tmp.xbgf tmp1.bgf diff --git a/topics/convergence/mbgf/tests/testperform b/topics/convergence/mbgf/tests/testperform index bfceab87..0297ba9d 100755 --- a/topics/convergence/mbgf/tests/testperform +++ b/topics/convergence/mbgf/tests/testperform @@ -7,13 +7,3 @@ echo [Test MBGF] `basename $1 .mbgf` ./m1 $1 b c ./m1 $1 c a ./m1 $1 c b - -# -# -# -# rm -f `basename $1 .xbgf`.log -# touch `basename $1 .xbgf`.log -# ../../../../shared/tools/checkxml bgf `basename $1 .xbgf`.bgf || exit -1 -# ../../../../shared/tools/checkxml xbgf `basename $1 .xbgf`.xbgf || exit -1 -# ../../../../shared/tools/xbgf `basename $1 .xbgf`.xbgf `basename $1 .xbgf`.bgf `basename $1 .xbgf`.out || exit -1 -# ../../../../shared/tools/gdt `basename $1 .xbgf`.out `basename $1 .xbgf`.baseline || exit -1 diff --git a/topics/mutation/subgrammar/testperform b/topics/mutation/subgrammar/testperform index 8a743498..19507470 100755 --- a/topics/mutation/subgrammar/testperform +++ b/topics/mutation/subgrammar/testperform @@ -2,5 +2,5 @@ echo [Test Case] $1 ./subgrammar.py fl.bgf $1 fl.$1.bgf || exit -1 -../../../shared/tools/checkxml bgf fl.$1.bgf || exit -1 +../../../shared/tools/validate bgf fl.$1.bgf || exit -1 ../../../shared/tools/gdt fl.$1.bgf tests/$1.baseline.bgf || exit -1 diff --git a/topics/transformation/update/Makefile b/topics/transformation/update/Makefile index 502497d3..c7c52def 100644 --- a/topics/transformation/update/Makefile +++ b/topics/transformation/update/Makefile @@ -2,6 +2,11 @@ all: make build make test +check: + ls -1 tests/*/*.xbgf | xargs -n1 ../../../shared/tools/validate xbgf + ls -1 tests/*/*.bgf | xargs -n1 ../../../shared/tools/validate bgf + ls -1 tests/*/*.cbgf | xargs -n1 ../../../shared/tools/validate cbgf + build: cp ../../convergence/xbgf/fl/snapshot/rascal.bgf tests/bad-f/g1.bgf cp ../../convergence/xbgf/fl/snapshot/rascal.bgf tests/bad-d/g1.bgf @@ -10,14 +15,14 @@ build: cp ../../convergence/xbgf/fl/snapshot/rascal.bgf tests/incompatible/g1.bgf test: - ./testperform bad-f || echo "Ok" - ./testperform bad-d || echo "Ok" - ./testperform independent || echo "Ok" - ./testperform input || echo "Ok" - ./testperform incompatible || echo "Ok" + ./testperform bad-f + ./testperform bad-d + ./testperform independent + ./testperform input + ./testperform incompatible quiet: - make test 2> /dev/null | grep OUTCOME + make test | grep OUTCOME clean: rm -f tests/*/g?.bgf tests/*/*.cbgf tests/*/d-1*.xbgf diff --git a/topics/transformation/update/testperform b/topics/transformation/update/testperform index 10f67a64..095220f1 100755 --- a/topics/transformation/update/testperform +++ b/topics/transformation/update/testperform @@ -1,29 +1,26 @@ #!/bin/sh echo [Test Update] $1 -../../../shared/tools/checkxml xbgf tests/$1/f.xbgf || exit -1 -../../../shared/tools/checkxml xbgf tests/$1/d.xbgf || exit -1 -../../../shared/tools/checkxml bgf tests/$1/g1.bgf || exit -1 # let's try f of G1 ../../../shared/tools/xbgf tests/$1/f.xbgf tests/$1/g1.bgf tests/$1/g2.bgf if [ $? -ne 0 ] then echo "OUTCOME for $1: Impossible output — bad f." - exit -1 + exit fi # let's try ∆ of G1 ../../../shared/tools/xbgf tests/$1/d.xbgf tests/$1/g1.bgf tests/$1/g3.bgf if [ $? -ne 0 ] then echo "OUTCOME for $1: Impossible output — incompatible ∆." - exit -1 + exit fi # let's try f of ∆ of G1 and ∆ of f of G1 ../../../shared/tools/xbgf tests/$1/f.xbgf tests/$1/g3.bgf tests/$1/g4.bgf && ../../../shared/tools/xbgf tests/$1/d.xbgf tests/$1/g2.bgf tests/$1/g5.bgf && gdt tests/$1/g4.bgf tests/$1/g5.bgf if [ $? -eq 0 ] then echo "OUTCOME for $1: f and ∆ are independent; any composition is valid." - exit -1 + exit fi # let's try f of ∆ of G1 and ∆ of f of G1 ../../../shared/tools/xbgf2cbgf tests/$1/d.xbgf tests/$1/d.cbgf tests/$1/g1.bgf @@ -33,6 +30,6 @@ fi if [ $? -eq 0 ] then echo "OUTCOME for $1: ∆ messes with input of f; a composition with reversed ∆ is valid." - exit -1 + exit fi echo "OUTCOME for $1: f and ∆ are incompatible." diff --git a/topics/transformation/xbgf/tests/testperform b/topics/transformation/xbgf/tests/testperform index e78e9b09..a478fdcb 100755 --- a/topics/transformation/xbgf/tests/testperform +++ b/topics/transformation/xbgf/tests/testperform @@ -3,7 +3,7 @@ echo [Test XBGF] `basename $1 .xbgf` rm -f `basename $1 .xbgf`.log touch `basename $1 .xbgf`.log -../../../../shared/tools/checkxml bgf `basename $1 .xbgf`.bgf || exit -1 -../../../../shared/tools/checkxml xbgf `basename $1 .xbgf`.xbgf || exit -1 +../../../../shared/tools/validate bgf `basename $1 .xbgf`.bgf || exit -1 +../../../../shared/tools/validate xbgf `basename $1 .xbgf`.xbgf || exit -1 ../../../../shared/tools/xbgf `basename $1 .xbgf`.xbgf `basename $1 .xbgf`.bgf `basename $1 .xbgf`.out || exit -1 ../../../../shared/tools/gdt `basename $1 .xbgf`.out `basename $1 .xbgf`.baseline || exit -1 diff --git a/topics/transformation/xbgf/tests/testthorough b/topics/transformation/xbgf/tests/testthorough index dce452cc..5881ae7f 100755 --- a/topics/transformation/xbgf/tests/testthorough +++ b/topics/transformation/xbgf/tests/testthorough @@ -3,8 +3,8 @@ echo [Test XBGF] `basename $1 .xbgf` rm -f `basename $1 .xbgf`.log touch `basename $1 .xbgf`.log -../../../../shared/tools/checkxml bgf `basename $1 .xbgf`.bgf >> `basename $1 .xbgf`.log 2>&1 || exit -1 -../../../../shared/tools/checkxml xbgf `basename $1 .xbgf`.xbgf >> `basename $1 .xbgf`.log 2>&1 || exit -1 +../../../../shared/tools/validate bgf `basename $1 .xbgf`.bgf >> `basename $1 .xbgf`.log 2>&1 || exit -1 +../../../../shared/tools/validate xbgf `basename $1 .xbgf`.xbgf >> `basename $1 .xbgf`.log 2>&1 || exit -1 ../../../../shared/tools/showbgf `basename $1 .xbgf`.bgf >> `basename $1 .xbgf`.log 2>&1 || exit -1 ../../../../shared/tools/showxbgf `basename $1 .xbgf`.xbgf >> `basename $1 .xbgf`.log 2>&1 || exit -1 ../../../../shared/tools/xbgf `basename $1 .xbgf`.xbgf `basename $1 .xbgf`.bgf `basename $1 .xbgf`.out >> `basename $1 .xbgf`.log 2>&1 || exit -1