[flake] hspec/Main.hs fixes, but still coverage report doesn't work

parent 9fdb30c5
......@@ -697,7 +697,7 @@
# cabal.project.flake must be in the same directory than the original cabal.project
# for the relative paths in the packages stanza to point to the correct subdirs.
shellHook = ''
export GARGANTEXT_START_CORENLP="nix run .#coreNLP"
export GARGANTEXT_CORENLP_SERVER="nix run .#coreNLP"
ln -sf ${pkgs.runCommandLocal "cabal.project" {
nativeBuildInputs = with pkgs; [ gawk ];
}
......
......@@ -8,6 +8,7 @@ import Control.Monad
import Data.Text (isInfixOf)
import Shelly hiding (FilePath)
import System.IO
import System.Environment (lookupEnv)
import System.Process
import Test.Hspec
import qualified Data.Text as T
......@@ -21,7 +22,9 @@ startCoreNLPServer = do
-- Make the CoreNLP server configurable by an envvar, eg. set by nix develop
startServer <- lookupEnv "GARGANTEXT_CORENLP_SERVER"
let p = proc (fromMaybe "./startServer.sh" <$> startServer) []
(_, _, _, hdl) <- (createProcess $ p { cwd = maybe (Just "devops/coreNLP/stanford-corenlp-current") Nothing startServer
-- let cwd = fromMaybe "/devops/coreNLP/stanford-corenlp-current" startServer
let cwd = Nothing
(_, _, _, hdl) <- (createProcess $ p { cwd = cwd
, delegate_ctlc = True
, create_group = True
, std_out = UseHandle devNull
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment