-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better testing: failing immediately after the unsuccessful test case;
the subgrammar handy script git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@891 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
1 parent
f874a2b
commit 2da639c
Showing
3 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
LOCAL=${PWD} | ||
cd `dirname $0` | ||
cd ../.. | ||
SLPS=${PWD} | ||
cd ${LOCAL} | ||
|
||
if [ $# -ne 3 ]; then | ||
echo "This tool extracts a portion of a grammar that starts at a given root nonterminal and includes all referenced nonterminals as well." | ||
echo "Usage: subgrammar <bgf-input> <new-root> <bgf-output>" | ||
exit 1 | ||
elif [ ! -r $1 ]; then | ||
echo "Oops: $1 not found or not readable." | ||
exit 1 | ||
fi | ||
|
||
${SLPS}/topics/presentation/subgrammar/subgrammar.py $1 $2 $3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
test: | ||
../../../shared/tools/xsd2bgf ../../fl/xsd/fl.xsd fl.bgf | ||
echo 'Executing test cases...' | ||
ls -1 tests/ | xargs -n1 -I _ basename _ .baseline.bgf | xargs -n1 -I _ ./subgrammar.py fl.bgf _ fl._.bgf | ||
echo 'Syntax checking test results...' | ||
ls -1 *.bgf | xargs -n1 checkxml bgf | ||
echo 'Validating test results...' | ||
ls -1 tests/ | xargs -n1 -I _ basename _ .baseline.bgf | xargs -n1 -I _ ../../../shared/tools/gdt fl._.bgf tests/_.baseline.bgf | ||
ls -1 tests/ | xargs -n1 -I _ basename _ .baseline.bgf | xargs -n1 ./testperform | ||
|
||
clean: | ||
rm -f *.bgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
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/gdt fl.$1.bgf tests/$1.baseline.bgf || exit -1 |