Skip to content

Commit

Permalink
[Template merge] test/ reorg scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed May 15, 2024
1 parent 8a991e2 commit 2bfb12d
Show file tree
Hide file tree
Showing 31 changed files with 134 additions and 118 deletions.
32 changes: 16 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@
/src/fst/phonetics/tests/tests/*.sh
/test/run-morph-tester.sh
/test/run-yaml-testcases.sh
/test/src/morphology/all*.txt
/test/src/morphology/analysed*.txt
/test/src/morphology/filtered*
/test/src/morphology/generate-*-lemmas.sh
/test/src/morphology/generated*.txt
/test/src/morphology/missing_*.txt
/test/src/phonology/negative-*.txt
/test/src/phonology/hfst-twolc-error-messages.txt
/test/src/phonology/pair-*.txt
/test/src/phonology/pair-test-*.sh
/test/src/phonology/positive-*.txt
/test/src/phonology/twolcscript.sh
/test/tools/spellcheckers/fstbased/desktop/hfst/*.txt
/test/tools/spellcheckers/fstbased/desktop/hfst/accept-all-lemmas.sh
/test/tools/spellcheckers/fstbased/desktop/hfst/test-zhfst-basic-sugg-speed.sh
/test/tools/spellcheckers/test-zhfst-file.sh
/src/fst/morphology/test/all*.txt
/src/fst/morphology/test/analysed*.txt
/src/fst/morphology/test/filtered*
/src/fst/morphology/test/generate-*-lemmas.sh
/src/fst/morphology/test/generated*.txt
/src/fst/morphology/test/missing_*.txt
/src/fst/morphology/test/phonology/negative-*.txt
/src/fst/morphology/test/phonology/hfst-twolc-error-messages.txt
/src/fst/morphology/test/phonology/pair-*.txt
/src/fst/morphology/test/phonology/pair-test-*.sh
/src/fst/morphology/test/phonology/positive-*.txt
/src/fst/morphology/test/phonology/twolcscript.sh
/tools/spellcheckers/test/fstbased/desktop/hfst/*.txt
/tools/spellcheckers/test/fstbased/desktop/hfst/accept-all-lemmas.sh
/tools/spellcheckers/test/fstbased/desktop/hfst/test-zhfst-basic-sugg-speed.sh
/tools/spellcheckers/test/test-zhfst-file.sh
/tools/analysers/*.cg3
/tools/analysers/*.pmhfst
/tools/analysers/*.zcheck
Expand Down
70 changes: 34 additions & 36 deletions m4/giella-config-files.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,19 @@ AC_CONFIG_FILES([Makefile \
src/fst/syllabification/Makefile \
src/fst/Makefile \
src/fst/morphology/Makefile \
src/fst/morphology/test/Makefile \
src/fst/morphology/test/phonology/Makefile \
src/fst/orthography/Makefile \
src/fst/orthography/test/Makefile \
src/fst/phonetics/Makefile \
src/fst/phonetics/tests/Makefile \
src/fst/test/Makefile \
src/cg3/Makefile \
src/cg3/test/Makefile \
src/fst/tagsets/Makefile \
src/fst/transcriptions/Makefile \
docs/Makefile \
test/Makefile \
test/tools/Makefile \
test/tools/hyphenators/Makefile \
test/tools/hyphenators/fstbased/Makefile \
test/tools/hyphenators/patternbased/Makefile \
test/tools/mt/Makefile \
test/tools/mt/apertium/Makefile \
test/tools/spellcheckers/Makefile \
test/tools/spellcheckers/fstbased/Makefile \
test/tools/spellcheckers/fstbased/desktop/Makefile \
test/tools/spellcheckers/fstbased/desktop/hfst/Makefile \
test/tools/spellcheckers/fstbased/mobile/Makefile \
test/src/Makefile \
test/src/morphology/Makefile \
test/src/orthography/Makefile \
test/src/phonology/Makefile \
test/src/syntax/Makefile \
tools/Makefile \
tools/analysers/Makefile \
tools/analysers/pipespec.xml \
Expand All @@ -45,11 +34,15 @@ AC_CONFIG_FILES([Makefile \
tools/grammarcheckers/tests/Makefile \
tools/hyphenators/Makefile \
tools/hyphenators/filters/Makefile \
tools/hyphenators/test/Makefile \
tools/hyphenators/test/fstbased/Makefile \
tools/hyphenators/test/patternbased/Makefile \
tools/mt/Makefile \
tools/mt/filters/Makefile \
tools/mt/apertium/Makefile \
tools/mt/apertium/filters/Makefile \
tools/mt/apertium/tagsets/Makefile \
tools/mt/apertium/test/Makefile \
tools/mt/cgbased/Makefile \
tools/tokenisers/Makefile \
tools/tokenisers/filters/Makefile \
Expand All @@ -60,6 +53,11 @@ AC_CONFIG_FILES([Makefile \
tools/spellcheckers/index.mobile.xml \
tools/spellcheckers/filters/Makefile \
tools/spellcheckers/neural/Makefile \
tools/spellcheckers/test/Makefile \
tools/spellcheckers/test/fstbased/Makefile \
tools/spellcheckers/test/fstbased/desktop/Makefile \
tools/spellcheckers/test/fstbased/desktop/hfst/Makefile \
tools/spellcheckers/test/fstbased/mobile/Makefile \
tools/spellcheckers/weights/Makefile \
tools/tts/Makefile \
tools/tts/pipespec.xml \
Expand All @@ -69,33 +67,33 @@ AC_CONFIG_FILES([Makefile \
# Spell checker tests, all languages:
AC_CONFIG_FILES([src/fst/phonetics/tests/run_tests.sh],
[chmod a+x src/fst/phonetics/tests/run_tests.sh])
AC_CONFIG_FILES([test/tools/spellcheckers/test-zhfst-file.sh], \
[chmod a+x test/tools/spellcheckers/test-zhfst-file.sh])
AC_CONFIG_FILES([test/tools/spellcheckers/fstbased/desktop/hfst/test-zhfst-basic-sugg-speed.sh], \
[chmod a+x test/tools/spellcheckers/fstbased/desktop/hfst/test-zhfst-basic-sugg-speed.sh])
AC_CONFIG_FILES([tools/spellcheckers/test/test-zhfst-file.sh], \
[chmod a+x tools/spellcheckers/test/test-zhfst-file.sh])
AC_CONFIG_FILES([tools/spellcheckers/test/fstbased/desktop/hfst/test-zhfst-basic-sugg-speed.sh], \
[chmod a+x tools/spellcheckers/test/fstbased/desktop/hfst/test-zhfst-basic-sugg-speed.sh])
AC_CONFIG_FILES([test/run-yaml-testcases.sh], \
[chmod a+x test/run-yaml-testcases.sh])
AC_CONFIG_FILES([test/run-morph-tester.sh], \
[chmod a+x test/run-morph-tester.sh])
# Phonology tests, all languages:
AC_CONFIG_FILES([test/src/phonology/pair-test-positive.sh], \
[chmod a+x test/src/phonology/pair-test-positive.sh])
AC_CONFIG_FILES([test/src/phonology/pair-test-negative.sh], \
[chmod a+x test/src/phonology/pair-test-negative.sh])
AC_CONFIG_FILES([test/src/phonology/pair-test-hfst.sh], \
[chmod a+x test/src/phonology/pair-test-hfst.sh])
AC_CONFIG_FILES([src/fst/morphology/test/phonology/pair-test-positive.sh], \
[chmod a+x src/fst/morphology/test/phonology/pair-test-positive.sh])
AC_CONFIG_FILES([src/fst/morphology/test/phonology/pair-test-negative.sh], \
[chmod a+x src/fst/morphology/test/phonology/pair-test-negative.sh])
AC_CONFIG_FILES([src/fst/morphology/test/phonology/pair-test-hfst.sh], \
[chmod a+x src/fst/morphology/test/phonology/pair-test-hfst.sh])
# Lemma generation tests, all languages:
AC_CONFIG_FILES([test/src/morphology/generate-adjective-lemmas.sh], \
[chmod a+x test/src/morphology/generate-adjective-lemmas.sh])
AC_CONFIG_FILES([test/src/morphology/generate-noun-lemmas.sh], \
[chmod a+x test/src/morphology/generate-noun-lemmas.sh])
AC_CONFIG_FILES([test/src/morphology/generate-propernoun-lemmas.sh], \
[chmod a+x test/src/morphology/generate-propernoun-lemmas.sh])
AC_CONFIG_FILES([test/src/morphology/generate-verb-lemmas.sh], \
[chmod a+x test/src/morphology/generate-verb-lemmas.sh])
AC_CONFIG_FILES([src/fst/morphology/test/generate-adjective-lemmas.sh], \
[chmod a+x src/fst/morphology/test/generate-adjective-lemmas.sh])
AC_CONFIG_FILES([src/fst/morphology/test/generate-noun-lemmas.sh], \
[chmod a+x src/fst/morphology/test/generate-noun-lemmas.sh])
AC_CONFIG_FILES([src/fst/morphology/test/generate-propernoun-lemmas.sh], \
[chmod a+x src/fst/morphology/test/generate-propernoun-lemmas.sh])
AC_CONFIG_FILES([src/fst/morphology/test/generate-verb-lemmas.sh], \
[chmod a+x src/fst/morphology/test/generate-verb-lemmas.sh])
# Lemma acceptance test for spellers, all languages:
AC_CONFIG_FILES([test/tools/spellcheckers/fstbased/desktop/hfst/accept-all-lemmas.sh], \
[chmod a+x test/tools/spellcheckers/fstbased/desktop/hfst/accept-all-lemmas.sh])
AC_CONFIG_FILES([tools/spellcheckers/test/fstbased/desktop/hfst/accept-all-lemmas.sh], \
[chmod a+x tools/spellcheckers/test/fstbased/desktop/hfst/accept-all-lemmas.sh])
# Shorthand shell scripts instead of the old-type aliases - all languages:
AC_CONFIG_FILES([tools/shellscripts/uizh-gt.sh], \
[chmod a+x tools/shellscripts/uizh-gt.sh])
Expand Down
3 changes: 3 additions & 0 deletions src/cg3/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
## Copyright: Sámediggi/Divvun/UiT
## Licence: GPL v3+

# build before test
SUBDIRS=. test

##################################################################
#### BEGIN: Add local processing instructions BELOW this line ####
##################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/fst/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Licence: GPL v3+

# always build . last here, and tagsets have to be built after morphology
SUBDIRS = morphology filters phonetics syllabification orthography transcriptions tagsets .
SUBDIRS = morphology filters phonetics syllabification orthography transcriptions tagsets . test

####### Automake targets: ########

Expand Down
3 changes: 3 additions & 0 deletions src/fst/morphology/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.

# build before test
SUBDIRS=. test

# Add language-specific flags for hfst-lexc compilation here:
if HAVE_SHARED_COMMON
HFST_LEXC_LOCAL_FLAGS= # --Werror # uncomment if lexc is good enough
Expand Down
2 changes: 2 additions & 0 deletions src/fst/morphology/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
## Copyright: Sámediggi/Divvun/UiT
## Licence: GPL v3+

SUBDIRS=phonology

TESTS_ENVIRONMENT = export GIELLA_CORE=$(GIELLA_CORE);

######## Test targets: ###########
Expand Down
8 changes: 4 additions & 4 deletions src/fst/morphology/test/generate-adjective-lemmas.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
###### Variables: #######
POS=adjectives
### in ###
source_file=${srcdir}/../../../src/fst/morphology/stems/${POS}.lexc
generator_file=./../../../src/fst/generator-gt-norm
analyser_file=./../../../src/fst/analyser-gt-norm
source_file=${srcdir}/../stems/${POS}.lexc
generator_file=./../../generator-gt-norm
analyser_file=./../../analyser-gt-norm

### out ###
# Temporary files:
Expand Down Expand Up @@ -144,7 +144,7 @@ if [ "$Fail" = "1" ]; then
fi

if [ $transducer_found -eq 0 ]; then
echo ERROR: No transducer found
echo ERROR: No transducer found $analyser_file $generator_file
exit 77
fi

Expand Down
8 changes: 4 additions & 4 deletions src/fst/morphology/test/generate-noun-lemmas.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
###### Variables: #######
POS=nouns
### in ###
source_file=${srcdir}/../../../src/fst/morphology/stems/${POS}.lexc
generator_file=./../../../src/fst/generator-gt-norm
analyser_file=./../../../src/fst/analyser-gt-norm
source_file=${srcdir}/../stems/${POS}.lexc
generator_file=./../../generator-gt-norm
analyser_file=./../../analyser-gt-norm

### out ###
# Temporary files:
Expand Down Expand Up @@ -148,7 +148,7 @@ if [ "$Fail" = "1" ]; then
fi

if [ $transducer_found -eq 0 ]; then
echo ERROR: No transducer found
echo ERROR: No transducer found $analyser_file $generator_file
exit 77
fi

Expand Down
8 changes: 4 additions & 4 deletions src/fst/morphology/test/generate-propernoun-lemmas.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
###### Variables: #######
POS=propernouns
### in ###
source_file=${srcdir}/../../../src/fst/morphology/stems/${POS}.lexc
generator_file=./../../../src/fst/generator-gt-norm
analyser_file=./../../../src/fst/analyser-gt-norm
source_file=${srcdir}/../stems/${POS}.lexc
generator_file=./../../generator-gt-norm
analyser_file=./../../analyser-gt-norm

### out ###
# Temporary files:
Expand Down Expand Up @@ -153,7 +153,7 @@ if [ "$Fail" = "1" ]; then
fi

if [ $transducer_found -eq 0 ]; then
echo ERROR: No transducer found
echo ERROR: No transducer found $analyser_file $generator_file
exit 77
fi

Expand Down
8 changes: 4 additions & 4 deletions src/fst/morphology/test/generate-verb-lemmas.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
###### Variables: #######
POS=verbs
### in ###
source_file=${srcdir}/../../../src/fst/morphology/stems/${POS}.lexc
generator_file=./../../../src/fst/generator-gt-norm
analyser_file=./../../../src/fst/analyser-gt-norm
source_file=${srcdir}/../stems/${POS}.lexc
generator_file=./../../generator-gt-norm
analyser_file=./../../analyser-gt-norm

### out ###
# Temporary files:
Expand Down Expand Up @@ -142,7 +142,7 @@ if [ "$Fail" = "1" ]; then
fi

if [ $transducer_found -eq 0 ]; then
echo ERROR: No transducer found
echo ERROR: No transducer found $analyser_file $generator_file
exit 77
fi

Expand Down
6 changes: 3 additions & 3 deletions src/fst/morphology/test/phonology/pair-test-hfst.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

HTWOLC=@HFST_PAIR_TEST@
GTLANG=@GTLANG@
SOURCEFILE=${srcdir}/../../../src/fst/phonology.twolc
HFSTFILE=../../../src/fst/phonology.compose.hfst
SOURCEFILE=${srcdir}/../../phonology.twolc
HFSTFILE=../../.generated/phonology.compose.hfst
TESTRESULT=pair-test-out.hfst.txt
EXTEDITOR=@SEE@

Expand Down Expand Up @@ -41,7 +41,7 @@ if test -f ${SOURCEFILE} ; then
exit 77
fi
else
echo The compiled rule file ${XFSTFILE} was not found
echo The compiled rule file ${HFSTFILE} was not found
exit 77
fi
else
Expand Down
3 changes: 3 additions & 0 deletions src/fst/orthography/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
## Copyright: Sámediggi/Divvun/UiT
## Licence: GPL v3+

# build before test
SUBDIRS=. test

####### Source file defs: ########

# Set these to names of available orthographic rules in regex and
Expand Down
4 changes: 2 additions & 2 deletions src/fst/orthography/test/run-initcaps-genyaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ yaml_file_subdir=.

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../../test/ $halftest
2 changes: 0 additions & 2 deletions src/fst/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
## Copyright: Sámediggi/Divvun/UiT
## Licence: GPL v3+

SUBDIRS = phonology orthography morphology syntax

######## Test targets: ###########

# List here (space separated) all test scripts that should be run
Expand Down
4 changes: 2 additions & 2 deletions src/fst/test/run-dict-gt-desc-anayaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=dict-gt-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-dict-gt-norm-genyaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=dict-gt-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test/ $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-gt-desc-anayaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=gt-desc-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-gt-desc-genyaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=gt-desc-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-gt-desc-yaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=gt-desc-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-gt-norm-anayaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=gt-norm-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-gt-norm-genyaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=gt-norm-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
4 changes: 2 additions & 2 deletions src/fst/test/run-gt-norm-yaml-testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ yaml_file_subdir=gt-norm-yamls

####### Include/source helper script from dir above - DO NOT CHANGE: ########
# Relative path from test script to test runner:
testrunner="../run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir $halftest
testrunner="../../../test/run-yaml-testcases.sh"
source $testrunner $transducer $yaml_file_subdir ../../../test $halftest
Loading

0 comments on commit 2bfb12d

Please sign in to comment.