GrammaticalFramework / gf-core

Grammatical Framework core: compiler, shell & runtimes
https://www.grammaticalframework.org
Other
131 stars 35 forks source link

WIP: Enable tests #86

Closed inariksit closed 3 years ago

inariksit commented 3 years ago

Here are fixes by @kharus to get the test suite working again (issue #8). The problem with the old hardcoded paths is fixed, and the RGL path is read using DATA_DIR, which seems to be the current standard.

I tested on my computer and the path problem looks solved. However, I got stuck at this stage for 10 minutes, and my computer started freezing, so I stopped the process.

Building test suite 'gf-tests' for gf-3.10.4..
[1 of 1] Compiling Main
Linking .stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/gf-tests/gf-tests ...
7 modules in 1 directories.
Progress 0/2
kharus commented 3 years ago

I realized that reading path to RGL will work only locally. rgl_lib_dir <- readFile "DATA_DIR" As RGL build copies data to DATA_DIR during it's own build process by relying on gf-rgl and gf-core checked out in the same directory.

But in github CI gf-rgl can't access gf-core DATA_DIR. So gf-rgl artifact needs to be stored (and probably versioned) separately and pulled during gf-core build process.

johnjcamilleri commented 3 years ago

I haven't looked at this closely, but you don't need to rely on DATA_DIR at all. You can install the RGL wherever you want with --dest=/path/to/rgl and then just set the GF_LIB_PATH environment variable accordingly or use the --gf-lib-path= flag when invoking GF.

inariksit commented 3 years ago

New pull request that removes the RGL tests in #114