giellalt / template-lang-und

A template repo for new languages, as well as to update existing language repos with.
https://giellalt.uit.no/
GNU Lesser General Public License v3.0
2 stars 1 forks source link

Move all tests from test/ subdir to test/subdir in the component being tested #25

Open flammie opened 2 months ago

flammie commented 2 months ago

Reorganising followingly:

snomos commented 1 month ago

There are a number of files still in the old dir structure, e.g.:

lang-est-x-plamk/test/tools/
└── spellcheckers
    ├── Makefile.am
    └── fstbased
        └── desktop
            └── hfst
                └── accept-all-lemmas.sh.in

lang-sma/test/tools/
├── mt
│   └── apertium
│       └── Makefile.am
└── spellcheckers
    ├── Makefile.am
    ├── fstbased
    │   └── desktop
    │       └── hfst
    │           └── accept-all-lemmas.sh.in
    ├── listbased
    │   └── plx
    │       ├── expected.plx
    │       ├── words-accept.exp-out.txt
    │       ├── words-accept.txt
    │       ├── words-reject.exp-out.txt
    │       ├── words-reject.txt
    │       ├── words.regex
    │       └── words.txt
    └── speller-testbed-sma.txt

Must these be cleaned manually, or are they already copied to the new location, so that they can just be deleted?

flammie commented 1 month ago

Some are language specific tests that need to be ported still, test/tools/spellcheckers/listbases/plx for example. Perhaps accept-all-lemmas is something that could be in template too. And for few fiels like test/tools/spellcheckers/Makefile.am that are copies of tools/spellcheckers/test/Makefile.am can be deleted, not sure why scripts didn't work there.

snomos commented 1 month ago

About listbased/: since we do not build such spellers anymore, the data does not need to be moved to the new test dir locations. Instead I suggest we move the data to test/data/.

I also suggest that we rename test/data/ to testdata/. The idea is that this dir contains testdata used by several other tests, ie is shared among tests in various locations. Test data that is specific to a (set of) test(s) in one dir should stay with the tests.

snomos commented 1 month ago

Things failing after the re-org:

flammie commented 1 month ago

I think some of the issues highlight that make check is not ideal for the purpose it was used, its main purpose in life is just to act as a litmus test for automation and external users that the downloaded version works within specified parametres (hence make -j && make -j check && make install). The tooling to support developers (e.g. opening log files in an editor) should probably be decoupled to devtools/ or devtest.

One way to use the current test driver efficiently is to keep test-suite.log open in an editor that supports automatic reloading, it should contain most of the stuff previous test driver outputted on terminal (for failing tests).

flammie commented 3 weeks ago

the make check uses now see & if giella-core-1.0.1 is configured to find one, but I haven't tested it, on linux etc. it falls back to head which is quite fine for logs