Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
haskell-gargantext
Commits
d65762f6
Verified
Commit
d65762f6
authored
Apr 25, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flake] hspec/Main.hs fixes, but still coverage report doesn't work
parent
9fdb30c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
flake.nix
flake.nix
+1
-1
Main.hs
test/drivers/hspec/Main.hs
+9
-6
No files found.
flake.nix
View file @
d65762f6
...
@@ -697,7 +697,7 @@
...
@@ -697,7 +697,7 @@
# cabal.project.flake must be in the same directory than the original cabal.project
# 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.
# for the relative paths in the packages stanza to point to the correct subdirs.
shellHook
=
''
shellHook
=
''
export GARGANTEXT_
START_CORENLP
="nix run .#coreNLP"
export GARGANTEXT_
CORENLP_SERVER
="nix run .#coreNLP"
ln -sf
${
pkgs
.
runCommandLocal
"cabal.project"
{
ln -sf
${
pkgs
.
runCommandLocal
"cabal.project"
{
nativeBuildInputs
=
with
pkgs
;
[
gawk
];
nativeBuildInputs
=
with
pkgs
;
[
gawk
];
}
}
...
...
test/drivers/hspec/Main.hs
View file @
d65762f6
...
@@ -8,6 +8,7 @@ import Control.Monad
...
@@ -8,6 +8,7 @@ import Control.Monad
import
Data.Text
(
isInfixOf
)
import
Data.Text
(
isInfixOf
)
import
Shelly
hiding
(
FilePath
)
import
Shelly
hiding
(
FilePath
)
import
System.IO
import
System.IO
import
System.Environment
(
lookupEnv
)
import
System.Process
import
System.Process
import
Test.Hspec
import
Test.Hspec
import
qualified
Data.Text
as
T
import
qualified
Data.Text
as
T
...
@@ -21,12 +22,14 @@ startCoreNLPServer = do
...
@@ -21,12 +22,14 @@ startCoreNLPServer = do
-- Make the CoreNLP server configurable by an envvar, eg. set by nix develop
-- Make the CoreNLP server configurable by an envvar, eg. set by nix develop
startServer
<-
lookupEnv
"GARGANTEXT_CORENLP_SERVER"
startServer
<-
lookupEnv
"GARGANTEXT_CORENLP_SERVER"
let
p
=
proc
(
fromMaybe
"./startServer.sh"
<$>
startServer
)
[]
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
,
delegate_ctlc
=
True
let
cwd
=
Nothing
,
create_group
=
True
(
_
,
_
,
_
,
hdl
)
<-
(
createProcess
$
p
{
cwd
=
cwd
,
std_out
=
UseHandle
devNull
,
delegate_ctlc
=
True
,
std_err
=
UseHandle
devNull
,
create_group
=
True
})
`
catch
`
\
e
->
case
e
of
,
std_out
=
UseHandle
devNull
,
std_err
=
UseHandle
devNull
})
`
catch
`
\
e
->
case
e
of
_
|
True
<-
"does not exist"
`
isInfixOf
`
(
T
.
pack
.
show
@
SomeException
$
e
)
_
|
True
<-
"does not exist"
`
isInfixOf
`
(
T
.
pack
.
show
@
SomeException
$
e
)
->
fail
$
"Cannot execute the 'startServer.sh' script. If this is the "
<>
->
fail
$
"Cannot execute the 'startServer.sh' script. If this is the "
<>
"first time you are running the tests, you have to run "
<>
"first time you are running the tests, you have to run "
<>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment